예제 #1
0
function homePage()
{
    $t = new Template('home.html');
    $t->replace('BACKGROUND', $_SESSION['userconf']['general']['background']);
    $t->replace('CSS', 'css.html');
    $t->replace('NAVBAR', 'navbar.html');
    $t->replace('DATA_COUNT', DataC::getCount($_SESSION['userid']));
    $t->replace('FEED_COUNT', FeedC::getCount($_SESSION['userid']));
    $t->replace('RUNNING_COUNT', FeedC::getRunningCount($_SESSION['userid']));
    $t->replace('PLUGIN', PluginC::getHTML());
    $t->replace('FEED_ALL', FeedC::getAllHTML($_SESSION['userid']));
    $t->replace('MODAL_DDROP', 'modal_ddrop.html');
    $t->replace('MODAL_TAG', 'modal_tag.html');
    $t->replace('TAGS_LIST', TagC::getTagsList());
    $t->replace('PLUGINS_LIST', PluginC::getPluginsList());
    $t->replace('MODAL_PREVIEW', 'feed_data_preview.html');
    $t->replace('FOOTER', 'footer.html');
    $t->replace('JAVASCRIPT_LIBS', 'javascript.libs.php');
    $t->replace('JAVASCRIPT_CHRIS', 'javascript.chris.html');
    $t->replace('USERNAME', ucfirst($_SESSION['username']));
    $t->replace('CHRIS_VERSION', CHRIS_VERSION);
    // ui
    $t->replace('CHRIS_UI_CHECKBOX', 'ui_checkbox.html');
    if (CHRIS_MAINTENANCE) {
        $t->replace('MAINTENANCE', 'display:block');
    } else {
        $t->replace('MAINTENANCE', 'display:none');
    }
    return $t;
}
예제 #2
0
     break;
 case "count":
     if ($what == 'feed') {
         $result['result'] = FeedC::getCount($_SESSION['userid']);
     } else {
         if ($what == 'data') {
             $result['result'] = DataC::getCount($_SESSION['userid']);
         } else {
             if ($what == 'running') {
                 $result['result'] = FeedC::getRunningCount($_SESSION['userid']);
             } else {
                 if ($what == 'datafeedrunning') {
                     $result['result'] = array();
                     $result['result'][] = DataC::getCount($_SESSION['userid']);
                     $result['result'][] = FeedC::getCount($_SESSION['userid']);
                     $result['result'][] = FeedC::getRunningCount($_SESSION['userid']);
                 }
             }
         }
     }
     break;
 case "set":
     if ($what == 'feed_status') {
         $result['result'] = FeedC::status($_POST['feedid'], $_POST['status'], $_POST['op']);
     }
     if ($what == 'tag') {
         $result['result'] = FeedC::tag($_POST['feedid'], $_POST['tagid'], $_POST['remove']);
     } else {
         if ($what == 'feed_favorite') {
             $result['result'] = FeedC::favorite($id);
         } else {