function orderTabs($tid, $inc, $option) { global $_CB_database, $_CB_framework; $row = new moscomprofilerTabs($_CB_database); $row->load((int) $tid); if (!$_CB_framework->acl->amIaSuperAdmin()) { if (!in_array($row->useraccessgroupid, $_CB_framework->acl->get_groups_below_me(null, true))) { echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n"; exit; } } $row->move($inc, "position='{$row->position}' AND ordering > -10000 AND ordering < 10000 "); cbRedirect($_CB_framework->backendUrl("index.php?option={$option}&task=showTab")); }
function orderTabs( $tid, $inc, $option ) { global $_CB_database, $_CB_framework; $row = new moscomprofilerTabs( $_CB_database ); $row->load( (int) $tid ); if ( ! in_array( $row->useraccessgroupid, getChildGIDS( userGID( $_CB_framework->myId() ) ) ) ) { echo "<script type=\"text/javascript\"> alert('" . addslashes( CBTxt::T('Unauthorized Access') ) . "'); window.history.go(-1);</script>\n"; exit; } $row->move( $inc, "position='$row->position' AND ordering > -10000 AND ordering < 10000 " ); cbRedirect( $_CB_framework->backendUrl( "index.php?option=$option&task=showTab" ) ); }