/* Smarty template class configuration */ if (!defined('SMARTY_DIR')) { define("SMARTY_DIR", "/usr/share/php/smarty/libs/"); } if (!is_dir(constant("SMARTY_DIR")) || !(require_once "smarty/Smarty.class.php")) { echo "SMARTY is supposed to be installed in " . constant("SMARTY_DIR") . " but is not."; echo "Install it or edit SMARTY_DIR in " . __FILE__; exit; } global $smarty; $smarty = new Smarty(); $smarty->compile_check = true; $smarty->debugging = false; $smarty->caching = 0; $smarty->cache_dir = "cache"; $smarty->template_dir = "templates"; $smarty->compile_dir = "templates_c"; $smarty->plugins_dir = array('/usr/share/php/smarty/plugins'); $smarty->assign("page_class", "software org-mode"); $smarty->assign("page_hgroup", "<h1>Frei0r :: TODO</h1>"); $smarty->assign("page_title", "free video effect plugins"); $smarty->assign("pagename", "software"); $smarty->display("_header.tpl"); // sidebar div("menu"); $smarty->display("software/doctypes.tpl"); showfile("TODO-toc.html"); echo "</div>"; // page content showfile("TODO-body.html"); $smarty->display("_footer.tpl");
if (isset($_GET['table']) && AJAX_request()) { $html = '<div class="table-responsive"><table class="table table-hover ' . $table_fixed . '"><thead><tr>'; if ($table_fixed == '') { $html .= '<th class="col-md-4">' . $lang[5] . '</th><th class="hidden-xs col-md-2">' . $lang[6] . '</th><th class="hidden-xs col-md-2">' . $lang[7] . '</th><th class="hidden-xs col-md-2">' . $lang[28] . '</th>'; } else { $html .= '<th class="col-xs-12 col-sm-6">' . $lang[5] . '</th><th class="hidden-xs col-xs-2 col-sm-2 col-md-2">' . $lang[6] . '</th><th class="hidden-xs col-xs-2 col-sm-2 col-md-2">' . $lang[7] . '</th>'; } $html .= '<th class="hidden-xs col-md-2">' . $lang[8] . '</th></tr></thead><tbody>'; //output appropriate items if (is_array($files) || is_object($files)) { foreach ($files as $index => $file) { $html .= '<tr>'; if ($table_fixed == '') { $html .= '<td class="col-md-3">' . showfile($file) . '</td><td class="hidden-xs col-md-2">' . file_size($file) . '</td><td class="hidden-xs col-md-2">' . extension($file) . '</td><td class="hidden-xs col-md-2">' . fileTime($index, $file) . '</td>'; } else { $html .= '<td class="col-xs-12 col-sm-5">' . showfile($file) . '</td><td class="hidden-xs col-xs-2 col-sm-2 col-md-2">' . file_size($file) . '</td><td class="hidden-xs col-xs-2 col-sm-2 col-md-2"><span class="label label-default">' . extension($file) . '</span></td>'; } $html .= '<td class="hidden-xs col-xs-3 col-sm-3 col-md-3">' . action($file) . '</td></tr>'; } } $html .= '<tr>'; if ($table_fixed == '') { $html .= '<td colspan="5" class="col-xs-12 col-sm-12 col-md-12">'; } else { $html .= '<td colspan="4" class="col-xs-12 col-sm-12 col-md-12">'; } $html .= $lang[9] . ' : <mark>' . $page . '</mark> ' . $lang[10] . ' : <mark>' . $total_files . '</mark></td></tr></tbody></table></div>'; if ($alert_msg != '') { $alert_msg = alert($alert_msg); } $response = array('table' => $html, 'total' => $total_pages, 'page' => $page, 'dir' => $directory, 'dirHtml' => GetOldirectory(), 'alert' => $alert_msg);
$verstr = getPage($updateserver . "?v=" . version, "utf-8"); $adpath = $_SERVER["SCRIPT_NAME"]; $adpath = substring($adpath, strripos($adpath, "/")); $n = strripos($adpath, "/"); $adpath = substring($adpath, strlen($adpath) - $n, $n + 1) . "/"; switch ($action) { case "checkversion": checkversion(); break; case "showfilelist": headAdmin("更新列表"); showfilelist(); break; case "showfile": headAdmin("更新列表"); showfile(); break; } dispseObj(); function checkversion() { global $verstr; if (strpos($verstr, "</joyplus>") > 0) { $doc = new DOMDocument(); $doc->formatOutput = true; $doc->loadxml($verstr); $xmlnode = $doc->documentElement; $serverversion = $xmlnode->getElementsByTagName("version")->item(0)->nodeValue; $vardec = $xmlnode->getElementsByTagName("des")->item(0)->nodeValue; unset($xmlnode); unset($doc);
/* Smarty template class configuration */ if (!defined('SMARTY_DIR')) { define("SMARTY_DIR", "/usr/share/php/smarty/libs/"); } if (!is_dir(constant("SMARTY_DIR")) || !(require_once "smarty/Smarty.class.php")) { echo "SMARTY is supposed to be installed in " . constant("SMARTY_DIR") . " but is not."; echo "Install it or edit SMARTY_DIR in " . __FILE__; exit; } global $smarty; $smarty = new Smarty(); $smarty->compile_check = true; $smarty->debugging = false; $smarty->caching = 0; $smarty->cache_dir = "cache"; $smarty->template_dir = "templates"; $smarty->compile_dir = "templates_c"; $smarty->plugins_dir = array('/usr/share/php/smarty/plugins'); $smarty->assign("page_class", "software org-mode"); $smarty->assign("page_hgroup", "<h1>FreeJ</h1>"); $smarty->assign("page_title", "free vision mixer"); $smarty->assign("pagename", "software"); $smarty->display("_header.tpl"); // sidebar div("menu"); $smarty->display("software/doctypes.tpl"); showfile("index-toc.html"); echo "</div>"; // page content showfile("index-body.html"); $smarty->display("_footer.tpl");
} } else { if ($mixer3) { $smarty->assign("page_hgroup", "<h1>Frei0r mixer-3 :: {$mixer3}</h1>"); $fd = fopen("mixer3/{$mixer3}.html", "r"); if (!$fd) { $selection = NULL; } else { $selection = "mixer3/{$mixer3}.html"; fclose($fd); } } } } } } if (!$selection) { $smarty->assign("page_hgroup", "<h1>Frei0r plugin gallery</h1>"); $selection = "gallery-index.html"; } $smarty->assign("page_class", "software org-mode"); $smarty->assign("page_title", "free video effect plugins gallery"); $smarty->assign("stylesheet", "gallery.css"); $smarty->assign("pagename", "software"); $smarty->display("_header.tpl"); if (!$selection) { echo "<h3>file not found: {$filter} {$generator}</h3>"; } else { showfile($selection); } $smarty->display("_footer.tpl");
function analyse($fname, $searchstr, $nbligne, $searchstr2, $searchnot) { $res = ""; // echo "analyse $fname for $searchstr<br />"; if (is_dir($fname)) { // $res.="<tr><td>digging in dir <b>$fname</b></td>"; $lines = @file($fname); $count = count($lines); if ($count == 0 or !isset($line)) { // $res.="<tr><td>pb with file ".$fname."</td>"; } for ($ii = 0; $ii < $count; $ii++) { $res .= analyse($line[$ii], $searchstr, $nbligne, $searchstr2, $searchnot); } } else { $res .= showfile($fname, $searchstr, $nbligne, $searchstr2, $searchnot); } return $res; }