Source of: /index.php
<?php
/*
Copyright © 2001, 2002, 2003, 2004, 2005, 2006 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
// needed for the news
include_once($dir . "inc/XML/Parser.php");
include_once($dir . "inc/XML/RSS.php");
if(isset($_GET["comic_array"]) and !empty($phpgrabcomics))
{
$title = $phpgrabcomics[0]->name;
if(!empty($title))
{
// $title = "Today's ". $title ." Strip";
if(sizeof($phpgrabcomics)>1)
{
$title .= " and Other Strips";
}
}
}
else
$title = "";
if(isset($_GET["style"]))
{
// need to verify if the GET value is valid
if(preg_match("/^[0-9a-fA-F]{6}$/",$_GET["style"]))
{
$_SESSION["style"] = "#" . $_GET["style"];
$style = $_SESSION["style"];
}
}
elseif(isset($_SESSION["style"]) and !empty($_SESSION["style"]))
{
$style = $_SESSION["style"];
}
if(!isset($style) or empty($style))
{
$style = "#CCFF33";
}
if($mode != "start")
{
?>
<link media="all" rel="alternate" type="text/html" href="index.php?style=CCFF33" title="green" />
<link media="all" rel="alternate" type="text/html" href="index.php?style=FFFF66" title="yellow" />
<link media="all" rel="alternate" type="text/html" href="index.php?style=CCCCCC" title="grey" />
<link media="all" rel="alternate" type="text/html" href="index.php?style=FF9900" title="orange" />
<link media="all" rel="alternate" type="text/html" href="index.php?style=FFFFFF" title="white" />
<?php
admin::pSyndicationInfo();
?>
<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 saveComics()
{
var save = MM_findObj("save");
var view = MM_findObj("view");
var comic_form = MM_findObj("comic_form");
save.value = 1;
view.value = 0;
if(checkSelectedComics())
comic_form.submit();
}
function checkSelectedComics()
{
var c = 0;
var comic_array = MM_findObj("comic_array[]");
for(a=0; a<comic_array.length;a++)
{
if(comic_array.options[a].selected==true)
c++;
if(c><?php echo $max_comics; ?>)
{
break;
}
}
if(c><?php echo $max_comics; ?>)
{
alert("Sorry, too many comics are selected.\nPlease select a maximum of <?php echo $max_comics; ?> comics to proceed.");
return false;
}
else
{
return true;
}
}
// ]]> -->
</script>
<?php
}
?>
<!-- #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($search_with_google))
{
?>
<div class="right" id="title" style="vertical-align: top;">
<p style="text-align:right"><br />
<form method="get" action="http://www.google.com/custom">
<input type="text" name="q" size="15" maxlength="255" value="" />
<input type="submit" name="sa" value="search" />
<input type="hidden" name="cof" value="GL:0;AH:center;LH:75;L:http://phpgrabcomics.org/images/phpgrabcomics_3.png;LW:190;AWFID:e9f23ee0cb5669aa;" />
<input type="hidden" name="domains" value="server.phpgrabcomics.org" />
<input type="hidden" name="sitesearch" value="<?php echo $search_with_google; ?>" />
</form>
</p>
</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
if($mode == "start")
{
?>
<div style="text-align:center; width:80%; max-width:1000"> <a href="http://phpgrabcomics.org/"><img src="images/phpgrabcomics_full_size.png" alt="phpGrabComics" width="500" height="200" style="margin-right: 25px; float: left" /> </a>
<p style="padding-top: 20px;">If you can see this, it means that the installation of the phpGrabComics server software on this system was successful, but phpGrabComics is still not configured. </p>
<p> You may now read the <a href="docs/index.html">documentation</a> and <a href="admin/configure.php">configure</a> phpGrabComics.</p>
</div>
<?php
}
else
{
?>
<div id="leftbar" style="background-color: <?php echo $style; ?>;">
<?php
admin::MultipleSelectAllComics();
if ($authenticated != True or isset($_GET["logout"]))
{
?>
<form action="index.php" method="get" id="authentication">
<fieldset>
<legend style="background-color: <?php echo $GLOBALS["style"]; ?>">Authentication</legend>
<p>
<label for="user">user name: </label>
<input name="user" id="user" type="text" class="small" size="6" maxlength="12" />
<br />
<label for="password">password: </label>
<input name="psw" type="password" id="password" class="small" size="6" maxlength="12" />
<input name="submit" type="submit" class="small_center" value="login" />
</p>
</fieldset>
</form>
<?php
if($GLOBALS["authenticated"] != True and isset($_REQUEST["user"]) and isset($_REQUEST["psw"]))
{
echo _FAILED_AUTH;
}
elseif(isset($_GET["logout"]) and strtolower($_GET["logout"])=="true")
{
session_unset();
session_destroy();
?>
<p>Successfully logged out.</p>
<?php
}
}
elseif($GLOBALS["authenticated"] === True)
{
?>
<ul>
<li><a href="admin/index.php">Admin</a> </li>
<li><a href="<?php echo $_SERVER["SCRIPT_NAME"]; ?>?logout=True">Logout</a> </li>
</ul>
<?php
}
?>
</div>
<div id="rightbar">
<?php
if(!admin::checkFunc())
{
?>
<p><a href="http://www.gnu.org/"><img src="<?php echo $dir;?>images/floating_small.png" alt="Gnu" style="margin-right: 5px; float: left" height="48" /></a> The <a href="http://www.gnu.org">GNU</a> phpGrabComics server is installed in this web site. The phpGrabComics <a href="http://phpgrabcomics.org/server">server</a> is part of the <a href="http://phpgrabcomics.org/">phpGrabComics project</a> and allows to <strong>grab</strong>, <strong>save </strong>and <strong>read</strong> comic strips available from the web.</p>
<p><a href="modules.php"><?php echo sizeof($comic_list); ?></a> different strips are supported and working in this web site, including <a href="http://www.dilbert.com/">Dilbert</a>, <a href="http://www.ucomics.com/calvinandhobbes/">Calvin and Hobbes</a> and <a href="http://www.snoopy.com/">Peanuts</a>. </p>
<p>You can use this phpGrabComics server to read many comics strips, through RSS <a href="modules.php">syndication</a> or specific <a href="http://phpgrabcomics.org">phpGrabComics ports</a>. </p>
<p>Installing your own copy of phpGrabComics would allow you to use all its features, including the possibility to <strong>access more comic strips</strong>, to automatically <strong>archive the comic strips</strong> and to <strong>read the comic strips directly from phpGrabComics</strong>. More information on the phpGrabComics server are available <a href="http://phpgrabcomics.org/server.php">here</a>. </p>
<p>All comics are <a href="http://phpgrabcomics.org/copyright.php">copyright</a> of respective owners, and redistribution of the comics is, for most comics and in most circumstances, not permitted. phpGrabComics is intended for personal use only. </p>
<p>If you do not know how to proceed, the <a href="docs/index.html">documentation</a> is a good starting point.
<?php
}
?>
</p>
<p class="block"><a href="http://www.sourceforge.net/donate/index.php?group_id=33239"><img src="images/project-support.jpg" alt="Support This Project" border="0" height="32" width="88" id="paypal" style="float:left; margin: 4px"></a>The load of phpGrabComics in this server and the bandwidth used are very high and is becoming <strong>increasing and really expensive</strong>. Please show your support with a <a href="http://www.sourceforge.net/donate/index.php?group_id=33239">donation</a>, to cover the costs of the hosting. </p>
</div>
<?php
}
?>
<!-- #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");
?>
Last modified: 2013/Feb/20 11:01:14