本文整理汇总了PHP中notice::get_list_child方法的典型用法代码示例。如果您正苦于以下问题:PHP notice::get_list_child方法的具体用法?PHP notice::get_list_child怎么用?PHP notice::get_list_child使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类notice
的用法示例。
在下文中一共展示了notice::get_list_child方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$limit = "limit " . $nb_per_page_search * $page . ",{$nb_per_page_search}";
}
$requete = "select expl_id as notice_id from {$table} " . $limit;
$object_type = "EXPL";
break;
}
}
if ($environement["caddie"]) {
foreach ($environement["caddie"] as $environement_caddie) {
$c = new caddie($environement_caddie);
$nb_items_before = $c->nb_item;
$resultat = @mysql_query($requete);
print mysql_error();
while ($r = mysql_fetch_object($resultat)) {
if ($environement["include_child"]) {
$tab_list_child = notice::get_list_child($r->notice_id);
if (count($tab_list_child)) {
foreach ($tab_list_child as $notice_id) {
$c->add_item($notice_id, $object_type);
}
}
} else {
$c->add_item($r->notice_id, $object_type);
}
}
$c->compte_items();
$message .= sprintf($msg["print_cart_n_added"] . "\\n", $c->nb_item - $nb_items_before, $c->name);
}
print "<script>alert(\"{$message}\"); self.close();</script>";
} else {
print "<script>alert(\"" . $msg["print_cart_no_cart_selected"] . "\"); history.go(-1);</script>";
示例2: get_list_child
static function get_list_child($notice_id, $liste = array())
{
$tab = array();
$liste[] = $notice_id;
$requete = "select num_notice as notice_id from notices_relations where linked_notice=" . $notice_id . " order by rank";
$res_child = @pmb_mysql_query($requete);
if (pmb_mysql_num_rows($res_child)) {
while ($child = pmb_mysql_fetch_object($res_child)) {
if (!in_array($child->notice_id, $liste)) {
$liste[] = $child->notice_id;
$tab_tmp = notice::get_list_child($child->notice_id, $liste);
$tab = array_merge($tab, $tab_tmp);
} else {
// cas de rebouclage d'une fille sur une mère: donc on sort.
$tab[] = $notice_id;
return $tab;
}
}
pmb_mysql_free_result($res_child);
}
$tab[] = $notice_id;
return $tab;
}
示例3: mono_display
if ($item) {
print "<h1>" . $msg["400"] . "</h1>";
$notice = new mono_display($item, 1);
print pmb_bidi('<strong>' . $notice->header . '</strong><br />');
}
switch ($action) {
case 'add_item':
// cas du click sur le lien du panier
if ($idcaddie) {
$caddie[0] = $idcaddie;
}
// Pour tous les paniers cochés
foreach ($caddie as $idcaddie) {
$myCart = new caddie($idcaddie);
if ($include_child) {
$tab_list_child = notice::get_list_child($item);
if (count($tab_list_child)) {
foreach ($tab_list_child as $notice_id) {
$myCart->add_item($notice_id, "NOTI");
}
}
} else {
$myCart->add_item($item, "NOTI");
}
$myCart->compte_items();
}
print "<script type='text/javascript'>window.close();</script>";
break;
case 'new_cart':
$select_cart = "\n\t\t<select name='cart_type'>\n\t\t\t<option value='NOTI' selected>{$msg['caddie_de_NOTI']}</option>\n\t\t\t<option value='EXPL'>{$msg['caddie_de_EXPL']}</option>\n\t\t\t<option value='BULL'>{$msg['caddie_de_BULL']}</option>\n\t\t</select>\n\t\t<input type='hidden' name='current_print' value='{$current_print}'/>";
$c_form = str_replace('!!cart_type_select!!', $select_cart, $cart_form);
示例4: while
$forcage['notice_perio_abo'] = 1;
}
if ($supp_notice_perio_collstat) {
$forcage['notice_perio_collstat'] = 1;
}
if ($supp_notice_perio_modele) {
$forcage['notice_perio_modele'] = 1;
}
if ($supp_bulletin_linked_expl_num) {
$forcage['bulletin_linked_expl_num'] = 1;
}
while (list($cle, $object) = each($liste)) {
// le formulaire demande de suprimmer toutes les notices liées à celle-ci
if ($supp_notice_linked_cascade) {
$forcage['notice_linked'] = 1;
$liste_linked = notice::get_list_child($object);
foreach ($liste_linked as $object) {
if ($myCart->del_item_base($object, $forcage) == CADDIE_ITEM_SUPPR_BASE_OK) {
$myCart->del_item_all_caddies($object, $myCart->type);
} else {
$res_aff_suppr_base .= aff_cart_unique_object($object, $myCart->type, $url_base = "./catalog.php?categ=caddie&sub=gestion&quoi=panier&idcaddie={$idcaddie}");
}
}
} else {
if ($myCart->del_item_base($object, $forcage) == CADDIE_ITEM_SUPPR_BASE_OK) {
$myCart->del_item_all_caddies($object, $myCart->type);
} else {
$res_aff_suppr_base .= aff_cart_unique_object($object, $myCart->type, $url_base = "./catalog.php?categ=caddie&sub=gestion&quoi=panier&idcaddie={$idcaddie}");
}
}
}