PageRenderTime 42ms CodeModel.GetById 5ms RepoModel.GetById 0ms app.codeStats 0ms

/new/index.php

http://clover-mana.googlecode.com/
PHP | 420 lines | 344 code | 47 blank | 29 comment | 113 complexity | b26d836927bc6b366386d1d50d576d39 MD5 | raw file
  1. <?php
  2. error_reporting ( 0 );
  3. session_start();
  4. $_SESSION["page"] = "index";
  5. include_once('helper/tienich.php');
  6. $ser_path = Tienich::getServer();
  7. $_SESSION["path"] = $ser_path;
  8. include('starrate/_drawrating.php');
  9. include("PHPtemplate/header.php");
  10. ?>
  11. <!-- login form -->
  12. <div id="sidebar-a">
  13. <div class="formlogin"><?php include("PHPtemplate/slidebar.php");?></div>
  14. </div>
  15. <!-- /End login form -->
  16. <!-- Top 10 view-->
  17. <?php
  18. if($_SESSION["power"]==1 && isset($_SESSION["power"]))
  19. {
  20. echo "<div id=\"sidebar-b\">";
  21. include("PHPtemplate/admin.php");
  22. echo "</div>";
  23. }
  24. if($_SESSION["power"]==0 && isset($_SESSION["power"]))
  25. {
  26. echo "<div id=\"sidebar-b\">";
  27. include("PHPtemplate/user.php");
  28. echo "</div>";
  29. }
  30. ?>
  31. <div id="sidebar-b"><?php
  32. include("PHPSource/top10view.php");
  33. ?></div>
  34. <!-- End Top 10 view-->
  35. <!-- Top 10 rate-->
  36. <div id="sidebar-b"><?php
  37. include("PHPSource/top10rate.php");
  38. ?></div>
  39. <!-- End Top 10 rate-->
  40. <!-- Content-->
  41. <?php
  42. if($_REQUEST["mode"]=="mangalist" || $_REQUEST["mode"]=="" || $_REQUEST["mode"]==NULL )
  43. {
  44. echo "<script type='text/javascript' src='js/mootools-yui-compressed.js'></script>";
  45. echo "<script type='text/javascript' src='js/slideshow.js'></script>";
  46. include("PHPSource/randommanga.php");
  47. }
  48. ?>
  49. <div id="content">
  50. <div class="padding">
  51. <div id="content_qs"></div>
  52. <?php
  53. if(isset($_POST["QSearch"]))
  54. {
  55. session_start();
  56. include ("dbconfig.php");
  57. echo " <h2 align ='center'>K?t qu? těm ki?m</h2> <br>";
  58. //$mgname = $_REQUEST["keyword"];
  59. $mgname = $_POST["keyword"];
  60. $strSQL = "select * from manga where manganame like '%$mgname%'";
  61. if($mgname =="")
  62. {
  63. echo "Ko těm th?y k?t qu?!!!";
  64. }
  65. else
  66. {
  67. //echo "$mgname";
  68. $result = mysql_query ($strSQL,$connection);
  69. echo"<div id='mangalist'>";
  70. echo "<table width = 600 align = 'center' class ='sample'>";
  71. while ($row = mysql_fetch_array($result))
  72. {
  73. $mid = $row[0];
  74. $manganame = $row["MangaName"];
  75. echo "<tr>";
  76. echo "<td ><a href='index.php?mode=chitietmanga&id=$mid'>$manganame</a></td>";
  77. echo "</tr>";
  78. }
  79. echo "</table>";
  80. echo "</div>";
  81. }
  82. mysql_close($connection);
  83. }
  84. else
  85. {
  86. if($_REQUEST["mode"]=="mangalist")
  87. {
  88. $_REQUEST["mode"]="";
  89. include("PHPSource/danhsachmanga.php");
  90. }
  91. else if($_REQUEST["mode"]=="addmanga")
  92. {
  93. include("PHPSource/newmanga.php");
  94. $_REQUEST["mode"]="";
  95. }
  96. else if($_REQUEST["mode"]=="addpost")
  97. {
  98. include("PHPSource/newpost.php");
  99. $_REQUEST["mode"]="";
  100. }
  101. else if($_REQUEST["mode"]=="addmanga")
  102. {
  103. include ("PHPSource/newmanga.php");
  104. $_REQUEST["mode"] = "";
  105. }
  106. else if($_REQUEST["mode"]=="register")
  107. {
  108. include("PHPtemplate/formdangky.php");
  109. $_REQUEST["mode"]="";
  110. }
  111. else if($_REQUEST["mode"]=="search")
  112. {
  113. include("PHPtemplate/formtimkiem.php");
  114. $_REQUEST["mode"]="";
  115. }
  116. else if($_REQUEST["result"]=="ok")
  117. {
  118. $_REQUEST["Search"]="";
  119. include("PHPSource/ketquatimkiem.php");
  120. }
  121. else if($_REQUEST["mode"]=="chitietmanga")
  122. {
  123. $_REQUEST["mode"]="";
  124. include("PHPSource/chitietmanga.php");
  125. }
  126. else if($_REQUEST["mode"]=="member")
  127. {
  128. $_REQUEST["mode"]="";
  129. include("PHPSource/member.php");
  130. }
  131. else if($_REQUEST["mode"]=="listwarning")
  132. {
  133. $_REQUEST["mode"]="";
  134. include("PHPSource/listWarning.php");
  135. }
  136. else if($_REQUEST["mode"]=="AboutUs")
  137. {
  138. $_REQUEST["mode"]="";
  139. include("PHPSource/FAQs.php");
  140. }
  141. else if($_REQUEST["mode"]=="member")
  142. {
  143. $_REQUEST["mode"]="";
  144. include("PHPSource/member.php");
  145. }
  146. else if($_REQUEST["mode"]=="register")
  147. {
  148. $_REQUEST["mode"]="";
  149. include("PHPtemplate/formdangky.php");
  150. }
  151. else if($_REQUEST["mode"]=="readwarning")
  152. {
  153. $_REQUEST["mode"]="";
  154. include("PHPSource/readWarning.php");
  155. }
  156. else if($_REQUEST["mode"]=="profile" && isset($_SESSION["power"]))
  157. {
  158. $_REQUEST["mode"]="";
  159. include("PHPtemplate/formChangeProfile.php");
  160. }
  161. else if($_REQUEST["mode"]=="chaper_info")
  162. {
  163. $_REQUEST["mode"]="";
  164. include("PHPSource/chitiet_chapter.php");
  165. }
  166. else if($_REQUEST["mode"]=="xoaposting")
  167. {
  168. $_REQUEST["mode"]="";
  169. include("PHPSource/xulyxoaposting.php");
  170. }
  171. else if($_REQUEST["mode"]=="password")
  172. {
  173. $_REQUEST["mode"]="";
  174. include("PHPtemplate/formChangePassword.php");
  175. }
  176. else if($_REQUEST["mode"]=="quanlipostingAll")
  177. {
  178. $_REQUEST["mode"]="";
  179. include("PHPSource/quanliposting.php");
  180. }
  181. else if($_REQUEST["mode"]=="quanliposting_on_mid")
  182. {
  183. $_REQUEST["mode"]="";
  184. include("PHPSource/quanliposting_on_mid.php");
  185. }
  186. //quan ly manga cua user
  187. else if($_REQUEST["mode"]=="quanlimanga_user")
  188. {
  189. $_REQUEST["mode"]="";
  190. include("PHPSource/quanlimanga_user.php");
  191. }
  192. //cap nhap manga cua user capnhappost
  193. else if($_REQUEST["mode"]=="capnhapmanga_user")
  194. {
  195. $_REQUEST["mode"]="";
  196. include("PHPSource/capnhapmanga_user.php");
  197. }
  198. else if($_REQUEST["mode"]=="capnhappost")
  199. {
  200. $_REQUEST["mode"]="";
  201. include("PHPSource/capnhappost.php");
  202. }
  203. else if($_REQUEST["mode"]=="xulicapnhappost")
  204. {
  205. $_REQUEST["mode"]="";
  206. include("PHPSource/xulicapnhappost.php");
  207. }
  208. //****************MANGA*******
  209. //danh sach manga vua update
  210. else if($_REQUEST["mode"]=="mangaupdate")
  211. {
  212. $_REQUEST["mode"]="";
  213. include("PHPSource/danhsachmangaupdate.php");
  214. }
  215. //quan li manga
  216. else if($_REQUEST["mode"]=="quanlimanga")
  217. {
  218. $_REQUEST["mode"]="";
  219. include("PHPSource/quanlimanga.php");
  220. }
  221. //xoa mot va nhieu manga
  222. else if($_REQUEST["mode"]=="xoamanga" || $_REQUEST["xoanhieumanga"]=="xoanhieumanga")
  223. {
  224. $_REQUEST["mode"]="";
  225. include("PHPSource/xulyxoamanga.php");
  226. }
  227. //cap nhap manga
  228. else if($_REQUEST["mode"]=="capnhapmanga")
  229. {
  230. $_REQUEST["mode"]="";
  231. include("PHPSource/capnhapmanga.php");
  232. }
  233. else if($_REQUEST["mode"]=="xulycapnhapmanga")
  234. {
  235. $_REQUEST["mode"]="";
  236. include("PHPSource/xulycapnhapmanga.php");
  237. }
  238. // duyet manga
  239. else if($_REQUEST["mode"]=="duyetmanga")
  240. {
  241. $_REQUEST["mode"]="";
  242. include("PHPSource/xulyduyetmanga.php");
  243. }
  244. //***************CHAPTER*****************
  245. //quan li chapter
  246. else if($_REQUEST["mode"]=="quanlichapter")
  247. {
  248. $_REQUEST["mode"]="";
  249. include("PHPSource/quanlichapter.php");
  250. }
  251. //xoa mot va nhieu chapter
  252. else if($_REQUEST["mode"]=="xoachapter" ||$_REQUEST["xoanhieuchapter"]=="xoanhieuchapter")
  253. {
  254. $_REQUEST["mode"]="";
  255. include("PHPSource/xulyxoachapter.php");
  256. }
  257. //duyet chapter
  258. else if($_REQUEST["mode"]=="duyetchapter")
  259. {
  260. $_REQUEST["mode"]="";
  261. include("PHPSource/xulyduyetchapter.php");
  262. }
  263. //*****************USER**********************
  264. //quan li user
  265. else if($_REQUEST["mode"]=="quanliuser")
  266. {
  267. $_REQUEST["mode"]="";
  268. include("PHPSource/quanliuser.php");
  269. }
  270. //xoa mot hay nhieu user
  271. else if($_REQUEST["mode"]=="xoauser" ||$_REQUEST["xoanhieuuser"]=="xoanhieuuser")
  272. {
  273. $_REQUEST["mode"]="";
  274. include("PHPSource/xulyxoauser.php");
  275. }
  276. //xem chi tiet cua mot user
  277. else if($_REQUEST["mode"]=="chitietuser")
  278. {
  279. $_REQUEST["mode"]="";
  280. include("PHPSource/chitietuser.php");
  281. }
  282. //cap nhap user
  283. else if($_REQUEST["mode"]=="capnhapuser")
  284. {
  285. $_REQUEST["mode"]="";
  286. include("PHPSource/capnhapuser.php");
  287. }
  288. else if($_REQUEST["mode"]=="xulycapnhapuser")
  289. {
  290. $_REQUEST["mode"]="";
  291. include("PHPSource/xulycapnhapuser.php");
  292. }
  293. //gui cach bao cho user
  294. else if($_REQUEST["mode"]=="warninguser")
  295. {
  296. $_REQUEST["mode"]="";
  297. include("PHPSource/warninguser.php");
  298. }
  299. else if($_REQUEST["mode"]=="sendwarning")
  300. {
  301. include("PHPSource/xulywarning.php");
  302. }
  303. else if($_REQUEST["mode"]=="xoacanhbao")
  304. {
  305. include("PHPSource/xoacanhbao.php");
  306. }
  307. else if($_REQUEST["mode"]=="xoamotcanhbao" ||$_REQUEST["xoanhieucanhbao"]=="xoanhieucanhbao")
  308. {
  309. $_REQUEST["mode"]="";
  310. include("PHPSource/xulyxoacanhbao.php");
  311. }
  312. //******************************POSTING***********************/
  313. else if($_REQUEST["mode"]=="quanliallposting")
  314. {
  315. include("PHPSource/quanliallposting.php");
  316. }
  317. //duyet posting
  318. else if($_REQUEST["mode"]=="duyetposting")
  319. {
  320. include("PHPSource/xulyduyetposting.php");
  321. }
  322. //xoa posting
  323. else if($_REQUEST["mode"]=="xoatheloai" ||$_REQUEST["xoanhieutheloai"]=="xoanhieutheloai")
  324. {
  325. include("PHPSource/xulyxoatheloai.php");
  326. }
  327. //******************************CARTEGORY***********************/
  328. //quan li the loai
  329. else if($_REQUEST["mode"]=="quanlitheloai")
  330. {
  331. include("PHPSource/quanlitheloai.php");
  332. }
  333. //xoa the loai
  334. else if($_REQUEST["mode"]=="xoapostingall" ||$_REQUEST["xoanhieupostingall"]=="xoanhieupostingall")
  335. {
  336. include("PHPSource/xulyxoapostingall.php");
  337. }
  338. //them the loai
  339. else if($_REQUEST["mode"]=="themtheloai" )
  340. {
  341. include("PHPtemplate/themtheloai.php");
  342. }
  343. //them the loai
  344. else if($_REQUEST["mode"]=="capnhaptheloai" )
  345. {
  346. include("PHPSource/xulycapnhaptheloai.php");
  347. }
  348. /*****************Backup vŕ restore*****************/
  349. else if($_REQUEST["mode"]=="backuprestore")
  350. {
  351. $_REQUEST["mode"]=="";
  352. if($_SESSION["power"] == 1)
  353. {
  354. include ("PHPSource/backuprestore.php");
  355. }
  356. else
  357. {
  358. echo "B?n không ???c quy?n s? d?ng ch?c n?ng nŕy";
  359. }
  360. }
  361. else
  362. {
  363. $_REQUEST["mode"]=="";
  364. include("PHPSource/moicapnhap.php");
  365. }
  366. }
  367. ?></div>
  368. </div>
  369. <div id="fix_ie"></div>
  370. <!-- End Content -->
  371. <!-- Footer-->
  372. <?php include("PHPtemplate/footer.php");?>
  373. <!-- End Footer-->