コード例 #1
0
ファイル: detail.php プロジェクト: roycefu/MIT-Mobile-Web
<?php
$docRoot = getenv("DOCUMENT_ROOT");

require_once $docRoot . "/mobi-config/mobi_web_constants.php";
require_once WEBROOT . "page_builder/page_header.php";
require_once LIBDIR . "StellarData.php";
require_once WEBROOT . "stellar/stellar_lib.php";

$class_id = $_REQUEST['id'];
$class = StellarData::get_subject_info($class_id);
$term = StellarData::get_term_text();
$term_id = StellarData::get_term();

$tabs = new Tabs(selfURL(), 'tab', array('News', 'Info', 'Staff'));

$back = $_REQUEST['back'];

/* My Stellar actions */
$mystellar = getMyStellar()->allTags;
$class_data = $class_id . " " . $term_id;

if(in_array($class_data, $mystellar)) { 
  $toggle = "ms_on";
  $mystellar_img = 'mystellar-on';
  $action = 'remove';
} elseif (!in_array($class_data, $mystellar)) {
  $toggle = "ms_off";
  $mystellar_img = 'mystellar-off';
  $action = 'add';
}