Location: PHPKode > scripts > OekakiPoteto > oekakipoteto/editprofile.php
<html>
<script language="JavaScript" type="text/JavaScript">
<!--
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>

<?
include('header.php');
$result = mysql_query("SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki where usrname='$OekakiU'");
$row = mysql_fetch_array($result);

if($OekakiPass != $row[usrpass]){
header('index.php');
exit;
}


?>
<p></p>
<br>
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center" class="header">
  <tr> 
    <td><?=$langop_eprofile_title?></td>
  </tr>
</table>
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center" cellspacing="2" class="infotable">
  <tr> 
    <td> 
      <form name="form1" method="post" action="functions.php">
        <table width="75%" border="0" cellspacing="0" cellpadding="3" align="center">
          <tr> 
            <td width="24%"> <div align="right"> 
                <?=$langop_word_name?>:</div></td>
            <td width="76%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="text" name="name" value="<?=$row[name]?>" class="txtinput">
              </font></td>
          </tr>
          <tr> 
            <td width="24%"> <div align="right"> 
                <?=$langop_word_email?>:</div></td>
            <td width="76%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input name="email" type="text" class="txtinput" onBlur="MM_validateForm('email','','RisEmail');return document.MM_returnValue" value="<?=$row[email]?>">
              </font></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td><font face="Verdana, Arial, Helvetica, sans-serif">(<?=$langop_eprofile_valid?>)</font></td>
          </tr>
          <tr> 
            <td><div align="right"> 
                <?=$langop_word_age?>:</div></td>
            <td><input type="text" name="age" value="<?=$row[age]?>" class="txtinput"></td>
          </tr>
          <tr> 
            <td><div align="right"> 
                <?=$langop_word_gender?>:</div></td>
            <td><select name="gender" id="gender" class="multiline">
                <option>N/A</option>
                <option value="Male" <?if($row[gender]=="Male"){?>selected<?}?>> 
                <?=$langop_word_male?>
                </option>
                <option value="Female" <?if($row[gender]=="Female"){?>selected<?}?>> 
                <?=$langop_word_female?>
                </option>
              </select></td>
          </tr>
          <tr> 
            <td><div align="right"> 
                <?=$langop_word_location?>:</div></td>
            <td><input type="text" name="location" value="<?=$row[location]?>" class="txtinput"></td>
          </tr>
          <tr> 
            <td width="24%"> <div align="right"> 
                <?=$langop_word_url?>:</div></td>
            <td width="76%"> <input type="text" name="url" value="<?=$row[url]?>" class="txtinput"> 
              <?=$langop_common_http?>
            </td>
          </tr>
          <tr> 
            <td width="24%"> <div align="right"> 
                <?=$langop_eprofile_urlt?>:</div></td>
            <td width="76%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="text" name="urltitle" value="<?=$row[urltitle]?>" class="txtinput">
              </font></td>
          </tr>
          <tr> 
            <td width="24%"> <div align="right"> 
                <?=$langop_word_aolinstantmessenger?>:</div></td>
            <td width="76%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="text" name="aim" value="<?=$row[aim]?>" class="txtinput">
              </font></td>
          </tr>
          <tr> 
            <td width="24%"> <div align="right"> 
                <?=$langop_word_icq?>:</div></td>
            <td width="76%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="text" name="icq" value="<?=$row[icq]?>" class="txtinput">
              </font></td>
          </tr>
          <tr> 
            <td valign="top"><div align="right"> 
                <?=$langop_word_microsoftmessenger?>:</div></td>
            <td><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="text" name="msn" value="<?=$row[MSN]?>" class="txtinput">
              </font></td>
          </tr>
          <tr> 
            <td valign="top"><div align="right"> 
                <?=$langop_word_yahoomessenger?>:</div></td>
            <td><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="text" name="yahoo" value="<?=$row[Yahoo]?>" class="txtinput">
              </font></td>
          </tr>
          <tr> 
            <td valign="top">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td colspan="2" valign="top" class="header"> 
              <?=$langop_eprofile_irctitle?> (<?=$langop_eprofile_irctitlesub?>)</td>
          </tr>
          <tr> 
            <td valign="top"><div align="right"> 
                <?=$langop_word_ircserver?>:</div></td>
            <td><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="text" name="ircserver" value="<?=$row[IRCServer]?>" class="txtinput">
              </font></td>
          </tr>
          <tr> 
            <td valign="top"><div align="right"> 
                <?=$langop_word_ircnickname?>:</div></td>
            <td><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="text" name="ircnick" value="<?=$row[IRCNick]?>" class="txtinput">
              </font></td>
          </tr>
          <tr> 
            <td valign="top"><div align="right"> 
                <?=$langop_word_ircchannel?>:</div></td>
            <td><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input name="ircchan" type="text" class="txtinput" id="ircchan" value="<?=$row[IRCchan]?>">
              </font></td>
          </tr>
          <tr> 
            <td valign="top">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td colspan="2" valign="top" class="header"><?=$langop_eprofile_langset?></td>
          </tr>
          <tr> 
            <td valign="top"><div align="right"><?=$langop_word_language?>:</div></td>
            <td valign="top">          <select name="language2" id="select" class="multiline" style="width: 95%">
                        <?	if ($handle = opendir('language')) {
    
  		/* This is the correct way to loop over the directory. */
    		while (false !== ($file = readdir($handle))) { 
			if(substr($file,-4) == ".php"){ ?>
                        <? if(substr($file,0,-4) == $row[language]) { ?>
                        <option value="<?=substr($file,0,-4)?>" selected> 
                        <?=substr($file,0,-4)?>
                        </option>
                        <? } else { ?>
                        <option value="<?=substr($file,0,-4)?>"> 
                        <?=substr($file,0,-4)?>
                        </option>
                        <?
		}
			}
		}
		
		closedir($handle); 
   	}?>
                      </select></td>
          </tr>
          <tr> 
            <td valign="top" ><div align="right"><?=$langop_word_translator?>:</div></td>
            <td valign="top"><?=$langop_translator?></td>
          </tr>
          <tr> 
            <td valign="top" ><div align="right"><?=$langop_word_charset?>:</div></td>
            <td valign="top"><?=$charset?></td>
          </tr>
          <tr>
            <td valign="top"><div align="right"><?=$langop_word_comments?>:</div></td>
            <td valign="top"><?=$langop_comments?></td>
          </tr>
          <tr> 
            <td valign="top" >&nbsp;</td>
            <td valign="top" >&nbsp;</td>
          </tr>
          <tr> 
            <td colspan="2" valign="top" class="header"> 
              <?=$langop_word_template?>
            </td>
          </tr>
          <tr> 
            <td valign="top"><div align="right"> 
                <?=$langop_eprofile_curtemp?>:</div></td>
            <td> 
              <?=$filename?>
            </td>
          </tr>
          <tr> 
            <td valign="top"><div align="right"> 
                <?=$langop_eprofile_curtempd?>:</div></td>
            <td> 
              <?=nifty2_convert($tnotes)?>
            </td>
          </tr>
          <tr> 
            <td valign="top"><div align="right"> 
                <?=$langop_eprofile_templsel?>:</div></td>
            <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"> 
              <select name="ctemplate" id="ctemplate" class="multiline" style="width: 95%">
                <?	if ($handle = opendir('templates')) {
    
  		/* This is the correct way to loop over the directory. */
    		while (false !== ($file = readdir($handle))) { 
			if(substr($file,-4) == ".php"){ ?>
                <? if(substr($file,0,-4) == $row[templatesel]) { ?>
                <option value="<?=substr($file,0,-4)?>" selected> 
                <?=substr($file,0,-4)?>
                </option>
                <? } else { ?>
                <option value="<?=substr($file,0,-4)?>"> 
                <?=substr($file,0,-4)?>
                </option>
                <?
		}
			}
		}
		
		closedir($handle); 
   	}?>
              </select>
              </font></td>
          </tr>
          <tr> 
            <td colspan="2" valign="top" class="header"> 
              <?=$langop_eprofile_compref?>
            </td>
          </tr>
          <tr> 
            <td width="24%" valign="top"> <div align="right"> 
                <?=$langop_word_comments?>:<br>
                (<a href="#" onClick="openWindow('niftyusage.php', 500, 300); return false"><?=$langop_common_niftytoo?></a>)</div></td>
            <td width="76%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <textarea name="comment" cols="40" rows="5" class="multiline"><?=$row[comment]?></textarea>
              </font></td>
          </tr>
          <tr> 
            <td><div align="right"> 
                <?=$langop_eprofile_picview?>:</div></td>


            <td><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="-1"> 
              <select name="picview" id="select2" class="multiline">
                <option value="0" <?if($row[picview]=="0"){?>selected<?}?>> 
                <?=$langop_word_horizontal?>
                </option>
                <option value="1" <?if($row[picview]=="1"){?>selected<?}?>> 
                <?=$langop_word_vertical?>
                </option>
              </select>
              </font></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td> 
              <?=$langop_eprofile_picviewsub?>
            </td>
          </tr>
          <tr> 
            <td width="24%"> <div align="right"> 
                <?=$langop_eprofile_adult?>
                (<?=$langop_eprofile_adultsub?>):</div></td>
            <td width="76%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="checkbox" name="adult" value="X" <? if(strstr($row[usrflags],"X")) echo "checked";?>>
              <input type="hidden" name="sflags" value="<?=$row[usrflags]?>">
              <input type="hidden" name="username2" value="<?=$OekakiU?>">
              </font></td>
          </tr>
          <tr> 
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr> 
            <td colspan="2" class="header"> 
              <?=$langop_eprofile_chngpass?>
              (<?=$langop_eprofile_chngpasssub?>) </td>
          </tr>
          <tr> 
            <td><div align="right"> 
                <?=$langop_eprofile_oldpass?>:</div></td>
            <td><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input name="oldpass" type="password" class="txtinput" id="oldpass">
              </font></td>
          </tr>
          <tr> 
            <td><div align="right"> 
                <?=$langop_chngpass_newpwd?>: </div></td>

            <td><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="password" name="passwd" class="txtinput">
              </font></td>
          </tr>
          <tr> 
            <td><div align="right"> 
                <?=$langop_eprofile_repass?>:</div></td>
            <td><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="password" name="passwdnew" class="txtinput">
              </font></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td> 
              <?=$langop_eprofile_pdisc?>
            </td>
          </tr>
          <tr> 
            <td width="24%">&nbsp;</td>
            <td width="76%"> <input name="eprofile" type="submit" class="submit" onClick="MM_validateForm('email','','RisEmail');return document.MM_returnValue" value="Edit"> 
            </td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>
</body>
<? include('footer.php'); ?>
Return current item: OekakiPoteto