<?php } ?> </table> <?php echo "<center><b><font size='+1'><a href='?p={$p}&page={$page}&action=add&act={$act}'>Добавить новость</a></font></b></center>"; echo "<center><b><a href='?p={$p}'>Назад</a></b></center>"; } else { switch ($action) { //-------------------------// //----------ADD------------// //-------------------------// case "add": if (!isset($editor)) { $editor = "html"; } $id = get_serial(); // $a = 1 - значит "добавлнеие", а не "редавктирование" ?> <form action="<?php echo "?p={$p}&page={$page}&action=save&id={$id}&editor={$editor}&a=1&act={$act}"; ?> " method=post id="EditForm" enctype="multipart/form-data"> <table width=100%> <tr><td class=tbl1 width=50%>Название:</td><td class=tbl1 width=50%><input style="width:100%" type=text name='head' value=''><br><small>Пример: Новость №1</small></td></tr> <tr><td class=tbl1 width=50%>Автор:</td><td class=tbl1 width=50%><?php OUT($CURRENT_USER["nick"]); ?> </td></tr> <tr><td class=tbl1 width=50%>Время:</td><td class=tbl1 width=50%><input style="width:100%" type=text readonly name='date' value="<?php echo norm_date(time());
$header_button_left_text = "업데이트"; $header_button_left_link = $app_link . "\" data-theme=\"e\" style=\"width:80px;border-radius:7px;"; } else { $header_button_left_text = "ver" . get_session('ss_app'); $header_button_left_link = "#\" data-theme=\"b\" style=\"width:80px;border-radius:7px; color:white"; } } else { //웹으로 보는 중... $header_button_left_text = "앱설치"; $header_button_left_link = $app_link . "\" style=\"width:80px;border-radius:7px;"; } $header_subtitle = " "; if (!$is_project) { $url_short = "http://" . $domain . "/" . $view[wr_id]; } else { $result_serial = get_serial($wr_id, $bo_table); $url_short = "http://myme.kr/" . $result_serial; } if ($project['code'] == 'election' && get_cookie('ss_coords') && get_cookie('ss_address1') && get_cookie('ss_address2') && get_cookie('ss_address3')) { preg_match("/오늘:(.*),어제:(.*),최대:(.*),전체:(.*)/", $config[cf_visit], $visit); $header_subtitle = "<span style='float:left; padding-left:10px;'>위치: " . get_cookie('ss_address1') . " " . get_cookie('ss_address2') . " " . get_cookie('ss_address3') . "</span><span style='float:right;padding-right:10px;'>조회수: " . number_format($visit[4] + 1500000) . "</span><br style='clear:both'/>"; } if ($project['code'] != 'election' && $wr_id == 1) { $header_subtitle = "http://<span style='color:yellow'>" . $project['code'] . "</span>." . "kr"; } if ($project['code'] == 'mhm' && $wr_id == 1) { $header_subtitle = "http://" . $_SERVER['HTTP_HOST']; } if ($project_code == "one" && $wr_id == 2) { $header_subtitle = "농협 257-01-167696 (주)모아"; }
function add_message($name, $email, $url, $time, $ip, $text) { $result .= $name . $this->item_separator . $email . $this->item_separator . $url . $this->item_separator . $time . $this->item_separator . $ip . $this->item_separator . $text; $file_name = get_serial() . ".txt"; // записываем в файл $DIR = $this->premoderation ? $this->pre_dir : $this->data_dir; $fp = fopen($DIR . "/" . $file_name, "w+"); if (!$fp) { return false; } if (!fwrite($fp, $result)) { return false; } fclose($fp); return true; }
# Post: Ping ####################################### # If the PING field is set, then this was just a # test. Exit successfully. if (isset($_POST['PING'])) { print "Ping successful.\n"; exit(0); } $marker = "==="; ####################################### # Post: Serial ####################################### # If the SERIAL field is set, then the client just # needs a serial. Exit successfully. if (isset($_POST['SERIAL'])) { print "\n{$marker} client_serial = " . stringify(get_serial()) . " {$marker}\n"; pg_close(); exit(0); } ####################################### # Post: Data ####################################### # The client will only submit one gzip file at a time for # now. Initialize the _POST global with the uploaded gzip # file contents. (There is backcompatibility here. E.g., if # there is no uploaded file, then we assume its an # oldfangled regular _POST submission) define("undef", ""); if (sizeof($_FILES)) { $include_file = gunzip_file($_FILES['userfile']['tmp_name']); include_once $include_file;