Location: PHPKode > projects > phpGrabComics > www/admin/configure.php
<?php
/*

Copyright © 2001, 2002, 2003, 2004, 2005 Andres Baravalle

This file is part of phpGrabComics.

phpGrabComics is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

phpGrabComics is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with phpGrabComics; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/
include_once("dir.php");
include_once($dir . "inc/prepend.php");
echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><!-- InstanceBegin template="/Templates/accessible.dwt" codeOutsideHTMLIsLocked="true" -->
<head>

<?php
include_once($dir . "inc/head.php");
?>
<!-- #BeginEditable "doctitle" -->
<?php
// include all the comics classes
include_once($dir . "inc/load_comics_classes.php");
// include PEAR classes
include_once($dir . "inc/load_PEAR_classes.php");
$title="Configure";
?>
<script type="text/javascript">
<!-- <![CDATA[
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
// ]]> -->
</script>
<!-- #EndEditable -->
<title>
<?php 
if($title!="")
	echo "phpGrabComics - " . $title;
else
{
	$title = "phpGrabComics";
	echo $title;
}
?>
</title>
</head>
<body> 
<div id="header"> 
	<div class="left" id="logo"><a href="../index.php"><img src="<?php echo $banners_file; ?>/phpgrabcomics_10.png" alt="phpGrabComics home page" width="85" height="85" style="vertical-align: middle; margin-right: 36px;" /></a><h1><?php echo $title; ?></h1></div> 
	<?php
	// disable search bar for sites other then the main one.
	if(!empty($atomz_code))
	{
	?>	
	<div class="right" id="title" style="vertical-align: top;">		
		<form method="get" action="../search.php">
			<p style="text-align:right"><br /><input size="15" name="sp-q" value="<?php if(isset($_REQUEST["sp-q"])) echo $_REQUEST["sp-q"]; ?>" />
				<input type="hidden" name="sp-a" value="<?php echo $atomz_code; ?>" style="font-size:12px;background-color:#FFFFCC" accesskey="s" />
				<input type="hidden" name="sp-p" value="all" />
				<input type="hidden" name="sp-f" value="iso-8859-1" />
				<input type="submit" value="Search" />				
			</p>
		</form>		
	</div> 
	<?php
	}
	?>
	<hr /> 
</div> 
<div id="body"> 
	<?php
	if (isset($_GET["show_source"]) and $_GET["show_source"]==1)
	{	
		echo "<br /><h2>Source of: ".$_SERVER["SCRIPT_NAME"]."</h2>\n<hr />\n";
		highlight_file($_SERVER["SCRIPT_FILENAME"]);
		printf("<hr /><br />". _LAST_MODIFIED . ": %s", gmdate("Y/M/d H:i:s",filemtime($_SERVER["SCRIPT_FILENAME"])));
	}
	else
	{
	?> 
	<!-- #BeginEditable "testo dentro il livello" -->
	<?php
	admin::configure();
	?>
	<!-- #EndEditable --> 
	<?php
	}
	?> 
</div> 
<div id="footer"> 
	<hr /> 
	<div class="left" id="source"><a href="<?php echo $dir; ?>index.php"><img src="<?php echo $dir; ?>images/logo.png" id="show_source" width="32" height="48" alt="show source" /></a> <a href="<?php echo $_SERVER["SCRIPT_NAME"];?>?show_source=1">show source</a></div> 
	<div class="right" id="hosted"> <a href="http://sourceforge.net/projects/phpgrabcomics/"><img src="<?php echo $dir; ?>sourceforge.php" id="sourceforge" alt="SourceForge" /></a> phpGrabComics	project is hosted at <a href="http://sourceforge.net/projects/phpgrabcomics/">sourceforge.net</a>.</div> 
</div> 
</body>
<!-- InstanceEnd --></html>
<?php
include_once($dir . "inc/append.php");
?>
Return current item: phpGrabComics