Location: PHPKode > scripts > OekakiPoteto > oekakipoteto/install.php
<?
/*
Install file for OekakiPoteto by Theo Chakkapark (http://www.suteki.nu).
Installs basic OekakiPoteto databases required to run OekakiPoteto.
*/

if(!isset($language)){
$language = "english";
include('language/english.php');
} else {
include('language/'.$language.'.php');
}

/* file permissions code taken off from php.net */
$decperms = fileperms(".");
$octalperms = sprintf("%o",$decperms);
$perms=(substr($octalperms,2));

if($perms != "777"){
	echo $langop_install_error;
} else {

//Delete database
if($mode == "del"){
	include('dbconn.php');
	include('config.php');
	$result = mysql_query("DROP TABLE ".$OekakiPoteto_MemberPrefix."oekaki");
	echo mysql_error()."<br>";	
	$result = mysql_query("DROP TABLE ".$OekakiPoteto_MemberPrefix."oekakichat");
	echo mysql_error()."<br>";
	$result = mysql_query("DROP TABLE ".$OekakiPoteto_Prefix."oekakicmt");
	echo mysql_error()."<br>";	
	$result = mysql_query("DROP TABLE ".$OekakiPoteto_Prefix."oekakidta");
	echo mysql_error()."<br>";
	$result = mysql_query("DROP TABLE ".$OekakiPoteto_MemberPrefix."oekakionline");
	echo mysql_error()."<br>";	
	$result = mysql_query("DROP TABLE ".$OekakiPoteto_MemberPrefix."oekakikill");
	echo mysql_error()."<br>";	
	$result = mysql_query("DROP TABLE ".$OekakiPoteto_MemberPrefix."oekakimailbox");
	echo mysql_error()."<br>";	
	$result = mysql_query("DROP TABLE ".$OekakiPoteto_Prefix."oekakimisc");
	echo mysql_error()."<br>";	
	mysql_close();
	echo $langop_install_dbremove;	
}

//User submits information
if($Submit == "Submit"){
	/* Create a dbconn.php file used to maintain database connections */
	$fp = fopen("dbconn.php","w");
	fwrite($fp,"<? \$dbhost=\"".$dbhost."\"; \n \$dbuser=\"".$dbuser."\"; \n \$dbpass=\"".$dbpass."\"; \n \$dbname=\"".$dbname."\"; \n \$OekakiPoteto_Prefix=\"".$dbprefix."\"; \n \$OekakiPoteto_MemberPrefix =\"".$OekakiPoteto_MemberPrefix."\"; \n \$dbconn = mysql_connect(\$dbhost,\$dbuser,\$dbpass) or die(\"Cound not connect to the MySQL database.\");\n\$mySQLDB = mysql_select_db(\$dbname);?>"); 
	fclose($fp); 
	/* Create a configuration file with specified settings */ 
	$fp = fopen("config.php","w"); 
	fwrite($fp,"<?\n \$saltenc=\"".$saltstr."\"; \n \$OPpics=\"".$OPpics."\"; \n \$killuser=\"".$killuser."\"; \n \$template=\"".$template."\"; \n \$BBStitle=\"".$BBStitle."\"; \n \$eaddr=\"".$eaddr."\"; \n \$okurl=\"".$okurl."\"; \n \$apostrophes=\"".$apostrophes."\"; \n \$pstore=\"".$pstore."\"; \n \$ppage=\"".$ppage."\"; \n \$approval=\"".$approval."\"; \n \$drawaccess=\"".$drawaccess."\"; \n \$animationaccess=\"".$animationaccess."\"; \n \$xCanvas=\"".$xCanvas."\"; \n \$yCanvas=\"".$yCanvas."\"; \n \$xDefault=\"".$xDefault."\"; \n \$yDefault=\"".$yDefault."\"; \n \$chatMax=\"".$chatMax."\"; \n \$chatDisp=\"".$chatDisp."\"; \n \$language=\"".$language."\"; \n \$archivedir=\"".$archivedir."\"; \n \$guestpost=\"".$guestpost."\";\n \$anisize=\"".$anisize."\"; \n \$jpgcompression=\"".$jpgcompression."\"; \n \$jpgcompressqual=\"".$jpgcompressqual."\";?>"); 
	fclose($fp); 
	
	/* Create specified directories with their respective permissions */
	@mkdir($OPpics,0777);
		
	/* CHMOD files... disabled b/c of restrictions some servers may have 

	chmod ("count",0666);
	chmod ("ips.txt",0666);
	chmod ("hosts.txt",0666);
	chmod ("announce.php",0666);
	chmod ("notice.php",0666);
	*/

	/* Insert the fields into the database */ 
	include('dbconn.php'); 
	include('config.php'); 
	if($pass == $pass2){ 
		$passenc = crypt($pass,$saltenc); 
		$result = mysql_query("CREATE TABLE ".$OekakiPoteto_MemberPrefix."oekaki (ID int(11) NOT NULL auto_increment,  usrname varchar(255) NOT NULL default '',  usrpass text,  usrflags varchar(10) default 'G',  email varchar(255) default NULL,  name varchar(25) default NULL,  comment text,  url text,  aim varchar(30) default NULL,  icq varchar(20) default NULL,  urltitle text,  joindate date NOT NULL default '0000-00-00',  lastlogin datetime NOT NULL default '0000-00-00 00:00:00',  MSN text,  Yahoo text,  IRCNick text,  IRCServer text,  location text,  piccount int(11) NOT NULL default '0',  IRCchan text,  templatesel varchar(255) default '$template',  commcount int(11) NOT NULL default '0', age text, gender text, picview tinyint(11) NOT NULL default '0' , language TEXT,  PRIMARY KEY  (ID),  UNIQUE KEY usrname (usrname))"); 
		echo mysql_error()."<br>"; 
		$sqlstr = "INSERT INTO ".$OekakiPoteto_MemberPrefix."oekaki (ID, usrname, usrpass, usrflags, email, name, comment,joindate,language) VALUES ('', '$usrname', '$passenc', 'GASODMI', 'hide@address.com', 'Administrator', 'Administrator Account', CURDATE(),'$language')";
		$result = mysql_query($sqlstr);
		echo mysql_error()."<br>"; 		
		$result = mysql_query("CREATE TABLE ".$OekakiPoteto_MemberPrefix."oekakichat (ChatID int(11) NOT NULL auto_increment,  usrname varchar(255) NOT NULL default '',  comment tinytext NOT NULL,  posttime timestamp(14) NOT NULL,  hostname text NOT NULL,  email varchar(255) default NULL,  url text,  IP text NOT NULL,  postname varchar(50) NOT NULL default '',  PRIMARY KEY  (ChatID))"); 
		echo mysql_error()."<br>"; 
		$result = mysql_query("CREATE TABLE ".$OekakiPoteto_Prefix."oekakicmt (ID_3 int(11) NOT NULL auto_increment,  PIC_ID varchar(11) NOT NULL default '',  usrname varchar(255) NOT NULL default '',  comment text NOT NULL,  postdate datetime default NULL,  hostname text NOT NULL,  email varchar(255) default NULL,  url text,  IP text NOT NULL,  postname varchar(50) NOT NULL default '',  PRIMARY KEY  (ID_3),  KEY PIC_ID (PIC_ID))"); 
		echo mysql_error()."<br>"; 		
		$result = mysql_query("CREATE TABLE ".$OekakiPoteto_Prefix."oekakidta (ID_2 int(11) NOT NULL auto_increment,  PIC_ID int(11) NOT NULL default '',  usrname varchar(255) NOT NULL default '',  comment text NOT NULL,  postdate datetime NOT NULL default '0000-00-00 00:00:00',  hostname text NOT NULL,  email varchar(255) default NULL,  url text,  IP text NOT NULL,  title varchar(255) default NULL,  lastcmt datetime NOT NULL default '0000-00-00 00:00:00',  adult tinyint(2) NOT NULL default '0',  edittime int(20) unsigned default NULL,  animation tinyint(2) default '0',  datatype tinyint(2) default '0',  archive tinyint(2) NOT NULL default '0', postlock tinyint(4) NOT NULL default '0', PRIMARY KEY  (ID_2),  UNIQUE KEY PIC_ID (PIC_ID))"); 
		echo mysql_error()."<br>"; 
		$result = mysql_query("CREATE TABLE ".$OekakiPoteto_MemberPrefix."oekakionline (OID BIGINT(255) NOT NULL auto_increment,  onlineusr varchar(100) NOT NULL default '',  onlinetime timestamp(14) NOT NULL,  onlineIP text NOT NULL,  locale varchar(30) default NULL, onlineboard text NOT NULL, PRIMARY KEY  (OID),  UNIQUE KEY onlineusr (onlineusr))"); 
		echo mysql_error()."<br>"; 
		$result = mysql_query("CREATE TABLE ".$OekakiPoteto_MemberPrefix."oekakimailbox (MID int(11) NOT NULL auto_increment, sender varchar(255) NOT NULL default '', reciever varchar(255) NOT NULL default '', subject text NOT NULL,  body longtext NOT NULL,  mstatus smallint(10) NOT NULL default '0', senddate datetime NOT NULL default '0000-00-00 00:00:00',  PRIMARY KEY  (MID), KEY sender(sender), KEY reciever (reciever))"); 
		echo mysql_error()."<br>"; 
		$result = mysql_query("CREATE TABLE ".$OekakiPoteto_MemberPrefix."oekakikill (KID tinyint(4) NOT NULL auto_increment,  lastkill date NOT NULL default '0000-00-00',  PRIMARY KEY  (KID),  KEY lastkill (lastkill))");
		echo mysql_error()."<br>"; 
		$result = mysql_query("INSERT INTO ".$OekakiPoteto_MemberPrefix."oekakikill (KID, lastkill) VALUES ('',CURDATE())");
		echo mysql_error()."<br>";	
		$result = mysql_query("CREATE TABLE ".$OekakiPoteto_Prefix."oekakimisc (MiscID int(11) NOT NULL auto_increment, miscname varchar(255) NOT NULL default '',  miscvalue bigint(255) default '0' NOT NULL,  PRIMARY KEY  (MiscID),  KEY miscname (miscname))");						
		echo mysql_error()."<br>";
$result = mysql_query("CREATE TABLE ".$OekakiPoteto_MemberPrefix."oekakichatmod (usrname varchar(255) NOT NULL default '',  command varchar(32) NOT NULL default 'MESSAGE',  comment tinytext NOT NULL,  posttime timestamp(14) NOT NULL,  hostname text NOT NULL,  email varchar(255) default NULL,  url text,  IP text NOT NULL,  postname varchar(50) NOT NULL default '',  PRIMARY KEY (posttime)) TYPE=MyISAM;"); 
		echo mysql_error()."<br>";	

$result = mysql_query("CREATE TABLE ".$OekakiPoteto_MemberPrefix."oekakichatmodusers (usrname varchar(255) NOT NULL,  lastmessage timestamp(14) NOT NULL, afk ENUM('no','yes') NOT NULL default 'no', PRIMARY KEY (usrname)) TYPE=MyISAM;"); 
		echo mysql_error()."<br>";	


		$result = mysql_query("INSERT INTO ".$OekakiPoteto_Prefix."oekakimisc VALUES (1,'piccount','$resno')");							
		echo mysql_error()."<br>";
					
		mysql_close(); 
		echo $langop_install_complete;
		} else { 
		echo $langop_install_nomatch; 
		} 


}?> 

<html>
<head> 
<style type="text/css">

<!--

A:visited {text-decoration: none;}

A:hover {text-decoration: underline;}







A:link {text-decoration: none;}

A:active {text-decoration: none;}
-->
</style>

<title><?=$langop_install_title?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>"></head> 
<body bgcolor="#5E659B" text="#FFFFFF" link="#663366" vlink="#663366" alink="#663366">
<br>
<font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="+1"><i> 
<?=$langop_install_title?>
</i></font>
<form name="form2" method="post" action="install.php">
<table width="100%" border="0" cellspacing="0" cellpadding="2" style="border: 1px #7980AE solid">
    <tr> 
      <td valign="top" bgcolor="#A7ADBC"> <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr> 
            <td bgcolor="#5E659B"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><b> 
              Select Your Default Language</b></font></td>
          </tr>
          <tr> 
            <td valign="top"> <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr> 
                  <td height="20"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1">&nbsp; 
                    </font></td>
                </tr>
                <tr> 
                  <td> <p> <font color="#FFFFFF" face="Arial, Helvetica, sans-serif">&nbsp; 
                      </font><font size="-1" face="Arial, Helvetica, sans-serif"> 
                      <select name="language" id="select8">
                        <?	if ($handle = opendir('language')) {

    
  		/* This is the correct way to loop over the directory. */
    		while (false !== ($file = readdir($handle))) { 
			if(substr($file,-4) == ".php"){ ?>
                        <option value="<?=substr($file,0,-4)?>"> 
                        <?=substr($file,0,-4)?>
                        </option>
                        <?
			}
		}
		
		closedir($handle); 
    	}?>
                      </select>
                      </font><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"> 
                      </font></p></td>
                </tr>
                <tr> 
                  <td valign="top"> <p><br>
                      <font face="Arial, Helvetica, sans-serif"> 
                      <input name="langsel" type="submit" id="langsel" value="Submit">
                      </font></p></td>
                </tr>
              </table></td>
          </tr>
        </table>
        <div align="left"><font face="Arial, Helvetica, sans-serif" size="-1"><br>
          </font></div></td>
    </tr>
  </table>
</form>
<i><font color="#FFFFFF"> </font></i> 

<form name="form1" method="post" action="install.php">
  <table width="100%" border="0" cellspacing="0" cellpadding="2" style="border: 1px #7980AE solid">
    <tr> 
      <td height="1576" bgcolor="#A7ADBC"> 
<table width="100%" border="0" cellspacing="0" cellpadding="2" style="border-size: 1px;">
          <tr> 
            <td height="23" valign="top" bgcolor="#5E659B"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><b>
              <?=$langop_install_information?>
              </b></font></td>
          </tr>
          <tr> 
            <td valign="top"> 
              <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr> 
                  <td><em><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_install_disclaimer?></font></em> <br> 
                    <br> </td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><?=$langop_install_dbhostname?></font></td>
                </tr>
                <tr> 
                  <td> <p><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">&nbsp; 
                      <input type="text" name="dbhost" size="40" style="font-color:red;" value="localhost">
                      </font></p></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><?=$langop_install_dbname?></font></td>
                </tr>
                <tr> 
                  <td> <font color="#FFFFFF" face="Arial, Helvetica, sans-serif">&nbsp; 
                    <input type="text" name="dbname" size="40" value="<?=$dbname?>">
                    </font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><?=$langop_install_dbusername?></font></td>
                </tr>
                <tr> 
                  <td> <p> <font color="#FFFFFF" face="Arial, Helvetica, sans-serif">&nbsp; 
                      <input type="text" name="dbuser" size="40" value="<?=$dbuser?>">
                      </font></p></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><?=$langop_install_dbpass?></font></td>
                </tr>
                <tr> 
                  <td> <font color="#FFFFFF" face="Arial, Helvetica, sans-serif">&nbsp; 
                    <input type="password" name="dbpass" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><?=$langop_install_prefix?> <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em><?=$langop_install_prefixsub?></em></font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF"> 
                    <input type="text" name="dbprefix" size="40" value="op_">
                    </font></td>
                </tr>
                <tr>
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_install_mdbprefix?><br>
                    &nbsp;<em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <?=$langop_install_mdbprefixsub?></em></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF"> &nbsp; 
                    <input name="OekakiPoteto_MemberPrefix" type="text" id="OekakiPoteto_MemberPrefix" value="op_" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td> <font color="#FFFFFF">&nbsp; </font></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr> 
            <td bgcolor="#5E659B"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><b><?=$langop_install_opconf?></b></font></td>
          </tr>
          <tr> 
            <td valign="top"> 
              <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><em> 
                    <?=$langop_install_opconfsub?>
                    <br>
                    </em></font><br> </td>
                </tr>
                <tr> 
                  <td bgcolor="#4D3D56"><strong><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_dispreg?>
                    </font></strong></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_opurl?>
                    </font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="okurl" type="text" id="OPpics24" value="http://" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_email?>
                    <br>
                    <em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                    <?=$langop_install_emailsub?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="eaddr" type="text" id="OPpics2223" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td bgcolor="#4D3D56"><font size="-1" face="Arial, Helvetica, sans-serif"><strong> 
                    <?=$langop_install_general?>
                    </strong></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"> 
                    <?=$langop_install_salt?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em> 
                    <?=$langop_install_saltsub?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input type="text" name="saltstr" size="40" value="As">
                    </font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_picdir?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em> 
                    <?=$langop_install_picdirsub?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    <input name="OPpics" type="text" id="OPpics3" value="pictures" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_picstore?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>&nbsp;&nbsp; 
                    <?=$langop_install_picstoresub?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    <input name="pstore" type="text" id="OPpics32" value="200" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; </font></td>
                </tr>
                <tr> 
                  <td bgcolor="#4D3D56"><font size="-1" face="Arial, Helvetica, sans-serif"><strong> 
                    <?=$langop_install_reg?>
                    </strong></font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_adel?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>&nbsp; 
                    <?=$langop_install_adelsub?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="killuser" type="text" id="OPpics23" value="-1" size="40">
                    <?=$langop_install_adelsub2?>
                    </font></td>
                </tr>
                <tr> 
                  <td valign="top"><p><font size="-1" face="Arial, Helvetica, sans-serif"> 
                      <?=$langop_install_gallow?>
                      <br>
                      <em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                      <?=$langop_install_gallowsub?>
                      </em></font></p></td>
                </tr>
                <tr> 
                  <td valign="top">&nbsp; <select name="guestpost" id="guestpost">
                      <option value="yes" selected> 
                      <?=$langop_word_yes?>
                      </option>
                      <option value="no"> 
                      <?=$langop_word_no?>
                      </option>
                    </select></td>
                </tr>
                <tr> 
                  <td valign="top"> <p><font size="-1" face="Arial, Helvetica, sans-serif"> 
                      <?=$langop_install_rapproval?>
                      <br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em> 
                      <?=$langop_install_rapprovalsub?>
                      </em></font></p></td>
                </tr>
                <tr> 
                  <td> &nbsp; <select name="approval" id="approval">
                      <option value="yes" selected> 
                      <?=$langop_word_yes?>
                      </option>
                      <option value="no"> 
                      <?=$langop_word_no?>
                      </option>
                    </select> </td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_daccess?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em> 
                    <?=$langop_install_daccesssub?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td>&nbsp; <select name="drawaccess" id="drawaccess">
                      <option value="yes" selected> 
                      <?=$langop_word_yes?>
                      </option>
                      <option value="no"> 
                      <?=$langop_word_no?>
                      </option>
                    </select></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_aaccess?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em> 
                    <?=$langop_install_aaccesssub ?>
                    </em></font> </td>
                </tr>
                <tr> 
                  <td>&nbsp; <select name="animationaccess" id="animationaccess">
                      <option value="yes" selected> 
                      <?=$langop_word_yes?>
                      </option>
                      <option value="no"> 
                      <?=$langop_word_no?>
                      </option>
                    </select></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td bgcolor="#4D3D56"><strong><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_dispgen?>
                    </font></strong></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_deftem?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em> 
                    <?=$langop_install_deftemsub?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    <select name="template" id="template">
                      <?	if ($handle = opendir('templates')) {

    
  		/* This is the correct way to loop over the directory. */
    		while (false !== ($file = readdir($handle))) { 
			if(substr($file,-4) == ".php"){ ?>
                      <option value="<?=substr($file,0,-4)?>"> 
                      <?=substr($file,0,-4)?>
                      </option>
                      <?
			}
		}
		
		closedir($handle); 
    	}?>
                    </select>
                    </font></td>
                </tr>
                <tr> 
                  <td height="40"><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_title2?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                    <?=$langop_install_title2sub?>
                    </font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="BBStitle" type="text" id="BBStitle" value="OekakiPoteto BBS" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td height="21"> <p><font size="-1" face="Arial, Helvetica, sans-serif"> 
                      <?=$langop_install_nopics?>
                      <br>
                      </font></p></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    <input name="ppage" type="text" id="ppage2" value="15" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; </font></td>
                </tr>
                <tr> 
                  <td bgcolor="#4D3D56"><font size="-1" face="Arial, Helvetica, sans-serif"><strong> 
                    <?=$langop_install_dispchat?>
                    </strong></font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_displinesmax?>
                    </font></td>
                </tr>

                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="chatMax" type="text" id="chatMax" value="1000" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_displines?>
                    </font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="chatDisp" type="text" id="chatDisp" value="15" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td bgcolor="#4D3D56"><font size="-1" face="Arial, Helvetica, sans-serif"><strong> 
                    <?=$langop_install_appletset?>
                    </strong></font></td>
                </tr>
                <tr> 
                  <td><p><font size="-1" face="Arial, Helvetica, sans-serif"> 
                      <?=$langop_install_animax?>
                      <br>
                      <em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                      <?=$langop_install_animaxsub?>
                      </em></font></p></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="anisize" type="text" id="anisize" value="500000" size="40">
                    <?=$langop_install_bytes?>
                    </font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_canvwid?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>&nbsp;&nbsp; 
                    <?=$langop_install_canvwidsub?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="xCanvas" type="text" id="xCanvas" value="450" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_canvhei?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>&nbsp;&nbsp; 
                    <?=$langop_install_canvheisubm?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="yCanvas" type="text" id="yCanvas" value="450" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_dcanvwid?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>&nbsp;&nbsp; 
                    <?=$langop_install_dcanvwidsub?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="xDefault" type="text" id="xDefault" value="300" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_dcanvhei?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>&nbsp;&nbsp; 
                    <?=$langop_install_dcanvheisub?>
                    </em></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="yDefault" type="text" id="yDefault" value="300" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td bgcolor="#4D3D56"><font size="-1" face="Arial, Helvetica, sans-serif"><strong> 
                    <?=$langop_install_miscsettings?>
                    </strong></font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"> 
                    <?=$langop_install_apstrophesm?>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                    <?=$langop_install_apstrophesmsub?>
                    </font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <select name="apostrophes" id="apostrophes">
                      <option value="1" selected>Mode 1</option>
                      <option value="0">Mode 0</option>
                    </select>
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td bgcolor="#4D3D56"><font size="-1" face="Arial, Helvetica, sans-serif"><strong> 
                    <?=$langop_compress_title?> </strong></font></td>
                </tr>
                <tr> 
                  <td><em><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_compress_disc?></font></em></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_compress_enjpg?></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
<select name="jpgcompression" id="select2">
                      <option value="yes"> 
                      <?=$langop_word_yes?>
                      </option>
                      <option value="no" selected> 
                      <?=$langop_word_no?>
                      </option>
                    </select>
                    </font></td>
                </tr>
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_compress_qual?></font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    <input name="jpgcompressqual" type="text" id="ppage" value="100" size="40">
                    <?=$langop_compress_range?></font></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr> 
            <td bgcolor="#5E659B"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><b><?=$langop_install_admininfo?></b></font></td>
          </tr>
          <tr> 
            <td valign="top"> 
              <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><?=$langop_install_login?></font></td>
                </tr>
                <tr> 
                  <td> 
                    <p> <font color="#FFFFFF" face="Arial, Helvetica, sans-serif">&nbsp; 
                      <input type="text" name="usrname" size="40" value="<?=$usrname?>">
                      </font></p>
                  </td>
                </tr>
                <tr> 
                  <td height="18"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><?=$langop_install_password?></font></td>
                </tr>
                <tr> 
                  <td> <font face="Arial, Helvetica, sans-serif">&nbsp; 
                    <input type="password" name="pass" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td height="17"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"><?=$langop_eprofile_repass?></font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font face="Arial, Helvetica, sans-serif"> 
                    <input type="password" name="pass2" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td valign="top">
<p><font face="Arial, Helvetica, sans-serif"><strong><font color="#990000" size="2"><br>
<?=$langop_install_TOS?>
               <input type ="hidden" name="language" value="<?=$language?>">
			          </font></strong></font></p>
                    <p><font face="Arial, Helvetica, sans-serif"> 
                      <input type="submit" name="Submit" value="Submit">
                      </font></p>
                    </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
        <div align="left"><font face="Arial, Helvetica, sans-serif" size="-1"><br>
        <?=$langop_install_dbdel?></font></div>
      </td>

    </tr>
  </table>
</form>
<div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1">OekakiPoteto 
  5.x by <a href="http://www.suteki.nu">RanmaGuy</a> and <a href="http://www.cellosoft.com">Marcello</a></font> 
</div>
</body>
</html>
<? } ?>
Return current item: OekakiPoteto