Пример #1
0
 function Delete($ID)
 {
     global $DB, $CACHE_MANAGER;
     $err_mess = CVote::err_mess() . "<br>Function: Delete<br>Line: ";
     $ID = intval($ID);
     CVote::Reset($ID);
     if (VOTE_CACHE_TIME !== false) {
         $CACHE_MANAGER->CleanDir("b_vote_channel");
     }
     $res = $DB->Query("DELETE FROM b_vote WHERE ID='{$ID}'", false, $err_mess . __LINE__);
     return $res;
 }
Пример #2
0
        if (!$date_end_2_stm && strlen(trim($find_date_end_2)) > 0) {
            $bGotErr = true;
            $lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_END_DATE_TILL"));
        }
        if (!$bGotErr && $date_end_2_stm <= $date_end_1_stm && strlen($date_end_2_stm) > 0) {
            $bGotErr = true;
            $lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_END_FROM_TILL"));
        }
    }
    return $bGotErr ? false : true;
}
/********************************************************************
				ACTIONS
********************************************************************/
if (intval($reset_id) > 0 && $VOTE_RIGHT >= "W" && check_bitrix_sessid()) {
    CVote::Reset($reset_id);
}
InitBVar($find_id_exact_match);
InitBVar($find_channel_exact_match);
InitBVar($find_title_exact_match);
InitBVar($find_description_exact_match);
if (CheckFilter()) {
    $arFilter = array("ID" => $find_id, "ID_EXACT_MATCH" => $find_id_exact_match, "ACTIVE" => $find_active, "DATE_START_1" => $find_date_start_1, "DATE_START_2" => $find_date_start_2, "DATE_END_1" => $find_date_end_1, "DATE_END_2" => $find_date_end_2, "LAMP" => $find_lamp, "CHANNEL_ID" => $find_channel_id, "CHANNEL" => $find_channel, "CHANNEL_EXACT_MATCH" => $find_channel_exact_match, "TITLE" => $find_title, "TITLE_EXACT_MATCH" => $find_title_exact_match, "DESCRIPTION" => $find_description, "DESCRIPTION_EXACT_MATCH" => $find_description_exact_match, "COUNTER_1" => $find_counter_1, "COUNTER_2" => $find_counter_2);
}
if ($lAdmin->EditAction() && $VOTE_RIGHT >= "W" && check_bitrix_sessid()) {
    foreach ($FIELDS as $ID => $arFields) {
        if (!$lAdmin->IsUpdated($ID)) {
            continue;
        }
        $ID = intVal($ID);
        $arFieldsStore = array("ACTIVE" => $arFields['ACTIVE'], "C_SORT" => $arFields['C_SORT'], "TITLE" => $arFields['TITLE'], "CHANNEL_ID" => $arFields['CHANNEL_ID']);