Location: PHPKode > projects > Esvon Personals > esvon-personals/modules/Mailing_Lists/hw_admin.php
<?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');

define('TBL_ML',hwModTable(HW_MOD,'list'));
define('TBL_ML_IDX',hwModTable(HW_MOD,'idx'));
define('TBL_ML_LOG',hwModTable(HW_MOD,'log'));
define('TBL_ML_PENDING',hwModTable(HW_MOD,'pending'));
define('TBL_ML_TEMP',hwModTable(HW_MOD,'temp'));
define('TBL_ML_UNSUB',hwModTable(HW_MOD,'unsub'));

// functions

function Mailing_Lists_main(){

  $ALLOWED_F = array('addm','indexm','ml_log','ml_send','modifym');

  if(!$_POST['em_export']) include HW_MOD_TPL.'ml_top.htm';
  
  $f = (string)$_REQUEST['file'];
  if(!$f || !in_array($f,$ALLOWED_F)) {
    echo ShowModSetupPage();
  }
  else{
    // if($f=='ml_send' && $mlist_id==-2) $f = 'ml_advsend';
    include HW_MOD_DIR.'hw_api.php'; // ML_getEmailsAmountSQL()
    include HW_MOD_DIR.'admin/'.$f.'.php';
  }

}

function get_mail_lists($all=0,$ch='',$bzero=0){
global $db;

  $s='<select name=mlist_id '.$ch.'>';
  if($all) $s.='<option value=0>All';
 	$res = $db->query('SELECT * FROM '.TBL_ML_IDX.($bzero?' WHERE id>0':'').' ORDER BY id');
	while($v = mysql_fetch_assoc($res)){
    $s.='<OPTION '.($_REQUEST['mlist_id']==$v['id']?'SELECTED':'').' VALUE="'.$v['id'].'">'.$v['name'];
  }
  return $s.'</select>';
}
Return current item: Esvon Personals