Пример #1
0
 function setPosition(ArgumentList $args)
 {
     //     	$this->updateParams();
     $id = $args->getInt("id");
     $move = $args->getArgument("move");
     if ($move == "up") {
         $this->getStatement()->update('sc_news', array("position=position+1"), "id=" . $id);
     }
     if ($move == "down") {
         $this->getStatement()->update('sc_news', array("position=position-1"), "id=" . $id);
     }
     $this->callSelfComponent();
 }
Пример #2
0
 function setPosition(ArgumentList $args)
 {
     $id = $args->getInt('id');
     $move = $args->getArgument('move');
     $rs = $this->getStatement()->execute("select * from sc_module where mod_id=" . $id);
     if ($rs->next()) {
         if ($move == "up") {
             $this->getStatement()->up('sc_module', $id, "mod_parent_id='" . $rs->get("mod_parent_id") . "'", 'mod_id', 'mod_position');
         }
         if ($move == "down") {
             $this->getStatement()->down('sc_module', $id, "mod_parent_id='" . $rs->get("mod_parent_id") . "'", 'mod_id', 'mod_position');
         }
     }
     //Очистим кеш
     //		$this->getStatement()->delete('sc_cache',"name='ModuleManager::module'");
     $this->callSelfComponent();
 }
Пример #3
0
 function onChangeStatus(ArgumentList $args)
 {
     global $ST;
     $ST->update('sc_shop_item', array('status' => $args->getInt('status')), "id=" . $args->getInt('id'));
     $this->callSelfComponent();
 }