Source for file pgsql.inc.php
Documentation is available at pgsql.inc.php
* @package linea21.modules
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
$req_quickbox_add = "SELECT newsletter_id, substring(newsletter_title from 1 for 50) as newsletter_title, to_char(newsletter_date_crea, '". toStringSqlDate('long'). "') AS newsletter_date_crea_display FROM " . T_NEWSLETTER . " WHERE newsletter_statut = 'P' OR newsletter_statut = 'D' ORDER BY newsletter_date_crea DESC OFFSET 0 LIMIT 10;";
$req_quickbox_sup = "SELECT newsletter_id, substring(newsletter_title from 1 for 50) as newsletter_title, to_char(newsletter_last_modify, '". toStringSqlDate('long'). "') AS newsletter_last_modify_display, to_char(newsletter_date_crea, '". toStringSqlDate(). "') AS newsletter_date_crea_display FROM " . T_NEWSLETTER . " WHERE newsletter_statut = 'E' ORDER BY newsletter_last_modify DESC OFFSET 0 LIMIT 10;";
$req_quickbox_mod = "SELECT newsletter_id, substring(newsletter_title from 1 for 50) as newsletter_title, to_char(newsletter_last_modify, '". toStringSqlDate('long'). "') AS newsletter_last_modify_display, to_char(newsletter_date_crea, '". toStringSqlDate(). "') AS newsletter_date_crea_display FROM " . T_NEWSLETTER . " WHERE newsletter_statut <> 'E' ORDER BY newsletter_last_modify DESC OFFSET 0 LIMIT 10;";
$req_quickbox_list = "SELECT newsletter_id, substring(newsletter_title from 1 for 50) as newsletter_title, to_char(newsletter_published_date, '". toStringSqlDate('long'). "') AS newsletter_published_date_display, to_char(newsletter_date_crea, '". toStringSqlDate(). "') AS newsletter_date_crea_display FROM " . T_NEWSLETTER . " WHERE newsletter_statut = 'P' ORDER BY newsletter_published_date DESC OFFSET 0 LIMIT 10;";
$requete = "SELECT newsletter_title, newsletter_body, newsletter_statut, newsletter_posted_by, ".
"to_char(newsletter_date_crea, '". toStringSqlDate(). "') AS newsletter_date_crea_display, ".
"to_char(newsletter_last_modify, '". toStringSqlDate('long'). "') AS newsletter_last_modify_display, ".
"to_char(newsletter_published_date, '". toStringSqlDate(). "') AS newsletter_published_date_display ".
"FROM " . T_NEWSLETTER . " ".
"LEFT OUTER JOIN ". T_USER. " on newsletter_posted_by=user_id ".
"WHERE newsletter_id='". $newsletter_id. "' AND newsletter_statut<>'N';";
$mask= " WHERE newsletter_statut = 'P'";
$orderby= "newsletter_published_date DESC";
$mask= " WHERE newsletter_statut = 'D'";
$orderby= "newsletter_date_crea DESC";
$mask= " WHERE newsletter_statut = 'W'";
$orderby= "newsletter_date_crea DESC";
$mask= " WHERE newsletter_statut <> 'E'";
$orderby= "newsletter_date_crea DESC";
$requete= "SELECT newsletter_id, substring(newsletter_title from 1 for 60) AS newsletter_title, ".
"newsletter_statut, newsletter_posted_by, user_login, ".
"to_char(newsletter_date_crea, '". toStringSqlDate(). "') AS newsletter_date_crea_display, ".
"to_char(newsletter_published_date, '". toStringSqlDate(). "') AS newsletter_published_date_display, ".
"to_char(newsletter_last_modify, '". toStringSqlDate(). "') AS newsletter_last_modify_display ".
"FROM " . T_NEWSLETTER . " ".
"LEFT OUTER JOIN ". T_USER. " AS U on newsletter_posted_by=U.user_id ".
$mask. " ORDER BY ". $orderby. " OFFSET ". $debut. " LIMIT ". $limite. ";";
$mask= "WHERE newsletter_statut = 'P'";
$mask= "WHERE newsletter_statut = 'D'";
$mask= "WHERE newsletter_statut = 'AA'";
$mask= " WHERE newsletter_statut <> 'E'";
$requete= "SELECT COUNT(newsletter_id) AS num_rows FROM " . T_NEWSLETTER . " ";
$requete = "SELECT newsletter_title, N.newsletter_posted_by, N.newsletter_statut FROM " . T_NEWSLETTER . " AS N WHERE newsletter_id='". $news_id. "';";
$requete = "SELECT emailcol_id, emailcol_email from ". T_EMAIL_COL. " WHERE emailcol_validity ='Y'";
$requete = "SELECT * from ". T_NEWSLETTER. " WHERE newsletter_statut ='W'";
|