Esempio n. 1
0
						              <tr>
						                <th class="table-check"><input type="checkbox" /></th>
										<th class="table-id">ID</th>
										<th class="table-title">标题</th>
										<th class="table-date am-hide-sm-only">修改日期</th>
										<th class="table-set">操作</th>
						              </tr>
						          </thead>
								<tbody>';
//内容区
if ($_SERVER['HTTP_HOST'] == 'localhost') {
    $uri = 'http://localhost/sunset/application/controllers/api/subject.php?page=all';
} else {
    $uri = '120.25.250.200/application/controllers/api/subject.php?page=all';
}
$re = getFn($uri);
$r = json_decode($re, TRUE);
$data = $r['data'];
$h = null;
foreach ($data as $key => $value) {
    $h .= '<tr id=>
						              <td><input type="checkbox" /></td>
						              <td >' . $value['id'] . '</td>
						              <td><a href="' . $value['subjectURL'] . '" target="_blank">' . $value['subjectName'] . '</a></td>
						              <td class="am-hide-sm-only">' . $value['subjectTime'] . '</td>
						              <td>
						                <div class="am-btn-toolbar">
						                  <div class="am-btn-group am-btn-group-xs">
						              		<a href="../api/admin/subjectDel.php?id=' . $value['id'] . '">删除</a>
						                  </div>
						                </div>
Esempio n. 2
0
            $p = null;
        } elseif ($p == "?") {
            $showUsage = true;
            break;
        }
    }
    if ($showUsage) {
        print "Usage:\n";
        showMethod($fn);
        return;
    }
    $fn->invokeArgs(new WebAPI(true), $params);
}
#}}}
####### main routine {{{
if ($argc < 2) {
    help();
    exit;
}
$fn = getFn($argv[1]);
if (is_null($fn)) {
    showMethods($argv[1]);
    exit;
}
try {
    callFn($fn, array_slice($argv, 2));
} catch (Exception $e) {
    echo "\n*** ERROR: {$e}\n";
}
#}}}
# vim: set foldmethod=marker :