示例#1
0
文件: main.php 项目: jotttt/auth
     exit;
 }
 // render page
 //    $error = false;
 if (empty($o->mid_content)) {
     // kui pole mid pin leht
     $wiki = new stdClass();
     $id = 'wiki';
     $fn = sprintf("login-%s.json", $o->lang);
     if (!rcache($id, $fn, $wiki)) {
         $ret = curl_get(sprintf("https://wiki.ttu.ee/it/%s/about/auth/login?about", $o->lang));
         $wiki->login = $ret['content'];
         wcache($id, $fn, $wiki);
     }
     $o->wiki_content = $wiki->login;
     $content = $t->parse($o, sprintf("%s/%s/login.html", TPL_DIR, $w->skin));
 } else {
     $content = $o->mid_content;
 }
 //  if (WORKMODE == 'prod') {
 $content = str_replace("\r\n", VOID, $content);
 $content = str_replace("\n", VOID, $content);
 $content = str_replace("   ", VOID, $content);
 // 3 x ' '
 $content = str_replace("  ", VOID, $content);
 // 2 x ' '
 //  }
 echo $content;
 unset($l);
 unset($t);
 unset($o);