Beispiel #1
0
function P_I_DB($typeid = 0, $tplid = 0, $inputname = '', $w = 0, $h = 0, $value = '', $type6 = 0)
{
    global $db;
    $tpl = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "project_from where typeid='" . $typeid . "' and tplid='" . $tplid . "' and inputname='" . $inputname . "'  ORDER BY fromid Asc");
    if ($tpl['inputtype'] == '0') {
        if ($tpl["inputtype1"] == '1') {
            echo get_project_input($tpl["inputname"], $w, $h, $tpl['inputvalue']);
        } elseif ($tpl["inputtype1"] == '2') {
            echo get_project_textarea($tpl["inputname"], $w, $h, $tpl['inputvalue']);
        } elseif ($tpl["inputtype1"] == '3') {
            echo get_project_radio($tpl["inputname"], $tpl["inputvaluenum"], $tpl['inputvalue']);
        } elseif ($tpl["inputtype1"] == '4') {
            echo get_project_checkbox($tpl["inputname"], $tpl["inputvaluenum"], $tpl['inputvalue']);
        } elseif ($tpl["inputtype1"] == '5') {
            echo get_project_select($tpl["inputname"], $tpl["inputvaluenum"], $tpl['inputvalue']);
        }
    } elseif ($tpl["inputtype"] == '1') {
        public_upload($tpl["inputname"], $w, $h);
    } elseif ($tpl["inputtype"] == '2') {
        public_upload($tpl["inputname"], $w, $h);
    } elseif ($tpl["inputtype"] == '3') {
        echo get_project_date($tpl["inputname"], $w, $h);
    } elseif ($tpl["inputtype"] == '4') {
        $_USER = new User();
        get_depabox(1, $tpl["inputname"], get_depauseridname($_USER->id), "+选择部门", $w, $h);
    } elseif ($tpl["inputtype"] == '5') {
        get_pubuser(1, $tpl["inputname"], "", "+选择人员", $w, $h);
    } elseif ($tpl["inputtype"] == '6') {
        if ($type6 != 0) {
            echo '<textarea name="' . $tpl["inputname"] . '[]" style="width:' . $w . 'px;font-size:14px;" rows="' . $h . '">' . $value . '</textarea>';
        } else {
            echo '<input type="text" name="' . $tpl["inputname"] . '[]" style="border:1px;line-height:' . $h . 'px;width:' . $w . 'px;height:' . $h . 'px;font-size:14px;" value="' . $value . '" />';
        }
    }
}
Beispiel #2
0
            $title = '新建日志信息';
            get_logadd($id, $content, $title, 11, $_USER->id);
        }
        show_msg('日志信息操作成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '');
    } else {
        $id = getGP('id', 'G', 'int');
        if ($id != '') {
            $user = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "blog  WHERE id = '{$id}' ");
            get_key('date_blog_edit');
            $date = $user['date'];
            $_title['name'] = '编辑';
        } else {
            get_key('date_blog_Increase');
            $date = get_date('Y-m-d', PHP_TIME);
            $user['type'] = '2';
            $user['title'] = get_realname($_USER->id) . '[' . get_depauseridname($_USER->id) . ']' . ' ' . get_date('Y-m-d', PHP_TIME) . ' 工作日志';
            $_title['name'] = '发布';
        }
        include_once 'template/blogadd.php';
    }
} elseif ($do == 'views') {
    $id = getGP('id', 'G', 'int');
    if ($_POST['view'] != '') {
        $bbsid = getGP('bbsid', 'P');
        $title = check_str(getGP('title', 'P'));
        $author = getGP('author', 'P');
        $content = getGP('content', 'P');
        $type = getGP('type', 'P');
        $enddate = get_date('Y-m-d H:i:s', PHP_TIME);
        $uid = $_USER->id;
        //主表信息