Location: PHPKode > projects > Esvon Personals > esvon-personals/modules/Mailing_Lists/admin/indexm.php

// --------------------------------------------------------------------------
// Esvon Classifieds v.4.0
// Copyright(C), Esvon LTD, 2001-2010, All Rights Reserved.
// E-mail: hide@address.com
// All forms of reproduction, including, but not limited to, internet posting, 
// printing, e-mailing, faxing and recording are strictly prohibited.
// One license required per site running Esvon Classifieds. 
// To obtain a license for using Esvon Classifieds, please register at
// http://www.esvon.com/pg/products/p_classifieds/
// --------------------------------------------------------------------------

if(!defined('SITE_PATH')) die('Access denied');

if($_POST['go']) GoDelete();

//sub area

function ListItems() {
global $db;

 $tpl = new HawkTpl;

 $num = 0;
 $res = $db->query('SELECT id,name,descr FROM '.TBL_ML_IDX.' WHERE id>0 ORDER BY id'); // id>0
 while($v = mysql_fetch_assoc($res)) {


function GoDelete() {
  global $db;

  if(is_array($_POST['chk_id'])) {

    $s_ids = '"'.implode('","', array_map('intval', $_POST['chk_id'])).'"';
    $db->query('DELETE FROM '.TBL_ML_PENDING.' WHERE list_id IN ('.$s_ids.')');
    $db->query('DELETE FROM '.TBL_ML.' WHERE list_id IN ('.$s_ids.')');

    $a_log = $db->one_col_array('SELECT id FROM '.TBL_ML_LOG.' WHERE list_id IN ('.$s_ids.')');
      $db->query('DELETE FROM '.TBL_ML_TEMP.' WHERE log_id IN ('.implode(',',$a_log).')');

    $db->query('DELETE FROM '.TBL_ML_LOG.' WHERE list_id IN ('.$s_ids.')');
    $db->query('DELETE FROM '.TBL_ML_UNSUB.' WHERE list_id IN ('.$s_ids.')');
    $db->query('DELETE FROM '.TBL_ML_IDX.' WHERE id IN ('.$s_ids.')');

Return current item: Esvon Personals