Source for file mysql.inc.php
Documentation is available at mysql.inc.php
* @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 user_id, user_login, DATE_FORMAT(user_last_modify, '". toStringSqlDate('long'). "') AS user_last_modify_display, DATE_FORMAT(user_date_crea, '". toStringSqlDate(). "') AS user_date_crea_display FROM " . T_USER . " WHERE user_validity <> 'N' ORDER BY user_date_crea DESC, user_login ASC LIMIT 0 , 10;";
$req_quickbox_list = "SELECT user_id, user_login, DATE_FORMAT(user_last_modify, '". toStringSqlDate('long'). "') AS user_last_modify_display, DATE_FORMAT(user_date_crea, '". toStringSqlDate(). "') AS user_date_crea_display FROM " . T_USER . " WHERE user_validity <> 'N' ORDER BY user_last_modify DESC, user_login ASC LIMIT 0 , 10;";
$req_quickbox_sup = "SELECT user_id, user_login, DATE_FORMAT(user_last_modify, '". toStringSqlDate('long'). "') AS user_last_modify_display, DATE_FORMAT(user_date_crea, '". toStringSqlDate(). "') AS user_date_crea_display FROM " . T_USER . " WHERE user_validity = 'N' ORDER BY user_last_modify DESC, user_login ASC LIMIT 0 , 10;";
$req_list_group= "SELECT catus_id, catus_name FROM " . T_CAT_USER . ";";
$req_alphabetical= "SELECT DISTINCT UPPER(LEFT( user_login, 1)) AS first_letter FROM ". T_USER. " WHERE user_validity<>'N' ORDER BY first_letter ASC;";
$req_nb_inscrit= "SELECT COUNT(user_id) AS nb_inscrit FROM ". T_USER. " WHERE user_validity<>'N'";
$q= "SELECT user_login FROM ". T_USER. " WHERE user_validity<>'N' AND user_id='". $user_id. "'";
$q= "SELECT U.user_login, U.user_validity, U.user_category, R.*, P.*, DATE_FORMAT(profile_birthdate, '". toStringSqlDate(). "') AS profile_birthdate, DATE_FORMAT(profile_last_modify, '". toStringSqlDate('long'). "') AS profile_last_modify_display, DATE_FORMAT(profile_date_crea, '". toStringSqlDate(). "') AS profile_date_crea_display, C.catus_id, C.catus_name FROM ". T_USER. " AS U LEFT OUTER JOIN ". T_RIGHT. " AS R on R.rights_id=U.user_rights LEFT OUTER JOIN ". T_PROFILE. " AS P on P.profile_id=U.user_profile LEFT OUTER JOIN ". T_CAT_USER. " AS C on C.catus_id=U.user_category WHERE user_validity<>'N' AND user_id='". $user_id. "'";
function SQL_getlistuser($debut, $limite = SELECT_LIMIT, $filter= '', $search= '' ) {
$mask= " AND lower(user_login) LIKE lower('\\". $search. "%') ";
$mask= " AND user_category='". $search. "' ";
$q= "SELECT U.user_login, U.user_id, DATE_FORMAT(user_date_crea, '". toStringSqlDate(). "') AS user_date_crea_display, C.catus_name FROM " . T_USER . " AS U LEFT OUTER JOIN ". T_CAT_USER. " AS C ON U.user_category=C.catus_id WHERE user_validity<>'N'". $mask. " ORDER BY user_date_crea DESC, user_login ASC LIMIT ". $debut. " , ". $limite. ";";
$mask= " AND lower(user_login) LIKE lower('\\". $search. "%') ";
$mask= " AND user_category='". $search. "' ";
$q= "SELECT COUNT(user_login) AS num_rows FROM " . T_USER . " WHERE user_validity<>'N'". $mask. ";";
$str .= $sep. 'workshop_id='. $v;
$query = "SELECT workshop_denomination, workshop_id FROM ". T_WORK . " WHERE (". $str . ") AND workshop_statut <> 'E' ORDER BY workshop_id DESC";
$q = "SELECT workshop_id as id, workshop_denomination as name FROM ". T_WORK . " WHERE workshop_statut = 'P' OR workshop_statut = 'D';";
$q = "SELECT workshop_id as id, workshop_denomination as name FROM ". J_WORK_USERS .
" LEFT OUTER JOIN " . T_WORK . " ON jwu_workshop_id = workshop_id " .
" WHERE jwu_user_id = '". $id. "' AND workshop_statut='P' ORDER BY workshop_range ASC, workshop_denomination ASC;";
$q = "SELECT CONCAT_WS('-',type,workshop_id) as exception FROM ". T_WORK_NOTIFY . " WHERE user_id = '". $id. "';";
|