Example #1
0
function newsSendNews($newsid)
{
    $q = db_query("select add_date, title, textToMail, uri from " . NEWS_TABLE . " where NID=" . (int) $newsid);
    $news = db_fetch_row($q);
    $news["add_date"] = dtConvertToStandartForm($news["add_date"]);
    $q = db_query("select Email from " . MAILING_LIST_TABLE);
    while ($subscriber = db_fetch_row($q)) {
        xMailTxtHTMLDATA($subscriber["Email"], EMAIL_NEWS_OF . " - " . CONF_SHOP_NAME, $news["title"] . "<br><br>" . $news["textToMail"]);
    }
}
Example #2
0
function stGetCustomerLogReport()
{
    $q = db_query("select customerID, customer_ip, customer_logtime from " . CUSTOMER_LOG_TABLE);
    $data = array();
    while ($row = db_fetch_row($q)) {
        $row["customer_logtime"] = dtConvertToStandartForm($row["customer_logtime"], 1);
        $row["login"] = regGetLoginById($row["customerID"]);
        $data[] = $row;
    }
    return array_reverse($data);
}
Example #3
0
     }
     if (isset($_GET["show_all"])) {
         $url .= "&show_all=" . $_GET["show_all"];
     }
     return $url;
 }
 function _getUrlToDelete()
 {
     return _getUrlToSubmit();
 }
 if (isset($_GET["save_successful"])) {
     //show successful save confirmation message
     $smarty->assign("configuration_saved", 1);
 }
 //current time
 $s = dtConvertToStandartForm(get_current_time());
 $smarty->assign("current_date", $s);
 if (isset($_POST["news_save"])) {
     if (CONF_BACKEND_SAFEMODE) {
         Redirect(_getUrlToSubmit() . "&safemode=yes");
     }
     $picture = "";
     $NID = newsAddNews($_POST["add_date"], $_POST["title"], $_POST["textToPrePublication"], $_POST["textToPublication"], $_POST["textToMail"]);
     if (isset($_POST["send"])) {
         //send news to subscribers
         newsSendNews($NID);
     }
     Redirect(_getUrlToSubmit() . "&save_successful=yes");
 }
 if (isset($_GET["edit"])) {
     $edit_news = newsGetNewsToEdit($_GET["edit"]);