Location: PHPKode > scripts > OekakiPoteto > oekakipoteto/tedita.php
<?

function get_microtime() {$mtime = microtime();$mtime = explode(' ',$mtime);return doubleval($mtime[1]) + doubleval($mtime[0]);}
 
$start_time = get_microtime();
include('dbconn.php');
include('flagchk.php');
$result = mysql_query("SELECT usrname, usrflags FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE usrname='$OekakiU'");
@extract(mysql_fetch_array($result));
if ((!check_flag('O')) && (!check_flag('S')) && (!check_flag('A'))) {
	header('Location: error.php?error='.urlencode("You do not have the credentials to access the template designer."));
exit;
}

if($Save == "Save"){
	if($filename != ""){
	$fp = fopen("templates/".$filename.".php","w");
fwrite($fp,"<? \n\nif(\$edittemplate == \"edit\"){\nheader(\"Location: tedita.php?filename=\".\$filename); \nexit;\n}\n\$tnotes=\"".$tnotes."\"; \n\$filename=\"".$filename."\"; \n\$hCellPadding=\"".$hCellPadding."\"; \n\$hWidth=\"".$hWidth."\"; \n\$cCellPadding=\"".$cCellPadding."\"; \n\$cWidth=\"".$cWidth."\"; \n\n\$avisited=\"".$avisited."\"; \n\$ahover=\"".$ahover."\"; \n\$alink=\"".$alink."\"; \n\$aactive=\"".$aactive."\"; \n\$dStamp=\"".$dStamp."\"; \n\n\$additonal=\"".$additional."\"; \n\n\$menubar=\"".$menubar."\"; \n\n\$submenu=\"".$submenu."\"; \n\n\$header=\"".$header."\"; \n\n\$txtinput=\"".$txtinput."\"; \n\n\$submitbtn=\"".$submitbtn."\"; \n\n\$infotable=\"".$infotable."\"; \n\n\$footertable=\"".$footertable."\"; \n\n\$multiline=\"".$multiline."\"; \n\n\$body=\"".$body."\"; \n\n\$teditmode=\"1\"; ?> \n\n <style type=\"text/css\"> \n\n<!--\n\nA:visited {<?=\$avisited?>} \nA:hover {<?=\$ahover?>} \nA:link {<?=\$alink?>} \nA:active {<?=\$aactive?>} \n\n.menubar {<?=\$menubar?>} \n\n.submenu {<?=\$submenu?>} \n\n.header {<?=\$header?>} \n\n.txtinput {<?=\$txtinput?>} \n\n.submit {<?=\$submitbtn?> } \n\n.infotable {<?=\$infotable?> } \n\n.footertable { <?=\$footertable?> } \n\n.multiline {<?=\$multiline?>} \n\nbody {<?=\$body?>} \n\n.commenttitle { <?=\$commenttitle?> } \n\n.commentpost { <?=\$commentpost?>} \n\n-->\n</style>");
fclose($fp);
 } 
 }
mysql_close($dbconn); 
 ?> 
 <html>
<head>
<script language="JavaScript">

<!--
  function openWindow(url, w, h) {
    var options = "width=" + w + ",height=" + h + ",";
    options += "resizable=yes,scrollbars=yes,status=no,";
    options += "menubar=no,toolbar=no,location=no,directories=no";
    var newWin = window.open(url, 'newWin', options);
    newWin.focus();
  }
//-->
</script>
<?
include('config.php');
include("templates/".$filename.".php");
include("language/".$language.".php");
?>

<title><?=$BBStitle?> - OekakiPoteto</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>">
<meta name="description" content="Start your own online artist community with OekakiPoteto - an extension script to two popular online paint programs, OekakiBBS and PaintBBS.">
<meta name="keywords" content="theo, chakkapark, oekaki, poteto, suteki.nu, suteki, oekakiBBS, paintBBS, community, php, mysql, art, drawing, cg, anime, suteki">

</head>
<body bgcolor="<?=$bgColor?>" text="<?=$textColor?>" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="templates/<?=$bgImage?>" link="<?=$link?>" vlink="<?=$vLink?>" alink="<?=$aLink?>">
<form name="form1" method="post" action="tedita.php">
<table width="75%" align="center" cellpadding="<?=$hCellPadding?>">
    <tr> 
      <td valign="top"> 
<table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td valign="top" class="infotable"><p><a href="tdesign.php"><?=$langop_templateb_tempsel?></a> | <a href="#preview"><?=$langop_templateb_curprev?></a></p>
              </td>
          </tr>
          <tr> 
            <td valign="top" class="header"><b><a name="top"></a><?=$langop_templatec_title?></b></td>
          </tr>
          <tr> 
            <td valign="top"> <table width="75%" border="0" cellspacing="0" cellpadding="0" align="center" class="infotable">
                <tr> 
                  <td height="36"><font face="Arial, Helvetica, sans-serif" size="-1"><?=$langop_templatec_filen?><br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=$langop_templatec_filen2?></font></td>
                </tr>
                <tr> 
                  <td> <p><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">&nbsp; 
                      <font color="#000000"> 
                      <input name="filename" type="text" class="txtinput" id="filename" value="<?=$filename?>" size="40">
                      .php </font></font></p></td>
                </tr>
                <tr> 
                  <td><p><?=$langop_templatec_notes?> (<a href="#" onClick="openWindow('niftyusage.php', 500, 300); return false"><?=$langop_common_niftytoo?></a>)<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em><?=$langop_templatec_author?></em></p></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">&nbsp; 
                    <textarea name="tnotes" cols="40" rows="5" class="multiline" id="tnotes" style="font-color:red;"><?=$tnotes?></textarea>
                    </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 class="infotable"><em><?=$langop_templatea_disc?> </em></td>
          </tr>
          <tr> 
            <td class="header"><b><?=$langop_install_general?></b></td>
          </tr>
          <tr> 
            <td valign="top"> <table width="75%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr> 
                  <td class="header"><strong><?=$langop_templatec_htables?></strong></td>
                </tr>
                <tr class="infotable"> 
                  <td><?=$langop_templatec_cellpad?></td>
                </tr>
                <tr class="infotable"> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    <input name="hCellPadding" type="text" class="txtinput" id="hCellPadding" value="<?=$hCellPadding?>" size="40">
                    </font></td>
                </tr>
                <tr class="infotable"> 
                  <td><?=$langop_templatec_twidth?></td>
                </tr>
                <tr class="infotable"> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="hWidth" type="text" class="txtinput" id="eaddr233" value="<?=$hWidth?>" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td class="header"><strong><?=$langop_templatec_tsettings?></strong></td>
                </tr>
                <tr class="infotable"> 
                  <td height="20"><?=$langop_templatec_cellpad?></td>
                </tr>
                <tr class="infotable"> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    <input name="cCellPadding" type="text" class="txtinput" id="eaddr2322" value="<?=$cCellPadding?>" size="40">
                    </font></td>
                </tr>
                <tr class="infotable"> 
                  <td><?=$langop_templatec_twidth?></td>
                </tr>
                <tr class="infotable"> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="cWidth" type="text" class="txtinput" id="eaddr233" value="<?=$cWidth?>" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td class="header"><strong><?=$langop_templatec_linkinfo?></strong></td>
                </tr>

                <tr> 
                  <td class="infotable">A: Visited</td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="avisited" type="text" class="txtinput" id="avisited" value="<?=$avisited?>" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td height="20" class="infotable">A: Hover</td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" face="Arial, Helvetica, sans-serif"> 
                    <input name="ahover" type="text" class="txtinput" id="filename3" value="<?=$ahover?>" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td class="infotable">A: Link</td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <input name="alink" type="text" class="txtinput" id="filename4" value="<?=$alink?>" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td height="21" class="infotable">A: Active</td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" face="Arial, Helvetica, sans-serif"> 
                    <input name="aactive" type="text" class="txtinput" id="filename5" value="<?=$aactive?>" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td class="header"><strong><?=$langop_install_miscsettings?></strong></td>
                </tr>
                <tr class="infotable"> 
                  <td><?=$langop_templatec_datestamp?></td>
                </tr>
                <tr class="infotable"> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    <input name="dStamp" type="text" class="txtinput" id="eaddr222222" value="<?=$dStamp?>" size="40">
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td><?=$langop_templatec_addcss?></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="additional" cols="40" rows="5" class="multiline" id="aactive"><?=$additional?></textarea>
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>.menubar </strong>(<?=$langop_templatea_navibar?>)</td>
          </tr>
          <tr> 
            <td valign="top"> <table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="menubar" cols="40" rows="5" class="multiline" id="okurl2"><?=$menubar?></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>.submenu </strong>(<?=$langop_templatea_submenus?>)</td>
          </tr>
          <tr> 
            <td valign="top"> <table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="submenu" cols="40" rows="5" class="multiline" id="submenu"></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>.header </strong>(<?=$langop_templatea_header?>)</td>
          </tr>
          <tr> 
            <td valign="top"> <table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="header" cols="40" rows="5" class="multiline" id="textarea2"><?=$header?></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>.txtinput </strong>(<?=$langop_templatea_txtinput?>)</td>
          </tr>
          <tr> 
            <td valign="top"> <table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="txtinput" cols="40" rows="5" class="multiline" id="textarea3"><?=$txtinput?></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>.submit </strong>(<?=$langop_templatea_submitb?>)</td>
          </tr>
          <tr> 
            <td valign="top"> <table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="submitbtn" cols="40" rows="5" class="multiline" id="textarea4"><?=$submitbtn?></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>.infotable </strong>(<?=$langop_templatea_infotable?>)</td>
          </tr>
          <tr> 
            <td valign="top"> <table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="infotable" cols="40" rows="5" class="multiline" id="textarea5"><?=$infotable?></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>.footertable</strong> (<?=$langop_templatea_footer?>)</td>
          </tr>
          <tr> 
            <td valign="top"><table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="footertable" cols="40" rows="5" class="multiline" id="textarea6"><?=$footertable?></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>.multiline</strong> (<?=$langop_templatea_listbox?>)</td>
          </tr>
          <tr> 
            <td valign="top"><table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="multiline" cols="40" rows="5" class="multiline" id="textarea7"><?=$multiline?></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;<font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>.commenttitle</strong> (<?=$langop_templatea_titlebarc?>)</td>
          </tr>
          <tr> 
            <td valign="top"><table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="commenttitle" cols="40" rows="5" class="multiline" id="textarea9"><?=$commenttitle?></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>.commentpost</strong> (<?=$langop_templatea_atitlebar?>)</td>
          </tr>
          <tr> 
            <td valign="top"><table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="commentpost" cols="40" rows="5" class="multiline" id="textarea10"><?=$commentpost?></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">&nbsp; 
                    </font></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top" class="header"><strong>body</strong> (<?=$langop_templatea_body?>)</td>
          </tr>
          <tr> 
            <td valign="top"><table width="75%" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
                <tr> 
                  <td><font size="-1" face="Arial, Helvetica, sans-serif"><?=$langop_templatea_typecss?></font></td>
                </tr>
                <tr> 
                  <td height="24"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    &nbsp; 
                    <textarea name="body" cols="40" rows="5" class="multiline" id="textarea8"><?=$body?></textarea>
                    </font></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif"> 
                    <input name="Save" type="submit" id="Save4" value="Save" class="submit">
                    </font></td>
                </tr>
              </table>
              <br>
            </td>
          </tr>
          <tr> 
            <td height="23" valign="top" class="header"><strong><a name="preview"></a></strong>[<a href="#top"><?=$langop_word_top?></a>] 
              <strong><?=$langop_templateb_tempsettpre?></strong></td>
          </tr>
          <tr> 
            <td height="23" valign="top"><br> <table width="100%" border="0" cellspacing="0" cellpadding="2" class="menubar">
                <tr> 
                  <td width="83%">(<?=$langop_templatea_navibar?>) <a href="#"><?=$langop_word_view?></a> </td>
                  <td width="17%"><?=$langop_common_loggedin?> <strong>Guest</strong></td>
                </tr>
              </table>
              <br> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="submenu">
                <tr> 
                  <td>(<?=$langop_word_submenu?>) <a href="#"><?=$langop_word_view?></a></td>
                </tr>
              </table>
              <br> <table width="<?=$hWidth?>" border="0" cellspacing="0" cellpadding="3" align="center" class="infotable">
                <tr> 
                  <td colspan="2" class="header">(<?=$langop_templatec_headert?>) [<b> <a href="#<?=mysql_result($result,$i,"PIC_ID");?>"> 
                    101 </a> </b>] [ <?=$langop_word_retouch?> ] </td>
                </tr>
                <tr> 
                  <td valign="top" width="5%"> <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><?=$langop_word_picture?><br>
                      <br>
                      </font></div></td>
                  <td width="95%" valign="top"> <table width="<?=$cWidth?>" border="0" cellspacing="0" cellpadding="<?=$cCellPadding?>">
                      <tr> 
                        <td class="commenttitle"> <b><?=$langop_word_username?> @ <font color="<?=$dStamp?>"> 
                          <?=$langop_word_date?></font></b><font color="<?=$dStamp?>"> (<?=$langop_templatec_commtitle?>)</font></td>
                      </tr>
                      <tr> 
                        <td class="commentpost"> (<?=$langop_templatec_commpostt?>)</td>
                      </tr>
                    </table></td>
                </tr>
              </table>
              <br> 
              <table width="75%" border="0" cellspacing="0" cellpadding="3" align="center">
                <tr> 
                  <td width="24%"> <div align="right"></div></td>
                  <td width="76%"> <select name="usrname2" class="multiline">
                      <option value="test">testvalue</option>
                      <option value="test1">test2</option>
                    </select> </td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                  <td class="infotable">(.infotable)</td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td valign="top">&nbsp;</td>
          </tr>
        </table>
        <div align="left"> </div>
      </td>
    </tr>
  </table>
</form>
</body>
<?
 include('footer.php'); ?>
Return current item: OekakiPoteto