示例#1
0
    switch ($action) {
        case "remove":
            project_remove($_GET['project_id']);
            break;
        case "all":
            project_all($_POST);
            break;
    }
}
if (isset($_GET['PB_page'])) {
    $current_page = intval($_GET['PB_page']);
} else {
    $current_page = 1;
}
//echo "current_page: ".$current_page;
$project_rs = get_project_list();
$project_count = count($project_rs);
//echo "<br>project_count: ".$project_count;
// 打印表头
function print_project_head()
{
    echo "<th>项目</th><th>管理者</th><th>成员</th><th>开始日期</th><th>截止日期</th><th>标签</th><th>操作</th>";
}
// 打印本页数据
function print_project_rows($project_count, $page_size, $current_page, $project_rs)
{
    if ($project_count < $page_size) {
        for ($i = 0; $i <= $project_count - 1; $i++) {
            print_single_row($project_rs[$i]);
        }
    } else {
示例#2
0
        $data[$i]['options']['type'] = 'hotspot';
        if ($main_data[$i]['action_type'] == 'linkToPvr') {
            $data[$i]['options']['linkedPvr'] = $main_data[$i]['linked_pvr_id'];
        } else {
            if ($main_data[$i]['action_type'] == 'showInform') {
                $data[$i]['options']['textInfo'] = $main_data[$i]['html'];
            }
        }
    }
    echo json_encode($data, JSON_NUMERIC_CHECK);
}
if ($_GET['req'] == "getProjectList") {
    $data = array();
    $user = get_user_data($_GET['data']['userId']);
    if ($user['user_type'] != "viewer") {
        $ret = get_project_list($_GET['data']['userId']);
    } else {
        $ret = get_all_projects_of_real_estate();
    }
    for ($i = 0; $i < count($ret); $i++) {
        $project = array();
        $project['id'] = $ret[$i]['project_id'];
        $project['name'] = $ret[$i]['project_name'];
        array_push($data, $project);
    }
    echo json_encode($data, JSON_NUMERIC_CHECK);
}
if ($_GET['req'] == "getPvrListOfProject") {
    session_start();
    $data = array();
    $row = get_pvrs_of_project($_GET['data']['projectId']);
示例#3
0
switch ($_GET['req']) {
    case 'checkLoginPassword':
        $login = $_GET['login'];
        $password = $_GET['password'];
        $match = FALSE;
        $ret = get_user_data($login);
        if ($ret['password'] == $password) {
            $match = TRUE;
        }
        // make a function that check if login and password match
        // $match = checkLoginPassword($login, $password);
        echo $match;
        break;
    case 'getUserProjects':
        $user = $_GET['user'];
        $projects = get_project_list($user);
        // make a function that returns all the projects of the user
        // I m now using this $page_url = url('http://localhost:8888/getData.php?req=getProjectList&data%5BuserId%5D='.$user);
        // $projects = getUserProjects($user);
        echo json_encode($projects, JSON_NUMERIC_CHECK);
        break;
    case 'getProjectEditIframe':
        $project = $_GET['project'];
        $iframe = "project_edit.php?project={$project}";
        // make a function that returns an iframe of a project edition
        // maybe adding in parameters the login and password ?
        // $iframe = getEditIframe($project);
        echo $iframe;
        break;
    case 'getProjectDisplayIframe':
        $project = $_GET['project'];
&nbsp;&nbsp;<input type="submit" value="Delete" name="delete_project" />
                </p>
                </form>
              </div>
              <div class="hero-unit">
                <h4>2) Add Unassigned Risks to Projects</h4>
                <p>Drag and drop unassigned risks marked for consideration as a project into the appropriate project tab.</p>
                <?php 
get_project_tabs();
?>
              </div>
              <div class="hero-unit">
                <h4>3) Prioritize Projects</h4>
                <p>Move projects around and change the order of prioritization.  Once finished, don't forget to press the &quot;Update&quot; button to save your changes.</p>
                <?php 
get_project_list();
?>
              </div>
<!--
              <div class="hero-unit">
                <h4>4) Determine Project Status</h4>
                <p>Place projects into buckets based on their current status.</p>
                <?php 
get_project_status();
?>
              </div>
-->
            </div>
          </div>
        </div>
      </div>