| Server IP : 27.254.152.13 / Your IP : 216.73.217.38 Web Server : Apache/2 System : Linux ns1-252017.dragonhispeed.com 5.2.0 #1 SMP Fri Mar 29 22:50:14 MSK 2024 x86_64 User : coloflew ( 1072) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/coloflew/domains/fulltion.com/public_html/parcel/administrator/modules/manu_manupage/ |
Upload File : |
<?php
//echo "<pre>"; print_r($lang_En);
if($_GET['act']=="add"){
$lang = $db->getAll("language","*","","","");
$idarr = $db->getOne("page","max(page_id) as page_id","lang_code='".$lang_code."'");
$id = $idarr['page_id'];
$autoid = $id+1;
$arrData = array();
if($lang){
foreach($lang as $key => $value ){
$arrData['page_id'] = $autoid;
$arrData['page_name'] = $_POST['page_name'];
$arrData['page_link'] = $_POST['page_link'];
$arrData['page_link_f'] = $_POST['page_link'] ? 1 : 0;
$arrData['page_detail'] = $_POST['page_detail'];
$arrData['page_parent'] = $_POST['page_parent'];
$arrData['page_sort'] = $_POST['page_sort'];
$arrData['page_status'] = $_POST['page_status'];
$arrData['display_c'] = $_POST['display_c'];
$arrData['page_date'] = TIMESTAMP;
$arrData['lang_code'] = $value['lang_code'];
//echo "<pre>"; print_r($arrData); exit();
$db->insertData("page",$arrData);
}
}
$msg = "Save data Complete";
$res = true;
}elseif($_GET['act']=="editdata"){
$arrData = array();
$arrData['page_id'] = $_POST['page_id'];
$arrData['page_name'] = $_POST['page_name'];
$arrData['page_link'] = $_POST['page_link'];
$arrData['page_link_f'] = $_POST['page_link'] ? 1 : 0;
$arrData['page_detail'] = $_POST['page_detail'];
$arrData['page_parent'] = $_POST['page_parent'];
$arrData['page_sort'] = $_POST['page_sort'];
$arrData['page_status'] = $_POST['page_status'];
$arrData['display_c'] = $_POST['display_c'];
//echo "<pre>"; print_r($arrData); exit();
$db->updateData("page",$arrData,"page_id='".$_POST['page_id']."' and lang_code='".$lang_code."'");
$msg = "Update Data Complete";
$res = true;
}elseif($_GET['act']=="edit"){
$arrRes = $db->getOne("page","*","page_id='".$_GET['page_id']."' and lang_code='".$lang_code."'");
}elseif($_GET['act']=="deletedata"){
$getchkp = $db->getAll("page","*","page_parent='".$_GET['page_id']."'");
if($getchkp){
foreach($getchkp as $ke => $va){
$db->deleteData("page","page_id='".$va['page_id']."'");
}
}
$getDel = $db->getOne("page","*","page_id='".$_GET['page_id']."'");
$db->deleteData("page","page_id='".$getDel['page_id']."'");
echo '<meta http-equiv="refresh" content="0;URL=index.php?name=manu_manupage&file=page">';
}elseif($_GET['act']=="deleteAll"){
//echo "<pre>"; print_r($_POST);
//exit;
if($_POST['actdel']=="update"){
$arrData = array();
foreach($_POST['page_sort'] as $ke => $va){
$arrData['page_sort'] = $va;
$db->updateData("page",$arrData,"page_id='".$ke."'");
}
}else{
if(count($_POST['pagedel']) > 0){
foreach($_POST['pagedel'] as $key => $val){
$getchkp = $db->getAll("page","*","page_parent='".$val."'");
if($getchkp){
foreach($getchkp as $ke => $va){
$db->deleteData("page","page_id='".$va['page_id']."'");
}
}
$getDel = $db->getOne("page","*","page_id='".$val."'");
$db->deleteData("page","page_id='".$getDel['page_id']."'");
}
}
}
echo '<meta http-equiv="refresh" content="0;URL=index.php?name=manu_manupage&file=page">';
}
$page = $_GET['page'] ? $_GET['page'] : 1;
$arrpageP = $db->getAll( "page", "*","page_parent='0' and lang_code='".$lang_code."'","" );
$arrPage = $objMaster->viewPages($page, $arrpageP, "10");
$getPage = $db->getAll("page","*","page_parent='0' and lang_code ='".$lang_code."'","order by page_sort asc",$arrPage["offset"]);
?>
<div class="content-box"><!-- Start Content Box -->
<div class="content-box-header">
<h3>Menu</h3>
<ul class="content-box-tabs">
<li><a href="#tab1" <?php echo ($_GET['act']=="" ? 'class="default-tab"' : '');?>>List</a></li> <!-- href must be unique and match the id of target div -->
<li><a href="#tab2" <?php echo ($_GET['act']=="edit" ? 'class="default-tab"' : '');?>>Add</a></li>
</ul>
<div class="clear"></div>
</div> <!-- End .content-box-header -->
<div class="content-box-content">
<?php if($res){?>
<div class="notification success png_bg">
<a href="#" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
<div>
<?php echo $msg;?>
</div>
</div>
<meta http-equiv="refresh" content="1;URL=index.php?name=manu_manupage&file=page">
<?php }?>
<div class="tab-content <?php echo ($_GET['act']=="" ? 'default-tab' : '');?>" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
<table>
<thead>
<tr>
<th><input class="check-all" type="checkbox" /></th>
<th>Sort</th>
<th style="width:350px;">Menu Name</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<form action="index.php?name=manu_manupage&file=page&act=deleteAll" method="post" >
<tbody>
<?php
if($getPage){
foreach($getPage as $key => $val){
?>
<tr>
<td><input type="checkbox" name="pagedel[]" value="<?php echo $val['page_id'];?>"/></td>
<td><input type="text" name="page_sort[<?php echo $val['page_id'];?>]" value="<?php echo $val['page_sort'];?>" style="width:15px;" /></td>
<td><?php echo $val['page_name'];?></td>
<td>
<select name="page_status" onchange="AJAX_Update_status('page','page_status',this.options[this.selectedIndex].value,'<?php echo $val['page_id']?>','page_id');">
<option value="yes" <?php echo ($val['page_status']=="yes" ? "selected" : "");?>><?php echo "Show"; ?></option>
<option value="no" <?php echo ($val['page_status']=="no" ? "selected" : "");?>><?php echo "Hide"; ?></option>
</select>
</td>
<td>
<!-- Icons -->
<a href="index.php?name=manu_manupage&file=page&act=edit&page_id=<?php echo $val['page_id'];?>" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a>
</td>
</tr>
<?php echo $objFun->get_LevelPage($val['page_id'],1,$lang_code,$lang_set);?>
<?php
}
}else{
?>
<tr>
<td colspan="5" style="text-align:center">No Data.</td>
</tr>
<?php
}
?>
</tbody>
</form>
</table>
</div> <!-- End #tab1 -->
<div class="tab-content <?php echo ($_GET['act']=="edit" ? 'default-tab' : '');?>" id="tab2">
<?php //echo "ENG Page";?>
<form action="index.php?name=manu_manupage&file=page&act=<?php echo ($_GET['act']=="edit" ? "editdata" : "add");?>" method="post">
<input type="hidden" name="page_id" value="<?php echo $arrRes['page_id'];?>" />
<fieldset>
<!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
<p>
<label><?php echo "Main Menu"; ?> :</label> <br />
<select class="medium-input" name="page_parent">
<option value="0"><?php echo "Root"; ?></option>
<?php
if($arrpageP){
foreach($arrpageP as $key => $val){
?>
<option value="<?php echo $val['page_id'];?>" <?php echo ($arrRes['page_parent']==$val['page_id'] ? "selected" : ""); ?>><?php echo $val['page_name'];?></option>
<?php echo $objFun->get_Level_subPage($val['page_id'],1,$lang_code);?>
<?php
}
}//end if loop page level
?>
</select>
</p>
<p>
<label>Menu Name</label>
<input class="text-input large-input" type="text" name="page_name" value="<?php echo $arrRes['page_name'];?>" />
</p>
<p>
<label>Menu External Link</label>
<input class="text-input large-input" type="text" id="large-input" name="page_link" value="<?php echo $arrRes['page_link'];?>" />
</p>
<p>
<label>Sort</label>
<input class="text-input small-input" type="text" id="small-input" name="page_sort" value="<?php echo ($arrRes['page_sort'] ? $arrRes['page_sort'] : '0' );?>" />
</p>
<p>
<label>Content</label>
<?php
include("FCKeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('page_detail') ;
$oFCKeditor->BasePath = 'FCKeditor/' ;
$oFCKeditor->Width = '580' ;
$oFCKeditor->Height = '600' ;
$oFCKeditor->Value = $arrRes['page_detail'];
$oFCKeditor->Create() ;
?>
</p>
<p>
<label>Display Under Construction</label>
<input type="checkbox" name="display_c" value="yes" <?php echo ($arrRes['display_c'] ? "checked" : "");?> /> Under Construction
</p>
<p>
<label>Display Menu</label>
<input type="radio" class="radio" name="page_status" value="yes" <?php echo ($arrRes['page_status']=="yes" ? "checked" : "" ); ?> /> <?php echo "Display"; ?><br /><input type="radio" class="radio" name="page_status" value="no" <?php echo ( !$arrRes['page_status'] || $arrRes['page_status']=="no" ? "checked" : "" ); ?>/> <?php echo "Not Display"; ?>
</p>
<p>
<input class="button" type="submit" value="Submit" />
</p>
</fieldset>
<div class="clear"></div><!-- End .clear -->
</form>
</div> <!-- End #tab2 -->
<!--#######################################-->
</div> <!-- End .content-box-content -->
</div> <!-- End .content-box -->