예제 #1
0
파일: event.php 프로젝트: u0mo5/app
<?php

include_once "connect.php";
$action = $_GET['action'];
$id = (int) $_GET['id'];
switch ($action) {
    case 'add':
        addform();
        break;
    case 'edit':
        editform($id);
        break;
}
function addform()
{
    $date = $_GET['date'];
    $enddate = $_GET['end'];
    if ($date == $enddate) {
        $enddate = '';
    }
    if (empty($enddate)) {
        $display = 'style="display:none"';
        $enddate = $date;
        $chk = '';
    } else {
        $display = 'style=""';
        $enddate = $date;
        $chk = 'checked';
    }
    $enddate = empty($_GET['end']) ? $date : $_GET['end'];
    ?>
예제 #2
0
require 'global.php';
headhtml();
echo '<div class="nav" style="display:;"><a href="?">首页</a><a href="?action=addform&p_cid=';
echo $p_cid;
echo '">添加</a></div>
';
$action = $_GET['action'];
switch ($action) {
    case 'saveform':
        saveform();
        break;
    case 'addform':
        addform($action);
        break;
    case 'modify':
        addform($action);
        break;
    case 'del':
        $db->query("delete from ve123_dh_goodlinks where link_id='" . intval($_GET['link_id']) . "'");
        break;
}
echo '<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tablebg">

  <tr>
    <th width="50">ID</th>
    <th>分类名称</th>
    <th width="80">操作</th>
  </tr>
  ';
$result = $db->query('select * from ve123_dh_goodlinks');
while ($rs = $db->fetch_array($result)) {
예제 #3
0
function lang_answer($trailinfo)
{
    global $HTTP_POST_VARS, $mytrail;
    $trailinfo = unserialize(base64_decode($trailinfo));
    if ($HTTP_POST_VARS['yes']) {
        if ($trailinfo['trail_id'] != -1) {
            edit($mytrail, $trailinfo['description'], $trailinfo['title'], true, $trailinfo['act_as_admin']);
        } else {
            create($trailinfo['kat'], $trailinfo['title'], $trailinfo['description'], true);
        }
    } else {
        if ($trailinfo['trail_id'] != -1) {
            editform($trailinfo);
        } else {
            addform($trailinfo);
        }
    }
}