Source for file mysql.inc.php
Documentation is available at mysql.inc.php
* @package linea21.modules
* @subpackage workshoprep
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
* 'Workshoprep' (as Workshop Report) module is used by 'Workshop' modules
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
$req_list_theme = "SELECT T.theme_id, T.theme_name, T.theme_statut, SDT.sdtheme_name, SDT.sdtheme_id FROM " . T_THEME . " AS T LEFT OUTER JOIN ". T_SD_THEME . " AS SDT ON SDT.sdtheme_id=T.theme_sd_theme WHERE T.theme_statut <> 'E' ORDER BY sdtheme_range DESC, sdtheme_name DESC, theme_name ASC;";
$req_list_level = "SELECT level_id, level_name FROM " . T_LEVEL. " WHERE level_statut<>'E' ORDER BY level_range DESC;";
$req_list_scale = "SELECT scale_id, scale_denomination FROM " . T_SCALE . " WHERE scale_statut<>'E' ORDER BY scale_denomination ASC;";
$req_quickbox_add = "SELECT workrep_id, LEFT(workrep_title, 50) as workrep_title, DATE_FORMAT(workrep_date_crea, '". toStringSqlDate('long'). "') AS workrep_date_crea_display FROM " . T_WORK_REP . " WHERE workrep_statut = 'P' OR workrep_statut = 'D' ORDER BY workrep_date_crea DESC LIMIT 0 , 10;";
$req_quickbox_sup = "SELECT workrep_id, LEFT(workrep_title, 50) as workrep_title, DATE_FORMAT(workrep_last_modify, '". toStringSqlDate('long'). "') AS workrep_last_modify_display, DATE_FORMAT(workrep_date_crea, '". toStringSqlDate(). "') AS workrep_date_crea_display FROM " . T_WORK_REP . " WHERE workrep_statut = 'E' ORDER BY workrep_last_modify DESC LIMIT 0 , 10;";
$req_quickbox_mod = "SELECT workrep_id, LEFT(workrep_title, 50) as workrep_title, DATE_FORMAT(workrep_last_modify, '". toStringSqlDate('long'). "') AS workrep_last_modify_display, DATE_FORMAT(workrep_date_crea, '". toStringSqlDate(). "') AS workrep_date_crea_display FROM " . T_WORK_REP . " WHERE workrep_statut <> 'E' ORDER BY workrep_last_modify DESC LIMIT 0 , 10;";
if($statut== 'E') $statut= "<>'". $statut. "'";
else $statut= "='". $statut. "'";
$requete = "SELECT WR.workrep_title , WR. workrep_resume, WR.workrep_comment, WR.workrep_statut, ".
"W.workshop_denomination, WR.workrep_workshop_id, ".
"DATE_FORMAT(WR.workrep_date_crea, '". toStringSqlDate(). "') AS workrep_date_crea_display, ".
"DATE_FORMAT(WR.workrep_last_modify, '". toStringSqlDate('long'). "') AS workrep_last_modify_display, ".
"DATE_FORMAT(WR.workrep_published_date, '". toStringSqlDate(). "') AS workrep_published_date_display ".
"FROM " . T_WORK_REP . " AS WR ".
"LEFT OUTER JOIN ". T_WORK. " AS W on W.workshop_id=WR.workrep_workshop_id ".
"WHERE workrep_id='". $work_id. "' AND workrep_statut". $statut. " LIMIT 1;";
$requete = "SELECT WC.workrepcon_id, WC.workrepcon_title FROM " . J_PARTS . " AS JW ".
"LEFT OUTER JOIN ". T_WORK_REP_CONT. " AS WC ON JW.j_parts_id=WC.workrepcon_id ".
"WHERE JW.j_root_id='". $work_id. "' AND j_type='W' AND workrepcon_validity='Y' ORDER BY WC.workrepcon_range ASC, WC.workrepcon_date_crea ASC;";
$requete = "SELECT workshop_denomination FROM " . T_WORK . " WHERE workshop_id='". $work_id. "';";
$requete = "SELECT workrep_title FROM " . T_WORK_REP . " WHERE workrep_id='". $workrep_id. "';";
// Copie conforme de celle qui se trouve dans publication
$ACTIVE_TABLE = T_BIBLIO_RES;
$join_active= "bibliores";
$ACTIVE_TABLE = T_LINK_RES;
$ACTIVE_TABLE = T_MULTI_RES;
$requete = "SELECT * FROM " . $ACTIVE_TABLE . " LEFT OUTER JOIN ". $TDB_LIAISON. " ON ". $champ2. "=". $join_active. "_id WHERE j_root_id='". $ID. "' AND j_type='". substr($type, 0, 1). "' AND ". $join_active. "_validity='Y' ORDER BY ". $join_active. "_range ASC, ". $join_active. "_date_crea ASC;";
$result = $sql_object -> DBSelect ($requete);
|