function contenuassoc_contenu() { if ($_GET['type'] == 1) { $objet = new Produit(); $objet->charger($_GET['objet']); } else { $objet = new Rubrique(); $objet->charger($_GET['objet']); } $contenu = new Contenu(); $query = "select * from {$contenu->table} where dossier=\"" . $_GET['id_dossier'] . "\""; $resul = $contenu->query($query); while ($resul && ($row = $contenu->fetch_object($resul))) { $contenuassoc = new Contenuassoc(); if ($contenuassoc->existe($objet->id, $_GET['type'], $row->id)) { continue; } $contenudesc = new Contenudesc(); $contenudesc->charger($row->id); ?> <option value="<?php echo $row->id; ?> "><?php echo $contenudesc->titre; ?> </option> <?php } }
function contenuassoc_contenu($request) { if ($request->query->get('type') == 1) { $objet = new Produit(); $objet->charger($request->query->get('objet')); } else { $objet = new Rubrique(); $objet->charger($request->query->get('objet')); } $contenu = new Contenu(); $query = "select * from {$contenu->table} where dossier=\"" . $request->query->get('id_dossier') . "\""; $resul = $contenu->query($query); while ($resul && ($row = $contenu->fetch_object($resul))) { $contenuassoc = new Contenuassoc(); if (!in_array($row->id, explode('-', $request->query->get('force_show_content'))) && $contenuassoc->existe($objet->id, $request->query->get('type'), $row->id) || in_array($row->id, explode('-', $request->query->get('force_hide_content')))) { continue; } $contenudesc = new Contenudesc(); $contenudesc->charger($row->id); ?> <option value="<?php echo $row->id; ?> "><?php echo $contenudesc->titre; ?> </option> <?php } }
$obj->charger($id); $objdesc = new Contenudesc(); $objdesc->charger($obj->id); $point_entree = "moddos"; $champ_parent = "dossier"; } else { exit; } } switch ($modif) { case 'titrecont': case 'titredos': $objdesc->titre = lireParam("value", "string"); echo $objdesc->titre; break; case 'lignecont': case 'lignedos': $obj->ligne = $obj->ligne ? 0 : 1; break; case 'lignetouscont': case 'lignetousdos': $ligne = lireParam("ligne", "int"); $parent = intval(lireParam("parent", "int")); $obj->query("update {$obj->table} set ligne={$ligne} where {$champ_parent}={$parent}"); break; default: exit; } $obj->maj(); $objdesc->maj(); ActionsModules::instance()->appel_module($point_entree, $obj);
function lister_contenus($parent, $critere, $order, $alpha) { $contenu = new Contenu(); $contenudesc = new Contenudesc(); if ($alpha == "alpha") { $query = "select c.id, c.ligne, c.classement from {$contenu->table} c LEFT JOIN {$contenudesc->table} cd ON cd.contenu = c.id and lang=" . ActionsLang::instance()->get_id_langue_courante() . " where dossier=\"{$parent}\" order by cd.{$critere} {$order}"; } else { $query = "select id, ligne, classement from {$contenu->table} where dossier=\"{$parent}\" order by {$critere} {$order}"; } $resul = $contenu->query($query); $i = 0; while ($resul && ($row = $contenu->fetch_object($resul))) { $contenudesc = new Contenudesc(); $contenudesc->charger($row->id); if (!$contenudesc->affichage_back_office_permis()) { continue; } $fond = "ligne_" . ($i++ % 2 ? "claire" : "fonce") . "_rub"; ?> <ul class="<?php echo $fond; ?> "> <li style="width:627px;"> <span id="titrecont_<?php echo $row->id; ?> " <?php if ($contenudesc->est_langue_courante()) { echo 'class="texte_edit"'; } ?> ><?php echo substr($contenudesc->titre, 0, 90); if (strlen($contenudesc->titre) > 90) { echo " ..."; } ?> </span></li> <li style="width:54px;"> <input type="checkbox" id="cont_ligne_<?php echo $row->id; ?> " name="ligne[]" class="sytle_checkbox" onchange="checkvalues('lignecont','<?php echo $row->id; ?> ')" <?php if ($row->ligne) { ?> checked="checked" <?php } ?> /> </li> <li style="width:54px;"></li> <li style="width:34px;"><a href="contenu_modifier.php?id=<?php echo $row->id; ?> &dossier=<?php echo $parent; ?> " class="txt_vert_11"><?php echo trad('editer', 'admin'); ?> </a></li> <li style="width:71px;"> <div class="bloc_classement"> <div class="classement"><a href="contenu_modifier.php?id=<?php echo $row->id; ?> &action=modclassement&parent=<?php echo $parent; ?> &type=M"><img src="gfx/up.gif" border="0" /></a></div> <div class="classement"><span id="classementcontenu_<?php echo $row->id; ?> " class="contenudos_edit"><?php echo $row->classement; ?> </span></div> <div class="classement"><a href="contenu_modifier.php?id=<?php echo $row->id; ?> &action=modclassement&parent=<?php echo $parent; ?> &type=D"><img src="gfx/dn.gif" border="0" /></a></div> </div> </li> <li style="width:37px; text-align:center;"><a href="javascript:supprimer_contenu('<?php echo $row->id; ?> ', '<?php echo $parent; ?> ');"><img src="gfx/supprimer.gif" width="9" height="9" border="0" /></a></li> </ul> <?php } }