00001 <?php 00015 error_reporting(E_ALL | E_STRICT); 00016 date_default_timezone_set("America/Los_Angeles"); 00017 00018 require_once("models/classTextile.php"); 00019 require_once("models/soc1c.php"); 00020 00021 00022 $conf = new SOC_Configuration("SOC Help","soc1c.conf"); 00023 $soc_uri = $conf->get("soc_uri"); 00024 $soc_path = $conf->get("soc_path"); 00025 $filename = ""; 00026 00027 if (! defined("hu")) { 00028 define('hu',$soc_uri."/"); 00029 } 00030 00031 echo<<<EOF 00032 <html> 00033 <head> 00034 <title>Schedule of Classes Web Services API</title> 00035 00036 <!-- BEGIN default CSS and JS, always put CSS before JS, so that JS can load a 00037 dditional CSS --> 00038 <link rel="stylesheet" href="http://www.usc.edu/assets/css/default.css" type=" 00039 text/css" media="screen" /> 00040 <style type="text/css" media="all">@import url("$soc_uri/css/nav.css");</style 00041 > 00042 <style type="text/css" media="all">@import url("$soc_uri/css/cal_small.css");</style> 00043 <!-- END default CSS and JS, always put CSS before JS so that JS can load addi 00044 toinal CSS --> 00045 00046 <!-- BEGIN Generic SOC CSS/JS --> 00047 <link rel="stylesheet" href="$soc_uri/css/base.css" type="text/css" /> 00048 <link rel="stylesheet" href="$soc_uri/css/nav_base.css" type="text/css" /> 00049 <link rel="stylesheet" href="$soc_uri/css/basic.css" type="text/css" media="all" /> 00050 <!-- END Generic SOC CSS/JS --> 00051 00052 </head> 00053 <body> 00054 <!-- start usc monogram logo --> 00055 <!-- end usc monogram logo --> 00056 00057 <style type="text/css"> 00058 body { margin: 0px; } 00059 .block { display: block } 00060 </style> 00061 <table width="100%" cellspacing="0" cellpadding="0" border="0"> 00062 <tr><td height="25" align="left" valign="top" bgcolor="#990000"> 00063 <a href="http://www.usc.edu"> 00064 <img src="http://www.usc.edu/usc/img/01/usc-name-white-cardinal.gif" border="0" 00065 alt="University of Southern California" class="block" width="255" height="25" /> 00066 </a> 00067 </td></tr></table> 00068 00069 <!-- begin monogram bar --> 00070 <!-- end monogram bar --> 00071 <div class="header"> 00072 <h2>ITS Web Services</h2> 00073 <hr /> 00074 <h1>Schedule of Classes API</h1> 00075 </div> 00076 <hr /> 00077 <p /> 00078 <div style="margin-top:10px;margin-bottom:10px;margin-left:20px;"> 00079 00080 EOF; 00081 00082 if (isset($_SERVER['PATH_INFO']) && trim($_SERVER['PATH_INFO'])) { 00083 $filename = $soc_path."/notes/".trim(substr($_SERVER['PATH_INFO'],1)); 00084 } 00085 00086 if ($filename != "" && file_exists($filename)) { 00087 00088 $soc_uri != false ? $soc_uri = print("<a href='".$conf->get("soc_uri")."/help'>Top</a></ p>\n") : true; 00089 $text = file_get_contents($filename); 00090 $textile = new Textile(); 00091 echo "<div>\n".$textile->TextileThis($text)."\n</div>\n"; 00092 } else { 00093 echo<<<EOF 00094 SOC(Schedule of Classes) API is a web service to integrate Schedule of Classes content into other USC web sites. It is not an end services as such though the on-line Schedule of Classes uses the SOC API. If you want to familiarize yourself with what is available see the <a href='$soc_uri/help/README.txt'>README</a> and <a href='$soc_uri/help/SOC_API.txt'>SOC API</a> docs. 00095 00096 <h3>Developer</h3> 00097 <ul> 00098 00099 EOF; 00100 00101 chdir($soc_path."/notes"); 00102 $txt_files = glob("*.txt"); 00103 chdir($soc_path); 00104 $exclude_files = array(); 00105 $exclude_files[] = "Configuration.txt"; 00106 $exclude_files[] = "Participants.txt"; 00107 $exclude_files[] = "INSTALLATION.txt"; 00108 $exclude_files[] = "doxy-uscmonogram.txt"; 00109 $exclude_files[] = "element breakdown for SOC.txt"; 00110 00111 foreach ($txt_files as $filename) { 00112 if (in_array($filename, $exclude_files) === false) { 00113 $link = $conf->get("soc_uri")."/help/".$filename; 00114 $label = str_replace(array(".txt","_"),array(""," "),$filename); 00115 echo "\t<li><a href='$link'>$label</a></li>\n"; 00116 } 00117 } 00118 echo<<<EOF 00119 <li><a href='$soc_uri/docs/html'>Source Code Documentation</a></li> 00120 </ul> 00121 <p /> 00122 00123 <h3>The AIS/REG source data</h3> 00124 <ul> 00125 <li><a href='https://camel2.usc.edu/SOC-WS/soc-ws.asmx'>REG/SOC SOAP service documentation</a></li> 00126 </ul> 00127 00128 EOF; 00129 } 00130 00131 echo<<<EOF 00132 </div> 00133 </body> 00134 </html> 00135 00136 EOF; 00137 ?>