Beispiel #1
0
 function Delete($ID)
 {
     global $DB;
     $codes = new CHotKeysCode();
     $res = CFavorites::GetByID($ID);
     while ($arFav = $res->Fetch()) {
         $codes->Delete($arFav["CODE_ID"]);
     }
     return $DB->Query("DELETE FROM b_favorite WHERE ID='" . intval($ID) . "'", false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
 }
Beispiel #2
0
		{
			$rsData = $hotKeyCodes->GetList(array($by=>$order), $arFilter);
			while($arRes = $rsData->Fetch())
				$arID[] = $arRes['ID'];
		}

		foreach($arID as $ID)
		{
			$ID = IntVal($ID);

			if($ID <= 0)
				continue;
			switch($_REQUEST['action'])
			{
				case "delete":
					if(!$hotKeyCodes->Delete($ID))
						$lAdmin->AddGroupError(GetMessage("HK_DELETION_ERROR"), $ID);
					break;
			}
		}
	}
}

$rsData = $hotKeyCodes->GetList(array($by=>$order), $arFilter,false);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("HK_NAVIGATION")));

$aHeaders = array(
	array("id"=>"ID", "content"=>GetMessage("HK_ID"), "sort"=>"id", "default"=>false),
	array("id"=>"CLASS_NAME", "content"=>GetMessage("HK_CLASS_NAME"), "sort"=>"class_name", "default"=>true),