function zp_footer() { ?> <div id="credit"><?php if (zp_loggedin()) { printUserLogin_out($before = '', $after = '| ', $showLoginForm = NULL, $logouttext = NULL, $show_user = NULL); } else { printLinkHTML(WEBPATH . '/' . ZENFOLDER . '/admin.php', 'Admin | '); } printZenphotoLink(); ?> <?php printVersion(); ?> </a> | Using "Side Of Chili Theme" by: <a href="http://www.chilifrei.net" title="How Do You Like Your Chili?">ChiliFrei64</a></div> <?php }
printZenphotoLink(); ?> </div> <div id="options"> <?php if (zp_loggedin()) { printUserLogin_out($before = '', $after = '|', $showLoginForm = NULL, $logouttext = NULL, $show_user = NULL); } else { printLinkHTML(WEBPATH . '/' . ZENFOLDER . '/admin.php', 'Admin'); } ?> </div> <div id="info"> <?php echo round(array_sum(explode(" ", microtime())) - $startTime, 4) . ' seconds'; echo '. Pink Clouds 1.0 . '; echo 'ZenPhoto '; printVersion(); ?> </div> </div> </div> <?php zp_apply_filter('theme_body_close'); ?> </body> </html>
/** * Parses (and checks some) command line arguments */ function parseArguments() { global $checkOptions, $cmdargs, $checksEnabled, $periods, $periodsEnabled, $argc, $argv; if ($argc == 1) { printUsage(true); exit(STATUS_UNKNOWN); } $i = 1; while ($i < $argc) { if ($argv[$i][0] != '-') { $i++; continue; } switch ($argv[$i][1]) { case 'V': printVersion(); exit(STATUS_OK); break; case 'v': $cmdargs['log_level'] = LOG__VERBOSE; $i++; break; case 'd': $cmdargs['log_level'] = LOG__DEBUG; $i++; break; case 'c': $cmdargs['community'] = $argv[$i + 1]; $i++; break; case 'h': $cmdargs['host'] = $argv[$i + 1]; $i++; break; case 'p': $cmdargs['port'] = $argv[$i + 1]; $i++; break; case '?': printHelp(); exit(STATUS_OK); break; default: if (!isset($argv[$i + 1]) || substr($argv[$i + 1], 0, 1) == '-') { $cmdargs[substr($argv[$i], 2)] = true; } else { $cmdargs[substr($argv[$i], 2)] = $argv[$i + 1]; } $i++; break; } } }
/** * Parses (and checks some) command line arguments */ function parseArguments() { global $checkOptions, $cmdargs, $checksEnabled, $periods, $periodsEnabled, $argc, $argv; if ($argc == 1) { printUsage(true); exit(STATUS_UNKNOWN); } $i = 1; while ($i < $argc) { if ($argv[$i][0] != '-') { $i++; continue; } //disabling or enabling checks if (substr($argv[$i], 2, 8) == 'disable-' || substr($argv[$i], 2, 7) == 'enable-') { $op = substr($argv[$i], 2, 7) == "disable" ? 0 : 1; $check = $op ? substr($argv[$i], 9) : substr($argv[$i], 10); if ($check == "all") { foreach ($checkOptions as $key => $check) { $checksEnabled[$key] = $op; } } else { if (in_array($check, $checkOptions)) { $checksEnabled[$checkOptions[$check]] = $op; } else { _log(sprintf("ERR: Unknown option %s. Use help for more details.", $argv[$i]), LOG__ERROR); exit(STATUS_UNKNOWN); } } $i++; continue; } if (substr($argv[$i], 2) == "help") { $argv[$i] = '-h'; } switch ($argv[$i][1]) { case 'V': printVersion(); exit(STATUS_OK); break; case 'v': $cmdargs['log_level'] = LOG__VERBOSE; $i++; break; case 'd': $cmdargs['log_level'] = LOG__DEBUG; $i++; break; case 'c': $cmdargs['configFile'] = $argv[$i + 1]; if (isset($argv[$i + 2])) { $periodsEnabled = array(); while (isset($argv[$i + 2])) { if (in_array($argv[$i + 2], $periods)) { $periodsEnabled[] = $argv[$i + 2]; $i++; } else { if ($argv[$i + 2][0] != "-") { _log("Bad period provided. Use help for more details.", LOG__ERROR); exit(STATUS_UNKNOWN); } else { break; } } } } $i++; break; case 'h': case '?': printHelp(); exit(STATUS_OK); break; default: $i++; } } //check the configuration file if (!file_exists($cmdargs['configFile']) || !is_readable($cmdargs['configFile'])) { _log(sprintf("Configuration file [%s] does not exist or cannot be read.", $cmdargs['configFile']), LOG__ERROR); exit(STATUS_UNKNOWN); } }