예제 #1
0
 tabheader(lang('catas_cnode_list') . "&nbsp; &nbsp; <input class=\"checkbox\" type=\"checkbox\" name=\"select_all\" value=\"1\">&nbsp;" . lang('selectallpage'), '', '', 12);
 $cy_arr = array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" onclick=\"checkall(this.form, 'selectid', 'chkall')\">", array(lang('cnode_name'), 'txtL'), array(lang('cnode_alias'), 'txtL'), lang('outconfig'), array(lang('catalog_attr'), 'txtL'), array(lang('look'), 'txtL'));
 for ($i = 0; $i <= min($cn_max_addno, 2); $i++) {
     $cy_arr[] = $i ? lang('addp') . $i . lang('template') : lang('index_tpl');
 }
 $cy_arr[] = lang('detail');
 trcategory($cy_arr);
 $pagetmp = $page;
 do {
     $query = $db->query("SELECT * {$fromsql} {$wheresql} ORDER BY cnid ASC LIMIT " . ($pagetmp - 1) * $atpp . ",{$atpp}");
     $pagetmp--;
 } while (!$db->num_rows($query) && $pagetmp);
 while ($cnode = $db->fetch_array($query)) {
     $cnode['catalog'] = empty($cnode['caid']) ? '-' : $catalogs[$cnode['caid']]['title'];
     $cnode['inconfig'] = $cnode['inconfig'] ? '-' : lang('outconfig');
     view_cnurl($cnode['ename'], $cnode);
     $cnode['cname'] = cnode_cname($cnode['ename']);
     $lookstr = '';
     for ($i = 0; $i <= $cnode['addnum']; $i++) {
         $lookstr .= "<a href=\"" . $cnode['indexurl' . ($i ? $i : '')] . "\" target=\"_blank\">" . ($i ? lang('add_p') . $i : lang('index')) . "</a>&nbsp; ";
     }
     $tplsarr = explode(',', $cnode['tpls']);
     echo "<tr class=\"txt\"><td class=\"txtC\"><input class=\"checkbox\" type=\"checkbox\" name=\"selectid[{$cnode['cnid']}]\" value=\"{$cnode['cnid']}\">\n";
     echo "<td class=\"txtL\">{$cnode['cname']}</td>\n";
     echo "<td class=\"txtL\">" . (empty($cnode['alias']) ? '-' : $cnode['alias']) . "</td>\n";
     echo "<td class=\"txtC\">{$cnode['inconfig']}</td>\n";
     echo "<td class=\"txtL\">{$cnode['catalog']}</td>\n";
     echo "<td class=\"txtL\">{$lookstr}</td>\n";
     for ($i = 0; $i <= min($cn_max_addno, 2); $i++) {
         echo "<td class=\"txtC\">" . (empty($tplsarr[$i]) ? '-' : (empty($mtpls[@$tplsarr[$i]]['cname']) ? $tplsarr[$i] : $mtpls[@$tplsarr[$i]]['cname'])) . "</td>\n";
     }
예제 #2
0
function cnodearr($urlstr, $sid = 0)
{
    global $subsites, $cmsinfos;
    if ($cnode = read_cnode($urlstr, $sid)) {
        view_cnurl($urlstr, $cnode);
        $cnode['sitename'] = empty($cnode['sid']) ? lang('msite') : $subsites[$cnode['sid']]['sitename'];
        $cnode['siteurl'] = view_siteurl($cnode['sid']);
    }
    return $cnode ? $cnode : false;
}