| Server IP : 45.94.215.241 / Your IP : 216.73.216.122 Web Server : Apache/2.4.66 (Ubuntu) System : Linux srv2937474766 7.0.0-28-generic #28-Ubuntu SMP PREEMPT_DYNAMIC Sun Jun 21 01:01:36 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.5.4 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/nikcandle_crm/admin/components/ |
Upload File : |
<?php if ($_SESSION['admin.'.$company_name_en.'_login']!="1") die; ?>
<?php
$x="";
if ($_POST['firstname']!="")
{
$x.=" and firstname like '%".$_POST['firstname']."%'";
}
if ($_POST['lastname']!="")
{
$x.=" and lastname like '%".$_POST['lastname']."%'";
}
if ($_POST['id']!="")
{
$x.=" and id='".$_POST['id']."'";
}
if ($_POST['tel']!="")
{
$x.=" and tel='".$_POST['tel']."'";
}
if ($_POST['mobile']!="")
{
$x.=" and mobile='".$_POST['mobile']."'";
}
if ($_POST['reg_date_from']!="")
{
$x.=" and reg_date>='".$_POST['reg_date_from']."'";
}
if ($_POST['inactive']!="")
{
$x.=" and inactive='".$_POST['inactive']."'";
}
$start=0;
if ($_POST['start']!="")
$start=$_POST['start'];
$i=$start;
$db->query("select count(*) as count from customers where 1 $x");
$res=$db->result();
$count=$res[0]['count'];
$db->query("select * from customers where 1 $x order by id desc LIMIT $start , $limit ");
$res=$db->result();
?>
<?php
$variables=array(
"step",
"firstname",
"lastname",
"tel",
"mobile",
"id",
"reg_date_from",
"reg_date_to"
);
?>
<table class="tableslistr" width="100%">
<tr>
<td width="100">
<?php
forward_button($variables,$start,$limit,$count);
?>
</td>
<td>
<?php
if ($start+$limit<$count)
echo $start."-".($start+$limit)."/".$count;
else
echo $start."-".$count."/".$count;
?>
</td>
<td width="100">
<?php
backward_button($variables,$start,$limit,$count);
?>
</td>
</tr>
</table>
<table class="tableslistr" width="100%" border="1">
<tr class="tablesheader">
<td>ردیف</td>
<td>نام مشتری</td>
<td>همراه</td>
<td>کد مشتری</td>
<td>فاکتورها</td>
<td>ویرایش</td>
<td>حذف</td>
</tr>
<?php
foreach ($res as $row)
{
$i++;
$name=$row['firstname']." ".$row['lastname'];
$moodle_user_id=$row['moodle_user_id'];
$mobile=$row['mobile'];
$inactive=$row['inactive'];
$bgcolor="";
if ($inactive=="1")
{
$bgcolor="#33ccff";
}
?>
<tr bgcolor="<?php echo $bgcolor; ?>">
<td><?php echo $i; ?></td>
<td><?php echo $name; ?></td>
<td><?php echo $mobile; ?></td>
<td><?php echo $row['id']; ?></td>
<td><a href="index.php?pid=customers&customer_id=<?php echo $row['id']; ?>&func=invoices"><img src="../images/buttons/invoices.png" border="0"></a></td>
<td><a href="index.php?pid=customers&customer_id=<?php echo $row['id']; ?>&func=edit"><img src="../images/buttons/edit.gif" border="0"></a></td>
<td><a href='#' onclick="confirm_delete('<?php echo $row['id']; ?>','index.php?pid=customers&customer_id=<?php echo $row['id']; ?>&func=delete')"><img src="../images/buttons/delete.gif" border="0"></a></td>
</tr>
<?php
}
?>
</table>