/new/index.php
PHP | 420 lines | 344 code | 47 blank | 29 comment | 113 complexity | b26d836927bc6b366386d1d50d576d39 MD5 | raw file
-
- <?php
- error_reporting ( 0 );
- session_start();
- $_SESSION["page"] = "index";
- include_once('helper/tienich.php');
- $ser_path = Tienich::getServer();
- $_SESSION["path"] = $ser_path;
- include('starrate/_drawrating.php');
- include("PHPtemplate/header.php");
- ?>
- <!-- login form -->
-
- <div id="sidebar-a">
- <div class="formlogin"><?php include("PHPtemplate/slidebar.php");?></div>
- </div>
-
- <!-- /End login form -->
- <!-- Top 10 view-->
-
- <?php
-
- if($_SESSION["power"]==1 && isset($_SESSION["power"]))
- {
- echo "<div id=\"sidebar-b\">";
- include("PHPtemplate/admin.php");
- echo "</div>";
- }
- if($_SESSION["power"]==0 && isset($_SESSION["power"]))
- {
- echo "<div id=\"sidebar-b\">";
- include("PHPtemplate/user.php");
- echo "</div>";
- }
- ?>
- <div id="sidebar-b"><?php
- include("PHPSource/top10view.php");
- ?></div>
- <!-- End Top 10 view-->
- <!-- Top 10 rate-->
- <div id="sidebar-b"><?php
-
- include("PHPSource/top10rate.php");
- ?></div>
- <!-- End Top 10 rate-->
- <!-- Content-->
- <?php
-
- if($_REQUEST["mode"]=="mangalist" || $_REQUEST["mode"]=="" || $_REQUEST["mode"]==NULL )
- {
- echo "<script type='text/javascript' src='js/mootools-yui-compressed.js'></script>";
- echo "<script type='text/javascript' src='js/slideshow.js'></script>";
- include("PHPSource/randommanga.php");
-
- }
-
- ?>
- <div id="content">
- <div class="padding">
- <div id="content_qs"></div>
-
- <?php
- if(isset($_POST["QSearch"]))
- {
- session_start();
- include ("dbconfig.php");
- echo " <h2 align ='center'>K?t qu? těm ki?m</h2> <br>";
- //$mgname = $_REQUEST["keyword"];
- $mgname = $_POST["keyword"];
- $strSQL = "select * from manga where manganame like '%$mgname%'";
- if($mgname =="")
- {
- echo "Ko těm th?y k?t qu?!!!";
- }
- else
- {
- //echo "$mgname";
- $result = mysql_query ($strSQL,$connection);
- echo"<div id='mangalist'>";
-
- echo "<table width = 600 align = 'center' class ='sample'>";
- while ($row = mysql_fetch_array($result))
- {
- $mid = $row[0];
- $manganame = $row["MangaName"];
- echo "<tr>";
- echo "<td ><a href='index.php?mode=chitietmanga&id=$mid'>$manganame</a></td>";
- echo "</tr>";
- }
- echo "</table>";
- echo "</div>";
- }
- mysql_close($connection);
-
-
- }
- else
- {
- if($_REQUEST["mode"]=="mangalist")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/danhsachmanga.php");
-
- }
-
- else if($_REQUEST["mode"]=="addmanga")
- {
- include("PHPSource/newmanga.php");
- $_REQUEST["mode"]="";
- }
- else if($_REQUEST["mode"]=="addpost")
- {
- include("PHPSource/newpost.php");
- $_REQUEST["mode"]="";
- }
- else if($_REQUEST["mode"]=="addmanga")
- {
- include ("PHPSource/newmanga.php");
- $_REQUEST["mode"] = "";
- }
- else if($_REQUEST["mode"]=="register")
- {
- include("PHPtemplate/formdangky.php");
- $_REQUEST["mode"]="";
- }
- else if($_REQUEST["mode"]=="search")
- {
- include("PHPtemplate/formtimkiem.php");
- $_REQUEST["mode"]="";
- }
- else if($_REQUEST["result"]=="ok")
- {
- $_REQUEST["Search"]="";
- include("PHPSource/ketquatimkiem.php");
-
- }
- else if($_REQUEST["mode"]=="chitietmanga")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/chitietmanga.php");
-
- }
- else if($_REQUEST["mode"]=="member")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/member.php");
-
- }
- else if($_REQUEST["mode"]=="listwarning")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/listWarning.php");
-
- }
- else if($_REQUEST["mode"]=="AboutUs")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/FAQs.php");
-
- }
- else if($_REQUEST["mode"]=="member")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/member.php");
-
- }
-
- else if($_REQUEST["mode"]=="register")
- {
- $_REQUEST["mode"]="";
- include("PHPtemplate/formdangky.php");
-
- }
-
- else if($_REQUEST["mode"]=="readwarning")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/readWarning.php");
-
- }
- else if($_REQUEST["mode"]=="profile" && isset($_SESSION["power"]))
- {
- $_REQUEST["mode"]="";
- include("PHPtemplate/formChangeProfile.php");
-
- }
- else if($_REQUEST["mode"]=="chaper_info")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/chitiet_chapter.php");
-
- }
- else if($_REQUEST["mode"]=="xoaposting")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/xulyxoaposting.php");
- }
- else if($_REQUEST["mode"]=="password")
- {
- $_REQUEST["mode"]="";
- include("PHPtemplate/formChangePassword.php");
- }
- else if($_REQUEST["mode"]=="quanlipostingAll")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/quanliposting.php");
- }
- else if($_REQUEST["mode"]=="quanliposting_on_mid")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/quanliposting_on_mid.php");
- }
- //quan ly manga cua user
- else if($_REQUEST["mode"]=="quanlimanga_user")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/quanlimanga_user.php");
- }
- //cap nhap manga cua user capnhappost
-
- else if($_REQUEST["mode"]=="capnhapmanga_user")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/capnhapmanga_user.php");
- }
- else if($_REQUEST["mode"]=="capnhappost")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/capnhappost.php");
- }
- else if($_REQUEST["mode"]=="xulicapnhappost")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/xulicapnhappost.php");
- }
-
-
-
- //****************MANGA*******
- //danh sach manga vua update
- else if($_REQUEST["mode"]=="mangaupdate")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/danhsachmangaupdate.php");
- }
-
- //quan li manga
- else if($_REQUEST["mode"]=="quanlimanga")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/quanlimanga.php");
- }
- //xoa mot va nhieu manga
-
- else if($_REQUEST["mode"]=="xoamanga" || $_REQUEST["xoanhieumanga"]=="xoanhieumanga")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/xulyxoamanga.php");
- }
- //cap nhap manga
-
- else if($_REQUEST["mode"]=="capnhapmanga")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/capnhapmanga.php");
- }
- else if($_REQUEST["mode"]=="xulycapnhapmanga")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/xulycapnhapmanga.php");
- }
- // duyet manga
-
- else if($_REQUEST["mode"]=="duyetmanga")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/xulyduyetmanga.php");
- }
-
- //***************CHAPTER*****************
- //quan li chapter
- else if($_REQUEST["mode"]=="quanlichapter")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/quanlichapter.php");
- }
- //xoa mot va nhieu chapter
- else if($_REQUEST["mode"]=="xoachapter" ||$_REQUEST["xoanhieuchapter"]=="xoanhieuchapter")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/xulyxoachapter.php");
- }
- //duyet chapter
- else if($_REQUEST["mode"]=="duyetchapter")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/xulyduyetchapter.php");
- }
-
- //*****************USER**********************
- //quan li user
-
- else if($_REQUEST["mode"]=="quanliuser")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/quanliuser.php");
- }
- //xoa mot hay nhieu user
-
- else if($_REQUEST["mode"]=="xoauser" ||$_REQUEST["xoanhieuuser"]=="xoanhieuuser")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/xulyxoauser.php");
- }
- //xem chi tiet cua mot user
-
- else if($_REQUEST["mode"]=="chitietuser")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/chitietuser.php");
- }
- //cap nhap user
-
- else if($_REQUEST["mode"]=="capnhapuser")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/capnhapuser.php");
- }
- else if($_REQUEST["mode"]=="xulycapnhapuser")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/xulycapnhapuser.php");
- }
- //gui cach bao cho user
-
- else if($_REQUEST["mode"]=="warninguser")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/warninguser.php");
- }
- else if($_REQUEST["mode"]=="sendwarning")
- {
- include("PHPSource/xulywarning.php");
- }
- else if($_REQUEST["mode"]=="xoacanhbao")
- {
- include("PHPSource/xoacanhbao.php");
- }
- else if($_REQUEST["mode"]=="xoamotcanhbao" ||$_REQUEST["xoanhieucanhbao"]=="xoanhieucanhbao")
- {
- $_REQUEST["mode"]="";
- include("PHPSource/xulyxoacanhbao.php");
- }
- //******************************POSTING***********************/
- else if($_REQUEST["mode"]=="quanliallposting")
- {
- include("PHPSource/quanliallposting.php");
- }
- //duyet posting
- else if($_REQUEST["mode"]=="duyetposting")
- {
- include("PHPSource/xulyduyetposting.php");
- }
- //xoa posting
- else if($_REQUEST["mode"]=="xoatheloai" ||$_REQUEST["xoanhieutheloai"]=="xoanhieutheloai")
- {
- include("PHPSource/xulyxoatheloai.php");
- }
- //******************************CARTEGORY***********************/
- //quan li the loai
- else if($_REQUEST["mode"]=="quanlitheloai")
- {
- include("PHPSource/quanlitheloai.php");
- }
- //xoa the loai
- else if($_REQUEST["mode"]=="xoapostingall" ||$_REQUEST["xoanhieupostingall"]=="xoanhieupostingall")
- {
- include("PHPSource/xulyxoapostingall.php");
- }
- //them the loai
- else if($_REQUEST["mode"]=="themtheloai" )
- {
- include("PHPtemplate/themtheloai.php");
- }
- //them the loai
- else if($_REQUEST["mode"]=="capnhaptheloai" )
- {
- include("PHPSource/xulycapnhaptheloai.php");
- }
- /*****************Backup vŕ restore*****************/
- else if($_REQUEST["mode"]=="backuprestore")
- {
- $_REQUEST["mode"]=="";
- if($_SESSION["power"] == 1)
- {
- include ("PHPSource/backuprestore.php");
- }
- else
- {
- echo "B?n không ???c quy?n s? d?ng ch?c n?ng nŕy";
- }
- }
-
- else
- {
- $_REQUEST["mode"]=="";
- include("PHPSource/moicapnhap.php");
- }
- }
-
- ?></div>
-
- </div>
- <div id="fix_ie"></div>
- <!-- End Content -->
- <!-- Footer-->
-
- <?php include("PHPtemplate/footer.php");?>
-
- <!-- End Footer-->