Пример #1
0
    header('Last-Modified: ' . $headers['If-Modified-Since'], true, 304);
    return;
} else {
    header('Expired: ' . gmdate("D, d M Y H:i:s", time() + $offset) . ' GMT', true);
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT', true, 200);
}
require_once "{$base_path}/includes/init.inc.php";
require_once "{$base_path}/includes/error_report.inc.php";
require_once "{$base_path}/includes/global_vars.inc.php";
// récupération paramètres MySQL et connection á la base
if (file_exists($base_path . '/includes/opac_db_param.inc.php')) {
    require_once $base_path . '/includes/opac_db_param.inc.php';
} else {
    die("Fichier opac_db_param.inc.php absent / Missing file Fichier opac_db_param.inc.php");
}
require_once $base_path . '/includes/opac_mysql_connect.inc.php';
$dbh = connection_mysql();
require_once $base_path . "/includes/session.inc.php";
session_write_close();
require_once $class_path . "/autoloader.class.php";
$autoloader = new autoloader();
$autoloader->add_register("cms_modules", true);
//on ne charge que le minima, donc il faut aller chercher soit même le param qui nous interesse
$query = "select valeur_param from parametres where type_param= 'cms' and sstype_param='active_image_cache'";
$result = pmb_mysql_query($query, $dbh);
if (pmb_mysql_num_rows($result)) {
    global $cms_active_image_cache;
    $cms_active_image_cache = pmb_mysql_result($result, 0, 0);
}
$logo = new cms_logo($id, $type);
$logo->show_picture($mode);
Пример #2
0
         $result = array("status" => "ko", "error_message" => $charset != "uft-8" ? utf8_encode($res) : $res);
     } else {
         $result = array('status' => "ok");
     }
     print json_encode($result);
     break;
 case "duplicate_section":
     $section = new cms_section($id);
     $section->duplicate($recursive);
     break;
 case "duplicate_article":
     $article = new cms_article($id);
     $article->duplicate();
     break;
 case "edit_logo":
     $logo = new cms_logo($id, $quoi);
     print $logo->get_field();
     break;
 case 'update_article':
     header('Content-type: text/html;charset=' . $charset);
     $articles = explode(",", $articles);
     $order = 1;
     foreach ($articles as $id_article) {
         $article = new cms_article($id_article);
         $article->update_parent_section($num_section, $order);
         $order++;
     }
     break;
 case "build":
     switch ($action) {
         case "save":
Пример #3
0
 public static function get_format_data_structure($type, $full = true)
 {
     global $msg;
     $main_fields = array();
     $main_fields[] = array('var' => "id", 'desc' => $msg['cms_module_common_datasource_desc_id_' . $type]);
     if ($type == "section") {
         $main_fields[] = array('var' => "num_parent", 'desc' => $msg['cms_module_common_datasource_desc_num_parent']);
     } else {
         $main_fields[] = array('var' => "parent", 'desc' => $msg['cms_module_common_datasource_desc_parent'], 'children' => self::prefix_var_tree(cms_section::get_format_data_structure(false, false), "parent"));
     }
     $main_fields[] = array('var' => "title", 'desc' => $msg['cms_module_common_datasource_desc_title']);
     $main_fields[] = array('var' => "resume", 'desc' => $msg['cms_module_common_datasource_desc_resume']);
     if ($type == "article") {
         $main_fields[] = array('var' => "content", 'desc' => $msg['cms_module_common_datasource_desc_content']);
     }
     $main_fields[] = array('var' => "logo", 'children' => self::prefix_var_tree(cms_logo::get_format_data_structure(false, false), "logo"), 'desc' => $msg['cms_module_common_datasource_desc_logo']);
     $main_fields[] = array('var' => "publication_state", 'desc' => $msg['cms_module_common_datasource_desc_publication_state']);
     $main_fields[] = array('var' => "start_date", 'desc' => $msg['cms_module_common_datasource_desc_start_date']);
     $main_fields[] = array('var' => "end_date", 'desc' => $msg['cms_module_common_datasource_desc_end_date']);
     $main_fields[] = array('var' => "descriptors", 'desc' => $msg['cms_module_common_datasource_desc_descriptors'], 'children' => array(array('var' => "descriptors[i].id", 'desc' => $msg['cms_module_common_datasource_desc_descriptors_id']), array('var' => "descriptors[i].name", 'desc' => $msg['cms_module_common_datasource_desc_descriptors_name']), array('var' => "descriptors[i].comment", 'desc' => $msg['cms_module_common_datasource_desc_descriptors_comment']), array('var' => "descriptors[i].lang", 'desc' => $msg['cms_module_common_datasource_desc_descriptors_lang'])));
     $main_fields[] = array('var' => "type", 'desc' => $msg['cms_module_common_datasource_desc_type_' . $type]);
     $main_fields[] = array('var' => "fields_type", 'desc' => $msg['cms_module_common_datasource_desc_fields_type_' . $type]);
     $main_fields[] = array('var' => "create_date", 'desc' => $msg['cms_module_common_datasource_desc_create_date']);
     //pour les types de contenu
     $fields_type = array();
     $types = new cms_editorial_types($type);
     $fields_type = $types->get_format_data_structure($full);
     return array(array('var' => $msg['cms_module_common_datasource_main_fields'], "children" => $main_fields), array('var' => "nb_documents", 'desc' => $msg['cms_module_common_datasource_desc_nb_documents']), array('var' => "documents", 'desc' => $msg['cms_module_common_datasource_desc_documents'], 'children' => self::prefix_var_tree(cms_document::get_format_data_structure(), "documents[i]")), array('var' => $msg['cms_module_common_datasource_types'], 'desc' => $msg['cms_module_common_datasource_desc_types'], "children" => $fields_type));
 }