echo "</tr></table></form>"; echo "<center>"; linkfooterchild($lid); echo "</center>"; CloseTable(); include "footer.php"; } if (isset($ratinglid) && isset($ratinguser) && isset($rating)) { $ret = addrating($ratinglid, $ratinguser, $rating, $ratinghost_name, $ratingcomments); } switch ($l_op) { case "menu": menu($mainlink); break; case "AddLink": AddLink(); break; case "NewLinks": NewLinks($newlinkshowdays); break; case "NewLinksDate": NewLinksDate($selectdate); break; case "TopRated": TopRated($ratenum, $ratetype); break; case "MostPopular": MostPopular($ratenum, $ratetype); break; case "RandomLink": RandomLink();
// we know we have found an underscore so this is a valid // group identified (yes, a big assumption TODO) $tag_start = substr($Highkey, 0, $pos); } $tag_end = "_linkisbn"; //'group1_0_linkisbn' $full_tag = $tag_start . $tag_end; //echo $full_tag; $new_isbn = ""; if ($val->publishedat[$full_tag]) { $new_isbn = $val->publishedat[$full_tag]; } if ($new_isbn != "") { $isbn = $new_isbn; } AddLink($link, 'kindlebuttonimage', $alt_text_message, $image_lookup, $isbn); $key = ""; $link = ""; /* if ($key==="amazon_link") { /* echo "<a class='nicelink' href=".$link."?tag=brenknow-20><img class='kindlebuttonimage' alt='BUY NOW AT AMAZON.COM' src='/kindlelogo1.jpg' height=33 width=125</img></a><br/>"; AddLink($link,'kindlebuttonimage', 'BUY NOW AT AMAZON.COM', "kindlelogo1.jpg"); } else if ($key==="print_link") { /* echo "<a class='nicelink' href=".$link."?tag=brenknow-20><img class='kindlebuttonimage' alt='BUY PRINT NOW AT AMAZON.COM' src='/images/kindleprint.jpg' height=33 width=125</img></a><br/>"; AddLink($link,'kindlebuttonimage', 'BUY PRINT NOW AT AMAZON.COM', "kindleprint.jpg"); } else
//操作日志 insert_dolog("lid=" . $lid . "<br>lname=" . $r[lname]); printerror("DelLinkSuccess", "ListLink.php?classid={$cid}" . hReturnEcmsHashStrHref2(0)); } else { printerror("DbError", "history.go(-1)"); } } $enews = $_POST['enews']; if (empty($enews)) { $enews = $_GET['enews']; } if ($enews) { hCheckEcmsRHash(); } if ($enews == "AddLink") { AddLink($_POST, $logininid, $loginin); } elseif ($enews == "EditLink") { EditLink($_POST, $logininid, $loginin); } elseif ($enews == "DelLink") { $lid = $_GET['lid']; $cid = $_GET['cid']; DelLink($lid, $cid, $logininid, $loginin); } else { } $search = $ecms_hashur['ehref']; $page = (int) $_GET['page']; $page = RepPIntvar($page); $start = 0; $line = 16; //每页显示条数 $page_line = 25;
/** * Обработчик действия: Отдает таблицу с элементами текущего уровня. */ function getGrid() { $form = new A_Form("module_pages_grid.tpl"); $curdir = (int) A_Session::get(SECTION . "_cid", 0); $rows = (int) A_Session::get(SECTION . "_rows", isset($_COOKIE[SECTION . '_rows']) ? $_COOKIE[SECTION . '_rows'] : 20); $form->data['seo'] = getStructureByPlugin('seo'); $form->data['title'] = $this->getPath($curdir); $form->data['pages'] = array(); $pager = new A_Pager($rows, "gopage"); $pager->query("SELECT * FROM " . SECTION . " WHERE idker={$curdir} ORDER BY sort"); if ($curdir > 0 && ($row = A::$DB->getRowById($curdir, SECTION))) { $grow[0] = " "; $grow[1] = AddImageButton("/templates/admin/images/back.gif", "indir({$row['idker']})", "Уровень выше", 16, 16); $grow[2] = AddClickText("...", "indir({$row['idker']})"); $grow[3] = $grow[5] = $grow[6] = $grow[7] = $grow[8] = " "; $grow[4] = 0; $form->data['sub'] = true; $form->data['pages'][] = $grow; } else { $form->data['sub'] = false; } $crows = 0; while ($row = $pager->fetchRow()) { $grow[0] = "<input type=\"checkbox\" id=\"checkp{$crows}\" name=\"checkpages[]\" value=\"{$row['id']}\"/>"; $grow['link'] = pages_createItemLink($row['id'], SECTION); if ($row['type'] == 'dir') { $grow[1] = AddImage("/templates/admin/images/dir.gif", 16, 16); $grow[2] = AddLink(truncate($row['name'], 100), "javascript:indir({$row['id']})", "Войти в подраздел"); $grow[3] = " "; $grow[4] = $row['date']; $grow[5] = AddImageButton("/templates/admin/images/edit.gif", "geteditdirform({$row['id']})", "Редактировать", 16, 16); $grow[6] = AddImageButtonLink("/templates/admin/images/browse.gif", $grow['link'], "Просмотр на сайте", 16, 16, ' target="_blank"'); } else { $grow[1] = AddImage("/templates/admin/images/text.gif", 16, 16); $grow[2] = AddLink(truncate($row['name'], 100), "javascript:geteditpageform({$row['id']})", "Редактировать"); $grow[3] = "<a href=\"javascript:edittpl('{$row['template']}')\" title=\"Редактировать шаблон\">{$row['template']}</a>"; $grow[4] = $row['date']; $grow[5] = " "; $grow[6] = AddImageButtonLink("/templates/admin/images/browse.gif", $grow['link'], "Просмотр на сайте", 16, 16, ' target="_blank"'); } $grow[7] = AddImageButton("/templates/admin/images/move.gif", "getmoveform({$row['id']})", "Переместить", 16, 16); $grow[8] = AddImageButton("/templates/admin/images/del.gif", "delitem({$row['id']},'{$row['urlname']}')", "Удалить", 16, 16); $grow['id'] = $row['id']; $grow['active'] = $row['active']; $form->data['pages'][] = $grow; $crows++; } $pager->free(); $form->data['pager'] = $pager; $this->RESULT['html'] = $form->getContent(); }