| 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/private_html/administrator/modules/manu_permistion/ |
Upload File : |
<?php
if(@$_GET['act']=="add"){
$arrData = array();
$arrData['user'] = $_POST['user'];
$arrData['pwd'] = $_POST['pwd'];
$arrData['fullname'] = $_POST['fullname'];
$arrData['email'] = $_POST['email'];
$arrData['Goodcartype'] = $_POST['Goodcartype'];
$arrData['Address'] = $_POST['Address'];
$arrData['distrinct'] = $_POST['distrinct'];
$arrData['province'] = $_POST['province'];
$arrData['telephonenum'] = $_POST['telephonenum'];
$arrData['postcode'] = $_POST['postcode'];
$arrData['positionid'] = $_POST['positionid'];
$arrData['departmentid'] = $_POST['departmentid'];
$arrData['deliverypointid'] = $_POST['deliverypointid'];
$arrData['CustomerID'] = $_POST['CustomerID'];
$arrData['IdentificationID'] = $_POST['IdentificationID'];
$arrData['DriverLicense'] = $_POST['DriverLicense'];
$arrData['Birthday'] = $_POST['Birthday'];
$arrData['Edu_1'] = $_POST['Edu_1'];
$arrData['Edu_2'] = $_POST['Edu_2'];
$arrData['Edu_3'] = $_POST['Edu_3'];
$arrData['FatherAddress'] = $_POST['FatherAddress'];
$arrData['MatherName'] = $_POST['MatherName'];
$arrData['MatherAddress'] = $_POST['MatherAddress'];
$arrData['lang_code'] = 'EN';//$value['lang_code'];
$arrData['id'] = $autoid;
foreach($arrData as $k => $v ){
$arrData[$k] = str_replace("'", "\'", $v);
}
//echo "<pre>"; print_r($arrData);
//exit;
$db->insertData("admin",$arrData);
//exit;
$msg = "Save Data complete.";
$res = true;
}elseif(@$_GET['act']=="editdata"){
$arrData = array();
$arrData['user'] = $_POST['user'];
$arrData['pwd'] = $_POST['pwd'];
$arrData['fullname'] = $_POST['fullname'];
$arrData['email'] = $_POST['email'];
$arrData['Goodcartype'] = $_POST['Goodcartype'];
$arrData['Address'] = $_POST['Address'];
$arrData['distrinct'] = $_POST['distrinct'];
$arrData['province'] = $_POST['province'];
$arrData['telephonenum'] = $_POST['telephonenum'];
$arrData['postcode'] = $_POST['postcode'];
$arrData['positionid'] = $_POST['positionid'];
$arrData['departmentid'] = $_POST['departmentid'];
$arrData['deliverypointid'] = $_POST['deliverypointid'];
$arrData['CustomerID'] = $_POST['CustomerID'];
$arrData['IdentificationID'] = $_POST['IdentificationID'];
$arrData['DriverLicense'] = $_POST['DriverLicense'];
$arrData['Birthday'] = $_POST['Birthday'];
$arrData['Edu_1'] = $_POST['Edu_1'];
$arrData['Edu_2'] = $_POST['Edu_2'];
$arrData['Edu_3'] = $_POST['Edu_3'];
$arrData['FatherAddress'] = $_POST['FatherAddress'];
$arrData['MatherName'] = $_POST['MatherName'];
$arrData['MatherAddress'] = $_POST['MatherAddress'];
$arrData['id'] = $_GET['id'];
foreach($arrData as $k => $v ){
$arrData[$k] = str_replace("'", "\'", $v);
}
$db->updateData("admin",$arrData," id='".$_POST['id']."'");
$msg = "Edit Data complete.";
$res = true;
}elseif(@$_GET['act']=="edit"){
$arrRes = $db->getOne("admin","*"," id='".$_GET['id']."'");
}elseif(@$_GET['act']=="deletedata"){
$db->deleteData("admin"," id='".$_GET['id']."'");
$msg = "Delete Data complete.";
$res = true;
}elseif(@$_GET['act']=="deleteAll"){
//echo "<pre>"; print_r(@$_POST);
if(count(@$_POST['pagedel']) > 0){
foreach(@$_POST['pagedel'] as $key => $val){
$db->deleteData("admin"," id='".$val."'");
}
}
$msg = "Delete Data complete.";
$res = true;
}
$where_f = "lang_code='".$lang_code."'";
$lang = $db->getAll("language","*","","","");
$page = @$_GET['page'] ? @$_GET['page'] : 1;
$arrpageP = $db->getAll("admin","*","","");
$arrPage = $objMaster->viewPages($page, $arrpageP, "15");
$getPage = $db->getAll("admin","*","","",$arrPage["offset"]);
$getPoint = $db->getAll( "admin_permistion", "*",$where_f." and status = '1'","" );
//echo "<pre>"; print_r($getPage);
?>
<!-- Start Content Box -->
<div class="content-box">
<!-- Start Content Box Header-->
<div class="content-box-header">
<h3><?php echo $lang_set['user_title']; ?></h3>
<ul class="content-box-tabs">
<li><a href="#list" <?php echo ($_GET['act']=="" ? 'class="default-tab"' : '');?>><?php echo $lang_set['list_user']; ?></a></li> <!-- href must be unique and match the id of target div -->
<li><a href="#add" <?php echo ($_GET['act']=="edit" ? 'class="default-tab"' : '');?>><?php echo $lang_set['add_user']; ?></a></li>
</ul>
<div class="clear"></div>
</div>
<!-- End Content Box Header-->
<!-- Start Content Box Content-->
<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_permistion&file=adduser&id=<?php echo $_GET['id']?>">
<?php }?>
<!-- Start Tab Content id="list"-->
<div class="tab-content <?php echo ($_GET['act']=="" ? 'default-tab' : '');?>" id="list">
<form action="index.php?name=manu_permistion&file=adduser&id=<?php echo $_GET['RouteCode']?>&act=deleteAll" method="post">
<table cellpadding="0" cellspacing="0" width="100%">
<thead>
<tr>
<th width="20"><input type="checkbox" class="check_all" /></th>
<th width="70" align="left"><?php echo $lang_set['user']; ?></th>
<th width="70" align="left"><?php echo $lang_set['pwd']; ?></th>
<th width="150" align="left"><?php echo $lang_set['fullname']; ?></th>
<th width="100" align="left"><?php echo $lang_set['email']; ?></th>
<th width="120"><?php echo $lang_set['created']; ?></th>
<th width="70"><?php echo $lang_set['permistion']; ?></th>
<th width="75"><?php echo $lang_set['userstatus']; ?></th>
<th width="77"><?php echo $lang_set['action']; ?></th>
</tr>
</thead>
<?php
if($getPage){
foreach($getPage as $key => $val){
?>
<tr>
<th><input type="checkbox" name="pagedel[]" value="<?php echo $val['id'];?>"/></th>
<th><?php echo $val['user'];?></th>
<th><?php echo $val['pwd'];?></th>
<th><?php echo $val['fullname'];?></th>
<th><?php echo $val['email'];?></th>
<th><?php echo $val['created'];?></th>
<th><?php echo $val['Permistion'];?></th>
<th>
<select name="status" onchange="AJAX_Update_status('admin','status',this.options[this.selectedIndex].value,'<?php echo $val['id']?>','id');">
<option value="1" <?php echo ($val['status']=="1" ? "selected" : "");?>><?php echo $lang_set['show']; ?></option>
<option value="0" <?php echo ($val['status']=="0" ? "selected" : "");?>><?php echo $lang_set['hide']; ?></option>
</select></th><th>
<a href="index.php?name=manu_permistion&file=adduser&id=<?php echo $_GET['id']?>&act=edit&id=<?php echo $val['id']?>#add" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> |
<a href="index.php?name=manu_permistion&file=adduser&id=<?php echo $_GET['id']?>&act=deletedata&id=<?php echo $val['id']?>" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a>
</th>
</tr>
<?php
}
}else{
?>
<tr>
<th colspan="11" style="text-align:center"><?php echo $lang_set['not_data']; ?></th>
</tr>
<?php
}
?>
<tfoot>
<tr>
<td colspan="11">
<div class="bulk-actions align-left">
<select name="actdel">
<option value="del"><?php echo $lang_set['delete']; ?></option>
</select>
<input class="button" type="submit" value="<?php echo $lang_set['selected']; ?>" />
</div>
<!-- Start .pagination -->
<div class="pagination">
<a href="index.php?name=manu_permistion&file=adduser&id=<?php echo $_GET['id']?>&page=<?php echo $arrPage["startPage"];?>" title="First Page">« First</a><a href="index.php?name=manu_permistion&file=adduser&id=<?php echo $_GET['id']?>&page=<?php echo ($page-1);?>" title="Previous Page">« Previous</a>
<?php if( $arrPage["startPage"]!="" && $arrPage["endPage"] !="" ){?>
<?php
for($i = $arrPage["startPage"]; $i <= $arrPage["endPage"]; ++$i) {
echo'<a href="index.php?name=manu_permistion&file=adduser&id='.$_GET["id"].'&page='.$i.'" '.($page == $i ? 'class="number current"' : '').'>'.($i).'</a>';
}?>
<?php }?>
<a href="index.php?name=manu_permistion&file=adduser&id=<?php echo $_GET['id']?>&page=<?php echo ($page+1);?>" title="Next Page">Next »</a><a href="index.php?name=manu_permistion&file=adduser&id=<?php echo $_GET['id']?>&page=<?php echo $arrPage["endPage"];?>" title="Last Page">Last »</a>
</div>
<!-- End .pagination -->
<div class="clear"></div>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
<!-- End Tab Content id="list"-->
<!-- Start Tab Content id="add"-->
<div class="tab-content <?php echo ($_GET['act']=="edit" ? 'default-tab' : '');?>" id="add">
<form action="index.php?name=manu_permistion&file=adduser&id=<?php echo $_GET['id']?>&act=<?php echo ($_GET['act']=="edit" ? "editdata" : "add");?>#add" method="post" enctype="multipart/form-data" ><!--onsubmit="return checkdelivery();"-->
<fieldset>
<input type="hidden" name="id" value="<?php echo $_GET['id'];?>">
<p>
<table><tr><td>
<label><?php echo $lang_set['user']; ?>:</label>
<input type="text" class="text-input medium-input" name="user" id="user" value="<?php echo @$arrRes['user'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></td><td>
<label><?php echo $lang_set['pwd']; ?>:</label>
<input type="text" class="text-input medium-input" name="pwd" id="pwd" value="<?php echo @$arrRes['pwd'];?>" />
<!--<span class="input-notification error png_bg" id="span_value"></span>--></td><td>
<label><?php echo $lang_set['permistion']; ?>:</label>
<select name="DeliveryPointID">
<?php
if($getPoint){foreach($getPoint as $key => $val){
?>
<option value="<?php echo $val['Permistion'];?>" <?php echo ($val['Permistion']=='' || $val['Permistion']==@$arrRes['DeliveryPointID'] ? "selected" : "")?>><?php echo $val['menu_group'];?></option>
<?php }
}
?>
</select>
</td><tr></table>
</p>
<p>
<table><tr><td>
<label><?php echo $lang_set['fullname']; ?>:</label>
<input type="text" class="text-input large-input" name="fullname" id="fullname" value="<?php echo @$arrRes['fullname'];?>" /></td><td>
<label><?php echo $lang_set['email']; ?>:</label>
<input type="text" class="text-input large-input" name="email" id="email" value="<?php echo @$arrRes['email'];?>" />
</td><td>
<label><?php echo $lang_set['telephonenum']; ?>:</label>
<input type="text" class="text-input large-input" name="telephonenum" id="telephonenum" value="<?php echo @$arrRes['telephonenum'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></td><tr><table>
<p>
<table><tr><td>
<label><?php echo $lang_set['Address']; ?>:</label>
<input type="text" class="text-input large-input" name="Address" id="Address" value="<?php echo @$arrRes['Address'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></td><tr><table>
</p>
<p>
<table><tr><td>
<label><?php echo $lang_set['distrinct']; ?>:</label>
<input type="text" class="text-input large-input" name="distrinct" id="distrinct" value="<?php echo @$arrRes['distrinct'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></td>
<td>
<label><?php echo $lang_set['province']; ?>:</label>
<input type="text" class="text-input large-input" name="province" id="province" value="<?php echo @$arrRes['province'];?>" />
<!--<span class="input-notification error png_bg" id="span_value"></span>-->
</td>
<td>
<label><?php echo $lang_set['postcode']; ?>:</label>
<input type="text" class="text-input large-input" name="postcode" id="postcode" value="<?php echo @$arrRes['postcode'];?>" />
<!--<span class="input-notification error png_bg" id="span_value"></span>-->
</td><tr><table>
</p>
<p>
<table><tr><td>
<label><?php echo $lang_set['CustomerID']; ?>:</label>
<input type="text" class="text-input medium-input" name="CustomerID" id="CustomerID" value="<?php echo @$arrRes['CustomerID'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></td><td>
<label><?php echo $lang_set['IdentificationID']; ?>:</label>
<input type="text" class="text-input medium-input" name="IdentificationID" id="IdentificationID" value="<?php echo @$arrRes['IdentificationID'];?>" />
<!--<span class="input-notification error png_bg" id="span_value"></span>-->
</td><tr><table>
</p>
<p>
<table><tr><td>
<label><?php echo $lang_set['DriverLicense']; ?>:</label>
<input type="text" class="text-input medium-input" name=" DriverLicense" id=" DriverLicense" value="<?php echo @$arrRes[' DriverLicense'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></td><td>
<label><?php echo $lang_set['Birthday']; ?>:</label>
<input type="text" class="text-input medium-input" name="Birthday" id="Birthday" value="<?php echo @$arrRes['Birthday'];?>" />
<!--<span class="input-notification error png_bg" id="span_value"></span>-->
</td><tr><table>
</p>
<p>
<table><tr><td>
<label><?php echo $lang_set['Fathername']; ?>:</label>
<input type="text" class="text-input medium-input" name="Fathername" id="Fathername" value="<?php echo @$arrRes['Fathername'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></td><td>
<label><?php echo $lang_set['FatherAddress']; ?>:</label>
<input type="text" class="text-input medium-input" name="FatherAddress" id="FatherAddress" value="<?php echo @$arrRes['FatherAddress'];?>" />
<!--<span class="input-notification error png_bg" id="span_value"></span>-->
</td><tr><table>
</p>
<p>
<table><tr><td>
<label><?php echo $lang_set['MatherName']; ?>:</label>
<input type="text" class="text-input medium-input" name="MatherName" id="MatherName" value="<?php echo @$arrRes['MatherName'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></td><td>
<label><?php echo $lang_set['MatherAddress']; ?>:</label>
<input type="text" class="text-input medium-input" name="MatherAddress" id="MatherAddress" value="<?php echo @$arrRes['MatherAddress'];?>" />
<!--<span class="input-notification error png_bg" id="span_value"></span>-->
</td><tr><table>
</p>
<p>
<table><tr><td>
<label><?php echo $lang_set['Edu_1']; ?>:</label>
<input type="text" class="text-input Large-input" name="Edu_1" id="Edu_1" value="<?php echo @$arrRes['Edu_1'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></td><td>
<label><?php echo $lang_set['Edu_2']; ?>:</label>
<input type="text" class="text-input medium-input" name="Edu_2" id="Edu_2" value="<?php echo @$arrRes['Edu_2'];?>" />
<!--<span class="input-notification error png_bg" id="span_value"></span>-->
</td><tr><table>
</p>
<p>
<table><tr><td>
<label><?php echo $lang_set['Edu_3']; ?>:</label>
<input type="text" class="text-input large-input" name="Edu_3" id="Edu_3" value="<?php echo @$arrRes['Edu_3'];?>" />
<!--<span class="input-notification error png_bg" id="span_name"></span>--></td><td>
<label><?php echo $lang_set['Goodcartype']; ?>:</label>
<input type="text" class="text-input medium-input" name="Goodcartype" id="Goodcartype" value="<?php echo @$arrRes['Goodcartype'];?>" />
<!--<span class="input-notification error png_bg" id="span_value"></span>-->
</td><tr><table>
</p>
<p>
<input type="submit" class="button" value="<?php echo $lang_set['submit']; ?>" />
</p>
</fieldset>
</form>
</div>
<!-- End Tab Content id="add"-->
</div>