本文整理汇总了PHP中categories::update方法的典型用法代码示例。如果您正苦于以下问题:PHP categories::update方法的具体用法?PHP categories::update怎么用?PHP categories::update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类categories
的用法示例。
在下文中一共展示了categories::update方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Categories
function Categories($act = 'getlist', $val = '', $adminPanel = 'NULL')
{
global $db, $smarty, $conf;
$categories = new categories();
switch ($act) {
case 'getlist':
$output = $categories->build_list($val);
break;
case 'getlistcollapsed':
$output = $categories->build_list($val, "collapsed");
break;
case 'getsubcat':
$output = $categories->browse_by_id($val);
break;
case 'getParent':
$output = $categories->getParent($val);
break;
case 'add':
$output = $categories->add_new($val['parent'], $val["name"], $val["desc"], $val["icon"], $val["strip"]);
break;
case 'update':
$output = $categories->update($val['id'], $val['parent'], $val["name"], $val["desc"], $val["icon"], $val["strip"]);
break;
case 'delete':
$output = $categories->deleteCat($val['catFrom'], $val['catTo'], $val["cat_action"]);
break;
case 'getOne':
$output = $categories->getOne($val);
break;
case 'html':
if ($adminPanel === true) {
$categories->HtmlTree = array("header" => "<ul class='unstyled'>", "BodyUnselected" => '<li> [prefix] <a href="' . $conf['baseurl'] . '/admincp/categories/?catid=[id]&tokenAdmin=' . $_COOKIE['tokenAdmin'] . '"> [name] </a> </li>', "BodySelected" => '<li> [prefix] <a href="' . $conf['baseurl'] . '/admincp/categories/?catid=[id]&tokenAdmin=' . $_COOKIE['tokenAdmin'] . '"><strong><font color="#000000">[name]</font></strong></a> </li>', "footer" => '</ul>');
} else {
$categories->HtmlTree = array("header" => "<ul class='nav nav-tabs nav-stacked'>", "BodyUnselected" => '<li> <a href="' . $conf['baseurl'] . '/' . $this->makeUrl(array('page' => 'torrents', 'cat' => 'categorie', 'catid' => '[id]')) . '"> [name] </a> </li>', "BodySelected" => '<li> <a href="' . $conf['baseurl'] . '/' . $this->makeUrl(array('page' => 'torrents', 'cat' => 'categorie', 'catid' => '[id]')) . '"><strong><font color="#000000">[name]</font></strong></a> </li>', "footer" => '</ul>');
}
$output = $categories->html_output($val);
break;
}
return $output;
}