<?php /* ==================== [BEGIN_SED_EXTPLUGIN] Code=hidefuturepages Part=admin File=hidefuturepages.admin.page.queue.validate Hooks=admin.page.queue.validate Tags= Order=10 [END_SED_EXTPLUGIN] ==================== */ defined('SED_CODE') or die('Wrong URL'); $sql_select_page = sed_sql_query("SELECT page_state, page_id, page_cat, page_begin FROM {$db_pages} WHERE page_id='{$id}' LIMIT 1"); $result = sed_sql_fetchassoc($sql_select_page); if ((int) $result['page_begin'] > (int) $sys['now_offset'] && (int) $result['page_state'] == 1) { sed_block(sed_auth('page', $result['page_cat'], 'A')); $id = (int) $id; $sql = sed_sql_query("UPDATE {$db_pages} SET page_state='3' WHERE page_id='{$id}'"); sed_cache_clear('latestpages'); $adminwarnings = '#' . $id . ' - ' . $L['adm_queue_validated']; sed_redirect(sed_url('admin', 'm=page&s=queue', NULL, TRUE)); }
sed_cache_clear('latestpages'); header("Location: list.php?c=" . $row['page_cat']); exit; } else { sed_die(); } } $sql = sed_sql_query("SELECT * FROM {$db_pages} WHERE page_id='{$id}' LIMIT 1"); sed_die(sed_sql_numrows($sql) == 0); $pag = sed_sql_fetcharray($sql); $pag['page_date'] = sed_selectbox_date($pag['page_date'] + $usr['timezone'] * 3600, 'long'); $pag['page_begin'] = sed_selectbox_date($pag['page_begin'] + $usr['timezone'] * 3600, 'long', '_beg'); $pag['page_expire'] = sed_selectbox_date($pag['page_expire'] + $usr['timezone'] * 3600, 'long', '_exp'); list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = sed_auth('page', $pag['page_cat']); $usr['isadmin'] = $pag['page_ownerid'] == $usr['id'] ? TRUE : $usr['isadmin']; sed_block($usr['isadmin']); $page_form_delete = "<input type=\"radio\" class=\"radio\" name=\"rpagedelete\" value=\"1\" />" . $L['Yes'] . " <input type=\"radio\" class=\"radio\" name=\"rpagedelete\" value=\"0\" checked=\"checked\" />" . $L['No']; $page_form_categories = sed_selectbox_categories($pag['page_cat'], 'rpagecat'); $page_form_type = "<select name=\"rpagetype\" size=\"1\">"; $selected0 = $pag['page_type'] == 0 ? "selected=\"selected\"" : ''; $selected1 = $pag['page_type'] == 1 ? "selected=\"selected\"" : ''; $selected2 = $pag['page_type'] == 2 && $usr['maingrp'] == 5 ? "selected=\"selected\"" : ''; $page_form_type .= "<option value=\"0\" {$selected0}>" . $L['Default'] . "</option>"; $page_form_type .= "<option value=\"1\" {$selected1}>HTML</option>"; $page_form_type .= $usr['maingrp'] == 5 && $cfg['allowphp_pages'] ? "<option value=\"2\" {$selected2}>PHP</option>" : ''; $page_form_type .= "</select>"; if ($pag['page_file']) { $page_form_file = "<input type=\"radio\" class=\"radio\" name=\"rpagefile\" value=\"1\" checked=\"checked\" />" . $L['Yes'] . " <input type=\"radio\" class=\"radio\" name=\"rpagefile\" value=\"0\" />" . $L['No']; } else { $page_form_file = "<input type=\"radio\" class=\"radio\" name=\"rpagefile\" value=\"1\" />" . $L['Yes'] . " <input type=\"radio\" class=\"radio\" name=\"rpagefile\" value=\"0\" checked=\"checked\" />" . $L['No']; }