<?php /************************************************************************/ /* Авторизация v1.oo */ /************************************************************************/ if (!isset($body)) { die('error: this is a pluggable module and cannot be used standalone.'); } // -------------------------------- login promt ------------------------------------ // if (!postb('f_login')) { b('<p class="h1">Авторизация</p>'); b(); b(); b(); // action="/'.$mod.'/" b('<form name="auth" enctype="multipart/form-data" method="post" onsubmit=" //event.preventDefault(); $.ajax(this.action, function(r) { if (r == 1) { window.location = \'/\'; } else if (r == 2) { $.id(\'login\').style.backgroundColor = \'#fbb\'; } else if (r == 3) { $.id(\'login\').style.backgroundColor = \'#fbb\'; $.id(\'password\').style.backgroundColor = \'#fbb\'; }
//b('mime:'); //b('<td>'); //b(form_t('f_file_mime', $file['mime'], 50)); //b('<tr><td>'); //b('Дата, время загрузки:'); //b('<td>'); //b(form_dt(array('f_file_dtu_y;2000', 'f_file_dtu_m', 'f_file_dtu_d', 'f_file_dtu_h', 'f_file_dtu_i', 'f_file_dtu_s'), $file['dtu'] )); b('</table>'); b(form_sb()); b('</form>'); } // ------------------------------------------- ajax: update ------------------------------------------------ // if ($act == 'flu' && p('edit')) { $ajax = TRUE; //http_response_code(418); $post = postb('f_file_name'); $table = 'file'; $where = '`id` = ' . $gfle; if ($post) { $set = array(); $set['url'] = post('f_file_url'); $set['name'] = post('f_file_name'); //$set['namei'] = post('f_file_namei'); $set['namei'] = mb_convert_case($set['name'], MB_CASE_LOWER); $set['desc'] = post('f_file_desc'); //$set['mime'] = postn('f_file_mime'); //$set['size'] = postn('f_file_size'); //$set['width'] = postn('f_file_width'); //$set['height'] = postn('f_file_height'); //$set['dtu'] = datesql(postn('f_file_dtu_y'), postn('f_file_dtu_m'), postn('f_file_dtu_d'), postn('f_file_dtu_h'), postn('f_file_dtu_i'), postn('f_file_dtu_s')); $set['owner'] = post('f_file_owner');
b('<td>'); b(form_t('f_page_url', $page['url'], 200)); b('<tr><td>'); b('Контент:'); b('<td>'); b('</table>'); //b(form_t('f_page_desc', $page['desc'], 300)); b('<textarea name="f_page_content" style="width: 1340px; height: 380px; resize: none;" autofocus>' . htmlspecialchars($page['content']) . '</textarea>'); b(form_sb()); b('</form>'); } // ------------------------------------------- ajax: update ------------------------------------------------ // if ($act == 'pgu') { $ajax = TRUE; //http_response_code(418); $post = postb('f_page_title'); $table = 'page'; $where = '`id` = ' . $gpg; if ($post) { $set = array(); $set['url'] = post('f_page_url'); $set['title'] = post('f_page_title'); $set['content'] = postr('f_page_content'); if ($gpg) { db_write(array('table' => $table, 'set' => $set, 'where' => $where)); } else { db_write(array('table' => $table, 'set' => $set)); } b('/' . $mod . '/'); } // ---- deletion ---- //