Ejemplo n.º 1
0
     }
     break;
 case 'fEraseSubscribersList':
     $CountRow = 0;
     $Subscriptions = subscrGetAllSubscriber('', $CountRow);
     foreach ($Subscriptions as $_Subscription) {
         subscrUnsubscribeSubscriberByEmail(base64_encode($_Subscription['Email']));
     }
     if (!count($Subscriptions)) {
         break;
     }
     $_SESSION['SUBSCRIBE_MESSAGE'] = array('Message' => str_replace('{*EMAILS_NUMBER*}', count($Subscriptions), ADMIN_SUBSCRIPTIONS_OK_ERASE_SUBSCRLIST), 'MessageCode' => 1);
     break;
 case 'fExportSubscribersList':
     $CountRow = 0;
     $Subscriptions = subscrGetAllSubscriber('', $CountRow);
     $ExportBuffer = '';
     if (!count($Subscriptions)) {
         break;
     }
     $fp = @fopen('core/temp/subscribers.txt', 'w');
     if (!$fp) {
         $_SESSION['SUBSCRIBE_MESSAGE'] = array('Message' => ADMIN_SUBSCRIPTIONS_ERROR_FILE_CREATION, 'MessageCode' => 2);
         break;
     }
     foreach ($Subscriptions as $_Subscription) {
         fwrite($fp, $_Subscription['Email'] . "\r\n");
     }
     $getFileParam = cryptFileParamCrypt("GetSubscriptionsList", null);
     $smarty->assign("getFileParam", $getFileParam);
     $_SESSION['SUBSCRIBE_MESSAGE'] = array('Message' => str_replace('{*URL*}', ADMIN_FILE . '?do=get_file&getFileParam=' . $getFileParam, ADMIN_SUBSCRIPTIONS_OK_EXPORT_SUBSCRLIST), 'MessageCode' => 1);
Ejemplo n.º 2
0
Archivo: totals.php Proyecto: gblok/rsc
$total["count_stat3"] = $n[2];
$total["count_stat4"] = $n[3];
// --- CATEGORIES ---
$q = db_query("select count(*) from " . CATEGORIES_TABLE);
$r = db_fetch_row($q);
$total["categories"] = $r[0] - 1;
// --- CUSTOMERS ---
$q = db_query("select count(*) from " . CUSTOMERS_TABLE);
$r = db_fetch_row($q);
$total["customers"] = $r[0];
//cust groups
$q = db_query("select count(*) from " . CUSTGROUPS_TABLE);
$r = db_fetch_row($q);
$total["customer_groups"] = $r[0];
//newsletter subscribers
subscrGetAllSubscriber(null, $r);
$total["newsletter_subscribers"] = $r;
//ETC
$q = db_query("select count(*) from " . CURRENCY_TYPES_TABLE);
$r = db_fetch_row($q);
$total["currency_types"] = $r[0];
$q = db_query("select count(*) from " . PAYMENT_TYPES_TABLE . " where Enabled=1");
$r = db_fetch_row($q);
$total["payment_types"] = $r[0];
$q = db_query("select count(*) from " . SHIPPING_METHODS_TABLE . " where Enabled=1");
$r = db_fetch_row($q);
$total["shipping_types"] = $r[0];
$q = db_query("select count(*) from " . AUX_PAGES_TABLE);
$r = db_fetch_row($q);
$total["aux_pages"] = $r[0];
$q = db_query("select count(*) from " . COUNTRIES_TABLE);