function isValidEmailAccess($id, $table_prefix, $mysql) { if (!isset($_COOKIE['inout_sub_admin'])) { return true; } if ($id == -1) { return false; } $accessflag = 0; $aid = getAdminId($mysql); $catId = mysql_query("select eid from " . $table_prefix . "admin_access_control where aid={$aid}"); $email_cnt = $mysql->total($table_prefix . "email_advt", "id={$id}"); while ($row = mysql_fetch_row($catId)) { if ($row[0] == 0) { if ($mysql->total($table_prefix . "ea_em_n_cat", "eid={$id}") == 0 && $email_cnt > 0) { $accessflag = 1; } } else { if ($mysql->total($table_prefix . "ea_em_n_cat", "eid={$id} and cid={$row['0']}") > 0) { $accessflag = 1; } } } if ($accessflag == 0) { return false; } else { return true; } }
$relt="select count(distinct a.id) from ".$table_prefix."email_advt a, ".$table_prefix."ea_em_n_cat b inner join ( SELECT eid FROM ".$table_prefix."admin_access_control where aid=$subAdminId )c on b.cid=c.eid where a.id= b.eid and a.unsubstatus=0 and b.unsubstatus=0"; $total=$mysql->echo_one($relt); echo $total; } else { echo $mysql->total("".$table_prefix."email_advt"," unsubstatus=0"); }*/ ?> )</option>--> <?php $getListSql = "select * from " . $table_prefix . "email_advt_category order by name"; if (isset($_COOKIE['inout_sub_admin'])) { $subAdminId = getAdminId($mysql); $getListSql = "SELECT a.*\tFROM " . $table_prefix . "email_advt_category a inner join \n\t\t\t\t\t\t\t( SELECT eid FROM " . $table_prefix . "admin_access_control where aid={$subAdminId} ) b\n\t\t\t\t\t\t\t\ton a.id=b.eid order by a.name"; } $result = mysql_query($getListSql); while ($row = mysql_fetch_row($result)) { echo '<option value="' . $row[0] . '">' . $row[1] . " ("; $tot = mysql_query("select * from " . $table_prefix . "email_advt a, " . $table_prefix . "ea_em_n_cat b where a.id=b.eid AND a.unsubstatus=0 AND b.unsubstatus=0 AND b.cid={$row['0']}"); echo mysql_num_rows($tot); echo ")</option>"; } ?> </select> <span class="style4">*</span><span class="info"> <br> (Number of emails in brackets. Email List can be changed only for pending campagns or when you restart an active campaign.)</span></td> </tr>
echo "<a href=\"javascript:history.back(-1);\">Go Back</a><br><br>"; } if ($resultstring != "") { echo "You have successfully exported the selected data. You may find the exported files in the following directory. <br><br>\n \t<span class=\"inserted\">export/{$day}/</span>"; echo "<br><br>If you want to download all the exported files right now, please click on the corresponding links below."; echo "<br><br>" . $resultstring; } if ($show != "") { $show .= "]"; echo "<br><span class=\"already\">You cannot export list(s) {$show} which have no emails.</span><br><br>"; } if ($invalid != "") { $invalid .= "]"; echo "<br><span class=\"already\">You dont have access to export the list(s) {$invalid} .</span><br><br>"; if ($log_enabled == 1) { $aid = getAdminId($mysql); $adminname = $mysql->echo_one("select username from " . $table_prefix . "subadmin_details where id={$aid}"); mysql_query("insert into " . $table_prefix . "admin_log_info values('','{$aid}','{$adminname} attempted unauthorized access to export the list(s) {$invalid}','" . time() . "','{$CST_MLM_ADMIN_MANAGEMENT}')"); } } if ($valid != "") { $valid .= "]"; $aid = getAdminId($mysql); mysql_query("insert into " . $table_prefix . "admin_log_info values('','{$aid}','List(s) exported:{$valid}','" . time() . "','{$CST_MLM_LIST}')"); } ?> </td> </tr> </table> <?php include_once "admin.footer.inc.php";
<div class="row" style="font-size:15x;"> <div class="col-xs-12 col-sm-9"> <p>Добро пожаловать в "dPanel" - СРМ.</p> <p>Если Вы работаете на компьютере то сверху и слева будет меню с доступными страницами.<br> Если вы пользуетесь смартфоном то меню вызывается путем нажатия на иконку сверху.</p> <p>Ниже есть ссылки быстрого доступа.</p> <ul class="list-unstyled"> <?php getNavMenu(); ?> </ul> <p>Воспользуйтесь системой тикетов для поддержки <a href="<?php echo $cfg['options']['siteurl']; ?> /newchat/<?php echo getAdminId(); ?> /new" class="tickets_links">здесь</a></p> </div> </div> <hr class="border-top-news"> <div class="row"> <div class="col-xs-12 col-sm-9"> <h1>Новости</h1> <?php echo getNewsForMainPage(); ?> </div> </div>
function writeLog($new, $table_prefix, $extension, $arraycount, $mysql) { include "constants.php"; $aid = 0; if (isset($_COOKIE['inout_sub_admin'])) { $aid = getAdminId($mysql); } if ($new > 0) { mysql_query("insert into " . $table_prefix . "admin_log_info values('','{$aid}','{$new} email(s) added to database {$extension}','" . time() . "','{$CST_MLM_EMAIL}')"); } if ($arraycount[1] > 0) { $catlist = $mysql->echo_one("select name from " . $table_prefix . "email_advt_category where id={$_POST['category']}"); mysql_query("insert into " . $table_prefix . "admin_log_info values('','{$aid}','{$arraycount['1']} email(s) added to list(s) {$catlist} {$extension}','" . time() . "','{$CST_MLM_LIST}')"); } if ($arraycount[2] > 0) { $catlist = $mysql->echo_one("select name from " . $table_prefix . "email_advt_category where id={$_POST['category2']}"); mysql_query("insert into " . $table_prefix . "admin_log_info values('','{$aid}','{$arraycount['2']} email(s) added to list(s) {$catlist} {$extension}','" . time() . "','{$CST_MLM_LIST}')"); } if ($arraycount[3] > 0) { $catlist = $mysql->echo_one("select name from " . $table_prefix . "email_advt_category where id={$_POST['category3']}"); mysql_query("insert into " . $table_prefix . "admin_log_info values('','{$aid}','{$arraycount['3']} email(s) added to list(s) {$catlist} {$extension}','" . time() . "','{$CST_MLM_LIST}')"); } }