Location: PHPKode > projects > phpMyOrdering > phpMyOrdering-0.1.7-alpha/index.php.xml
<?xml version="1.0" encoding="UTF-8" ?>
<php:start xmlns:php="http://php.net/xsl">
<php:top_statement_list id="77">
<php:top_statement_list id="70">
<php:top_statement_list id="63">
<php:top_statement_list id="56">
<php:top_statement_list id="49">
<php:top_statement_list id="42">
<php:top_statement_list id="35">
<php:top_statement_list id="28">
<php:top_statement_list id="21">
<php:top_statement_list id="14">
<php:top_statement_list id="7">
<php:top_statement_list id="0">
</php:top_statement_list>
<php:ACTION1 id="2">
</php:ACTION1>
<php:top_statement id="6">
<php:statement id="5">
<php:unticked_statement id="4">
<php:T_INLINE_HTML id="3">&lt;?</php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
<php:ACTION1 id="9">
</php:ACTION1>
<php:top_statement id="13">
<php:statement id="12">
<php:unticked_statement id="11">
<php:T_INLINE_HTML id="10">PHP
/*
 * phpMyPurchasing
 * Jason Gerfen [hide@address.com]
 *
 * index.php - index or main page
 */

if(file_exists(&apos;scripts/inc.config.php&apos;)) {
 require &apos;scripts/inc.config.php&apos;;

 // ensure we are being called from our configured host
 if( $defined[&apos;hostname&apos;] === $_SERVER[&apos;SERVER_NAME&apos;] ) {

  // obtain default options
  $defined = array_merge($defined,$handles[&apos;misc&apos;]-&gt;getDefaults());
</php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
<php:ACTION1 id="16">
</php:ACTION1>
<php:top_statement id="20">
<php:statement id="19">
<php:unticked_statement id="18">
<php:T_INLINE_HTML id="17">  $defined = array_merge($defined,$handles[&apos;misc&apos;]-&gt;getAuthentication());
  $accessList = $handles[&apos;misc&apos;]-&gt;getAccessList();

  // copy and filter incoming data
  $get = @array_map( $handles[&apos;val&apos;]-&gt;ValidateXSS, $_GET );
  $post = @array_map( $handles[&apos;val&apos;]-&gt;ValidateXSS, $_POST );
  $sess = @array_map( $handles[&apos;val&apos;]-&gt;ValidateXSS, $_SESSION );
  $serv = @array_map( $handles[&apos;val&apos;]-&gt;ValidateXSS, </php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
<php:ACTION1 id="23">
</php:ACTION1>
<php:top_statement id="27">
<php:statement id="26">
<php:unticked_statement id="25">
<php:T_INLINE_HTML id="24">$_SERVER );

  // handle logging of requests, remote data
  $handles[&apos;logs&apos;]-&gt;process($serv);

  //define the template and cache directories
  $handles[&apos;tpl&apos;]-&gt;strTemplateDir = $defined[&apos;templates&apos;];
  $handles[&apos;tpl&apos;]-&gt;strCacheDir    = &apos;/tmp&apos;;
  if( !empty( $post ) ) { $flag = &quot;TRUE&quot;; } else { $flag = &quot;FALSE&quot;; }

		// gather up some information for the token
		if( ( !isset( $_SESSION[&apos;token&apos;] ) ) </php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
<php:ACTION1 id="30">
</php:ACTION1>
<php:top_statement id="34">
<php:statement id="33">
<php:unticked_statement id="32">
<php:T_INLINE_HTML id="31">|| ( !is_resource( $handles[&apos;session&apos;] ) ) ) {
		 $handles[&apos;session&apos;] = new dbSession( $defined[&apos;timeout&apos;] );
		}
  $_SESSION[&apos;referrer&apos;] = $serv[&apos;HTTP_REFERER&apos;];

  // perform authentication
  $authenticated = $handles[&apos;auth&apos;]-&gt;DecideAuth( $_SESSION[&apos;token&apos;], $post[&apos;user&apos;], $post[&apos;pass&apos;], $serv );
  if($authenticated===0){ $class = &quot;good&quot;; } else { $class= &quot;error&quot;; }

  // include our header file</php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
<php:ACTION1 id="37">
</php:ACTION1>
<php:top_statement id="41">
<php:statement id="40">
<php:unticked_statement id="39">
<php:T_INLINE_HTML id="38">
  $handles[&apos;tpl&apos;]-&gt;assign( &apos;TITLE&apos;, $defined[&apos;title&apos;], NULL, NULL );
  $handles[&apos;tpl&apos;]-&gt;assign(&apos;ip&apos;,$serv[&apos;REMOTE_ADDR&apos;],NULL,NULL);
  $handles[&apos;tpl&apos;]-&gt;assign(&apos;logo&apos;,$defined[&apos;logo&apos;],NULL,NULL);
  $handles[&apos;tpl&apos;]-&gt;assign( &apos;templates&apos;, $defined[&apos;templates&apos;], NULL, NULL );
  $handles[&apos;tpl&apos;]-&gt;assign(&apos;timeout&apos;,$defined[&apos;timeout&apos;],NULL,NULL);
  $handles[&apos;tpl&apos;]-&gt;display( &apos;header.tpl&apos;, $flag, NULL );

 </php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
<php:ACTION1 id="44">
</php:ACTION1>
<php:top_statement id="48">
<php:statement id="47">
<php:unticked_statement id="46">
<php:T_INLINE_HTML id="45"> // process authentication and load appropriate template
  if($authenticated !== 0) {
   $ERROR = &apos;&lt;div class=&quot;&apos;.$class.&apos;&quot;&gt;&apos; . $handles[&apos;err&apos;]-&gt;detLoginErr($authenticated) . &apos;&lt;/div&gt;&apos;;
   $use = &apos;content-login.tpl&apos;;
  } else {
   // determine our template
   switch( $get[&apos;do&apos;] ) {
    case &apos;0x00a0&apos;:
     $ele = &apos;tabMain&apos;;
     $use = &apos;content-authenticated.tpl&apos;;
     break;
    case &apos;0x00b0&apos;:
     $e</php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
<php:ACTION1 id="51">
</php:ACTION1>
<php:top_statement id="55">
<php:statement id="54">
<php:unticked_statement id="53">
<php:T_INLINE_HTML id="52">le = &apos;tabPurchasing&apos;;
     $use = &apos;content-purchasing.tpl&apos;;
     break;
    case &apos;0x00c0&apos;:
     $ele = &apos;tabReports&apos;;
     $use = &apos;content-reports.tpl&apos;;
     break;
    case &apos;0x00d0&apos;:
     $ele = &apos;tabConfiguration&apos;;
     $use = &apos;content-configuration.tpl&apos;;
     break;
    case &apos;0x00e0&apos;:
     $ele = &apos;tabPermissions&apos;;
     $use = &apos;content-permissions.tpl&apos;;
     break;
    case &apos;0x00f0&apos;:
     $ele = &apos;</php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
<php:ACTION1 id="58">
</php:ACTION1>
<php:top_statement id="62">
<php:statement id="61">
<php:unticked_statement id="60">
<php:T_INLINE_HTML id="59">tabExit&apos;;
     $use = &apos;content-exit.tpl&apos;;
     break;
    default:
     $ele = &apos;tabMain&apos;;
     $use = &apos;content-login.tpl&apos;;
     break;
   }
  }
  $handles[&apos;tpl&apos;]-&gt;assign(&apos;ERROR&apos;,$ERROR,NULL,NULL);
  $handles[&apos;tpl&apos;]-&gt;assign( $ele, $handles[&apos;tpl&apos;]-&gt;assign( NULL, NULL, $use, $flag ), NULL, NULL );

  $handles[&apos;tpl&apos;]-&gt;display( &apos;main.tpl&apos;, $flag, NULL );

  // call our footer file
  $handles[&apos;tpl&apos;]-&gt;as</php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
<php:ACTION1 id="65">
</php:ACTION1>
<php:top_statement id="69">
<php:statement id="68">
<php:unticked_statement id="67">
<php:T_INLINE_HTML id="66">sign(&apos;copyright&apos;, $defined[&apos;copyright&apos;], NULL, NULL);
  $handles[&apos;tpl&apos;]-&gt;assign(&apos;FOOTER&apos;, $footer, NULL, NULL);
  $handles[&apos;tpl&apos;]-&gt;display(&apos;footer.tpl&apos;, $flag, NULL);

 } else {
  echo &quot;Cannot be called from anywhere other then our defined host&quot;;
 }

} else {
 echo &quot;Configuration file not found&quot;;
}

if($defined[&apos;debug&apos;]===&quot;true&quot;){ $handles[&apos;debug&apos;]-&gt;ShowDebug( $_GET, $post, $_REQUEST, $sess, $hand</php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
<php:ACTION1 id="72">
</php:ACTION1>
<php:top_statement id="76">
<php:statement id="75">
<php:unticked_statement id="74">
<php:T_INLINE_HTML id="73">les ); }

?&gt;
</php:T_INLINE_HTML>
</php:unticked_statement>
</php:statement>
</php:top_statement>
</php:top_statement_list>
</php:start>

Return current item: phpMyOrdering