php导出mysql成cvs execel表

 更新时间:2016年11月25日 16:03  点击:1702
php导出mysql成cvs execel表

<?php
include_once(dirname(__FILE__).'../../Inc/Conn.php');
include_once(dirname(__FILE__).'../../photo/Inc/function.php');
$Date = date("Y-m-d");
$Filename = $Date.'_'.date("h_i_s").".csv";

$a = "帐号,邮箱,性别,宝宝出生日期,省份,真实姓名,邮编,手机,地址 rn";
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=".$Filename);
$Sql = "Select * from oy_use";
$Result = mysql_query($Sql) or die(mysql_error());
  while($rs = mysql_fetch_array($Result) ){
   // if(get_days($rs['m_time'])<= $Table ){
   $a.=$rs['User_Name'].','. $rs['User_Mail'].",".($rs['User_Baby_Sex']?'男':'女').",". $rs['User_Baby_Birth'].",";
   $a.="".$rs['sheng'].",". $rs['User_rname'].",".$rs['User_Zip'].",".$rs['User_Hand'].",".$rs['User_Address']." rn ";
 //  }
  } 
  echo $a;

 
    
function get_days($base){

 $Date_1=date("Y-m-d");//格式也可以是:$Date_1="2003-6-25 23:29:14";
 
 $Date_2=substr($base,0,10);  
 
 $Date_List_a1=explode("-",$Date_1);
 
 $Date_List_a2=explode("-",$Date_2);
 //print_r($Date_List_a2);
 
 $d1=mktime(0,0,0,$Date_List_a1[1],$Date_List_a1[2],$Date_List_a1[0]);
 
 $d2=mktime(0,0,0,$Date_List_a2[1],$Date_List_a2[2],$Date_List_a2[0]);
 //echo round(($d1-$d2)/3600/24),'<br>';
 return round(($d1-$d2)/3600/24);


}
?>

php数据分页加数据显示效果

<?php
include_once(dirname(__FILE__).'../../Inc/Conn.php');
include_once(dirname(__FILE__).'../../photo/Inc/function.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
 font-size: 12px;
 height:17px;
 padding:8px 0px 0px 0px;
 text-align:center;
 
}
body {
 margin-left: 0px;
 margin-top: 10px;
 margin-right: 0px;
 margin-bottom: 0px;
}
td{
 border:1px solid #333;
 }

-->
</style></head>

<body>
<div style="height:26px;text-align:left; width:98%;font-size:16px; font-weight:bold; margin:0px auto;"><a href="export.php" target="_blank">导出Execel表格</a></div>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="8%"><strong>帐号</strong></td>
    <td width="14%"><strong>邮箱</strong></td>
    <td width="5%"><strong>性别</strong></td>
    <td width="9%"><strong>宝宝出生日期</strong></td>
    <td width="12%"><strong>省份</strong></td>
    <td width="9%"><strong>真实姓名</strong></td>
    <td width="12%"><strong>邮编</strong></td>
    <td width="10%"><strong>手机</strong></td>
    <td width="21%"><strong>地址</strong></td>
  </tr>
  <?php

    $sql  ="Select * from tablename";
  
    $result =mysql_query($sql) or die('fail1'.mysql_error());
    $rs  =mysql_fetch_array($result);
    $rdcount =mysql_num_rows($result);
    if($rdcount){
    $pagesize =20;
    $pagecount=($rdcount % $pagesize)?(int)($rdcount / $pagesize)+1:$rdcount/$pagesize;//统计总页面
    $page  =isset($_GET['page'])?$_GET['page']:1;//取得当前页面
    $start =($page>=1 && $page<=$pagecount)?$start=$pagesize*($page-1):$start=1;//取得超始记录
    $start =$start;
    $sql  =$sql." order by add_date desc limit $start,$pagesize";
       
    $result =mysql_query($sql) or die(mysql_error());
  while($rs =mysql_fetch_array($result) ){    
   echo"<tr>
    <td>".$rs['User_Name']."</td>
    <td>".$rs['User_Mail']."</td>
    <td>".$rs['User_Baby_Sex']."</td>
    <td>".$rs['User_Baby_Birth']."&nbsp;</td>
    <td>".$rs['sheng']." &nbsp;</td>
    <td>".$rs['User_rname']." &nbsp;</td>
    <td>".$rs['User_Zip']." &nbsp;</td>
    <td>".$rs['User_Hand']." &nbsp;</td>
    <td>".$rs['User_Address']." &nbsp;</td>
     </tr>
     ";
  
  }
  echo "<tr> <td colspan=9>";
 pagelist1($page,$pagecount,$rdcount,'?page=',$pagesize);
 echo "</td> </tr> ";
 }else{
   echo '暂时没有信息!';
 }


function pagelist1($page,$pagecount,$totalrecord,$url,$pagesize)

 if($page=="" || $page>$pagecount)
 {
  $page=1;
 }
 echo("记录".$totalrecord."条 每页".$pagesize."条 共".$pagecount."页 <a href=".$url."1>&nbsp;<<</a>&nbsp; ");
 if($page>1)
 { 
  echo("<a href=".$url.($page-1).">&nbsp;<&nbsp;</a> ");
 }  
 if($page+9>$pagecount)
 {
  $current = $pagecount; 
 }
 else
 { 
  $current = $page+9; 
 } 
 for($i=$page;$i<=$current;$i++)
 { 
  echo("<a href=".$url."$i class='sf'>$i</a> ");
 }
 if($pagecount>$page)
 {
  echo("<a href=".$url.($page+1).">&nbsp;>&nbsp;</a> ");
 } 
  echo("<a href=".$url.$pagecount.">&nbsp;>></a> ");
}
  ?>
 
</table>
</body>
</html>

php list 使用教程

list函数的作用list() 实际上是一种语言结构,不是函数... 提示和注释. 注释:该函数只用于数字索引的数组

我们来看个list实例

list($arr,$ar2) =array('aa','66');

list ($status, $host_count, $records)       = db_get_records($onadb, 'hosts', $where, "", 0);
list ($status, $dns_count, $records)        = db_get_records($onadb, 'dns', $where, "", 0);
list ($status, $interface_count, $records)  = db_get_records($onadb, 'interfaces', $where, "", 0);
list ($status, $domain_count, $records)     = db_get_records($onadb, 'domains', $where, "", 0);
list ($status, $subnet_count, $records)     = db_get_records($onadb, 'subnets', $where, "", 0);
list ($status, $pool_count, $records)       = db_get_records($onadb, 'dhcp_pools', $where, "", 0);
list ($status, $block_count, $records)      = db_get_records($onadb, 'blocks', $where, "", 0);
list ($status, $vlan_campus_count, $records) = db_get_records($onadb, 'vlan_campuses', $where, "", 0);
list ($status, $config_archive_count, $records) = db_get_records($onadb, 'configurations', $where, "", 0);

php 获取用户IP与IE信息程序

function onlineip()
 {
  global $_SERVER;
  if(getenv('HTTP_CLIENT_IP'))
  {
   $onlineip = getenv('HTTP_CLIENT_IP');
  }
  elseif(getenv('HTTP_X_FORWARDED_FOR'))
  {
   list($onlineip) = explode(',', getenv('HTTP_X_FORWARDED_FOR'));
  }
  elseif(getenv('REMOTE_ADDR'))
  {
   $onlineip = getenv('REMOTE_ADDR');
  }
  else
  {
   $onlineip = $_SERVER['REMOTE_ADDR'];
  }
  return $onlineip;
 }
 function imgdecode($string)
 {
  global $_SERVER;

  $key = md5(onlineip()."\t".$_SERVER['HTTP_USER_AGENT']);
  $coded = '';
  $string = base64_decode($string);
  $keylength = strlen($key);
  for($i = 0; $i < strlen($string); $i += $keylength)
  {
   $coded .= substr($string, $i, $keylength) ^ $key;
  }
  return $coded;
 }

php 网站在线安装源码

<?php
 /*
 +-------------------------------------------
 |
 |   Technology of WeSpace Software
 |   ========================================
 |   Powered by WeSpace
 |   (c) 2006 wane.net
 |   F_Space Ver3.x
 |   ========================================
 |   Site: http://www.wesofts.com
 |
 +-------------------------------------------
 |   Autohr : wsfuyibing
 | Email : websearch@163.com
 | MSN  : websearch@163.com
 +-------------------------------------------
 */
 error_reporting(E_ERROR | E_WARNING | E_PARSE);
 set_magic_quotes_runtime(0);
 define('IN_www.111cn.net',true);
 define('IN_LICENSED',true);
 define('WANE_ROOT','../');
 $timestamp = time();
 $configfile = '../config.inc.php';
 /*
 +-------------------------------------------
 + Check PHP version
 +-------------------------------------------
 */
 if (@phpversion() < '4.1.0')
 {
     $_COOKIE = &$HTTP_COOKIE_VARS;
        $_SERVER = &$HTTP_SERVER_VARS;
        $_FILES = &$HTTP_POST_FILES;
        $_GET = &$HTTP_GET_VARS;
        $_POST = &$HTTP_POST_VARS;
 }
 /*
 +-------------------------------------------
 + Language
 +-------------------------------------------
 */
 $lang = in_array($_GET['lang'],array('gbk','big5','utf-8-gbk','utf-8-big5')) ? $_GET['lang'] : 'utf-8-gbk';
 $charset = substr($lang ,0,5);
 if (!file_exists('./'.$lang.'/language.php'))
 {
  exit('Can not load language file . ');
 }
 else
 {
  require_once './'.$lang.'/language.php';
 }
 /*
 +-------------------------------------------
 + Step
 +-------------------------------------------
 */
 $step  = file_exists('../upload/install.lock') ? '0' : ($_GET['step'] ? $_GET['step'] : '1');
 $steps = 16;
 $step = $step > $steps ? $steps : $step;
 /*
 +-------------------------------------------
 + Template
 +-------------------------------------------
 */
 $tpl_header  = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
 $tpl_header .= '<html xmlns="http://www.w3.org/1999/xhtml">'."\n";
 $tpl_header .= '<head>'."\n";
 $tpl_header .= '<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'" />'."\n";
 $tpl_header .= '<title>'.$tplang['title'].'</title>'."\n";
 $tpl_header .= '<link href="style.css" rel="stylesheet" type="text/css" />'."\n";
 $tpl_header .= '</head>'."\n";
 $tpl_header .= '<body>'."\n";
 $tpl_header .= '<table border="0" cellpadding="0" cellspacing="0" >'."\n\t".'<tr>'."\n\t\t".'<td class="headtitle">'.$tplang['title'].'</td>'."\n\t\t".'<td class="headsteps">'.($step > 1 ? $tplang['lang_'.$lang].' <br />' : '').$tplang['step_name'].': '.$tplang['step'.$step].'('.$tplang['step_cur'].$step.$tplang['step_unit'].'/'.$tplang['step_total'].$steps.$tplang['step_unit'].')</td>'."\n\t".'</tr>'."\n".'</table>'."\n";
 $tpl_footer  = '<table border="0" cellpadding="0" cellspacing="0" >'."\n\t".'<tr>'."\n\t\t".'<td class="footer">'.$tplang['footer'].'</td>'."\n\t".'</tr>'."\n".'</table>'."\n".'</body>'."\n";
 $tpl_footer .= '</html>';
 /*
 +-------------------------------------------
 + Start Install
 +-------------------------------------------
 */
 if (file_exists('../upload/install.lock'))
 {
  echo $tpl_header;
  ?>
   <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
    <tr>
     <td class="alignc">
        <?=$tplang['step0_1']?>
     </td>
    </tr>
   </table>
  <?
  echo $tpl_footer;
 }
 elseif ($step == '1')
 {
  echo $tpl_header;
  ?>
  <div class="step1">
   <ol>
    <li>
     <a href="install.php?lang=gbk&amp;step=2"><?=$tplang['lang_gbk']?></a>
    </li>
    <li>
     <a href="install.php?lang=big5&amp;step=2"><?=$tplang['lang_big5']?></a>
    </li>
    <li>
     <a href="install.php?lang=utf-8-gbk&amp;step=2"><?=$tplang['lang_utf-8-gbk']?></a>
    </li>
    <li>
     <a href="install.php?lang=utf-8-big5&amp;step=2"><?=$tplang['lang_utf-8-big5']?></a>
    </li>
   </ol>
  </div>
  <?
  echo $tpl_footer;
 }
 elseif ($step == '2')
 {
  echo $tpl_header;
  ?>
   <div class="step2">
    <?=nl2br($tplang['license'])?>
   </div>
   <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
    <tr>
     <td class="alignc">
        <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step-1?>"><?=$tplang['step_last']?></a>
        <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step+1?>"><?=$tplang['step_next']?></a>
     </td>
    </tr>
   </table>
  <?
  echo $tpl_footer;
 }
 elseif ($step == '3')
 {
  function filewrite()
  {
   return (file_exists('../config.inc.php') && is_writable('../config.inc.php')) ? '<span class="yes">'.$GLOBALS['tplang']['yes'].'</span>' : '<span class="no">'.$GLOBALS['tplang']['no'].'</span>';
  }
  function dirwrite($folder)
  {
   $filename = '../'.$folder.'/index.htm';
   $fp = @fopen($filename,'w+');
   if (!$fp)
   {
    return '<span class="no">'.$GLOBALS['tplang']['no'].'</span>';
   }
   else
   {
    @fwrite($fp,' &nbsp; ');
    fclose($fp);
    return '<span class="yes">'.$GLOBALS['tplang']['yes'].'</span>';
   }
  }
  echo $tpl_header;
 ?>
  <div class="step3">
   <ol>
    <li>
     <?=$tplang['step3_8']?> <?=filewrite()?>
    </li>
   </ol>
  </div>
  <div class="step3">
   <ol>
    <li style="list-style:none;padding-left:0px;color:#ff0000; "><?=$tplang['step3_0']?></li>
    <li>
     <?=$tplang['step3_1']?> <?=dirwrite('upload')?>
    </li>
    <li>
     <?=$tplang['step3_2']?> <?=dirwrite('upload/cards')?>
    </li>
    <li>
     <?=$tplang['step3_3']?> <?=dirwrite('upload/gifts')?>
    </li>
    <li>
     <?=$tplang['step3_4']?> <?=dirwrite('upload/group')?>
    </li>
    <li>
     <?=$tplang['step3_5']?> <?=dirwrite('wespacedata')?>
    </li>
    <li>
     <?=$tplang['step3_6']?> <?=dirwrite('wespacedata/cache')?>
    </li>
    <li>
     <?=$tplang['step3_7']?> <?=dirwrite('wespacedata/template')?>
    </li>
   </ol>
  </div>
  <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
   <tr>
    <td class="alignc">
       <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step-1?>"><?=$tplang['step_last']?></a>
       <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step+1?>"><?=$tplang['step_next']?></a>
    </td>
   </tr>
  </table>
 <?
  echo $tpl_footer;
 }
 elseif ($step == '4')
 {
  function filewrite()
  {
   return (file_exists('../config.inc.php') && is_writable('../config.inc.php')) ? '<span class="yes">'.$GLOBALS['tplang']['yes'].'</span>' : '<span class="no">'.$GLOBALS['tplang']['no'].'</span>';
  }
  if (!file_exists($configfile))
  {
   echo $tpl_header;
   ?>
   <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
    <tr>
     <td class="alignc">
        <?=$tplang['step4_0']?>
     </td>
    </tr>
   </table>
   <?
   echo $tpl_footer;
  }
  else
  {
   require_once $configfile;
   echo $tpl_header;
   ?>
   <div class="step3">
    <ol>
     <li>
      <?=$tplang['step3_8']?> <?=filewrite()?>
     </li>
    </ol>
   </div>
   <form action="install.php?lang=<?=$lang?>&amp;step=5&amp;submit=1" method="post" name="wane_post">
   <table border="0" cellspacing="0" cellpadding="0" class="step4">
   <? foreach ($conf as $key=>$val){?>
              <tr>
                <td class="alignl"><?=$tplang['step4_'.$key]?></td>
                <td class="alignr"><input type="text" name="conf[<?=$key?>]" value="<?=$val?>" /></td>
              </tr>
   <? }?>
   <? foreach ($urlconf as $key=>$val){?>
              <tr>
                <td class="alignl"><?=$tplang['step4_'.$key]?></td>
                <td class="alignr"><input type="text" name="urlconf[<?=$key?>]" value="<?=$val?>" /></td>
              </tr>
   <? }?>
              <tr>
                <td colspan="2" class="alignc">
     <input type="hidden" name="configsubmit" value="1" />
     <input type="button" name="LastStep" value="<?=$tplang['step_last']?>" onclick="location='install.php?lang=<?=$lang?>&amp;step=<?=$step-1?>'" />
     <input type="submit" name="Submit" value="<?=$tplang['step_confsave']?>" />
     <input type="button" name="Skipit" value="<?=$tplang['step_skip']?>" onclick="location='install.php?lang=<?=$lang?>&amp;step=<?=$step+2?>'" />
    </td>
              </tr>
            </table>
   </form>
   <?
   echo $tpl_footer;
  }
 }
 elseif ($step == '5')
 {
  require_once WANE_ROOT.'install/query/5.php';
  header("location:install.php?lang={$lang}&step=6");
 }
 elseif ($step == '6')
 {
  if (!file_exists($configfile))
  {
   echo $tpl_header;
   ?>
   <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
    <tr>
     <td class="alignc">
        <?=$tplang['step4_0']?>
     </td>
    </tr>
   </table>
   <?
   echo $tpl_footer;
  }
  else
  {
   require_once $configfile;
   $conn = @mysql_connect($conf['dbserver'],$conf['dbuser'],$conf['dbpass']);
   echo $tpl_header;
   if (!$conn)
   {
    ?>
    <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
     <tr>
      <td class="alignc">
         <?=$tplang['step6_1_0']?>
      </td>
     </tr>
    </table>
    <?
   }
   else
   {
    ?>
    <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
     <tr>
      <td class="alignc">
         <?=$tplang['step6_1_1']?>
      </td>
     </tr>
    </table>
    <?
    $sels = @mysql_select_db($conf['dbname'],$conn);
    if (!$sels)
    {
     ?>
     <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
      <tr>
       <td class="alignc">
          <?=$tplang['step6_2_0']?>
       </td>
      </tr>
     </table>
     <?
    }
    else
    {
     ?>
     <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
      <tr>
       <td class="alignc">
          <?=$tplang['step6_2_1']?>
       </td>
      </tr>
     </table>
     <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
      <tr>
       <td class="alignc">
          <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step-2?>"><?=$tplang['step_last']?></a>
          <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step+1?>"><?=$tplang['step_next']?></a>
       </td>
      </tr>
     </table>
     <?
    }
   }
   echo $tpl_footer;
  }
 }
 elseif ($step == '7')
 {
  if (!file_exists($configfile))
  {
   echo $tpl_header;
   ?>
   <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
    <tr>
     <td class="alignc">
        <?=$tplang['step4_0']?>
     </td>
    </tr>
   </table>
   <?
   echo $tpl_footer;
  }
  else
  {
   echo $tpl_header;
   $sqlfile = './sql/struct.php';
   if (!file_exists($sqlfile))
   {
    ?>
    <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
     <tr>
      <td class="alignc">
         <?=$tplang['step7_0_0']?> (<?=$sqlfile?>)
      </td>
     </tr>
    </table>
    <?
   }
   else
   {
    $fp = @fopen($sqlfile,'r');
    if (!$fp)
    {
     ?>
     <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
      <tr>
       <td class="alignc">
          <?=$tplang['step7_0_1']?> (<?=$sqlfile?>)
       </td>
      </tr>
     </table>
     <?
    }
    else
    {
     require_once WANE_ROOT.'install/query/7.php';
     ?>
     <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
      <tr>
       <td class="alignc">
          <?=$tplang['step7_1']?>
       </td>
      </tr>
     </table>
     <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
      <tr>
       <td class="alignc">
          <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step-1?>"><?=$tplang['step_last']?></a>
          <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step+1?>"><?=$tplang['step_next']?></a>
       </td>
      </tr>
     </table>
     <?
    }
   }
   echo $tpl_footer;
  }
 }
 elseif ($step >= '8' && $step <= '14')
 {
  if (!file_exists($configfile))
  {
   echo $tpl_header;
   ?>
   <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
    <tr>
     <td class="alignc">
        <?=$tplang['step4_0']?>
     </td>
    </tr>
   </table>
   <?
   echo $tpl_footer;
  }
  else
  {
   echo $tpl_header;
   $sqlfile = './'.$lang.'/data'.$step.'.php';
   if (!file_exists($sqlfile))
   {
    ?>
    <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
     <tr>
      <td class="alignc">
         <?=$tplang['step7_0_0']?> (<?=$sqlfile?>)
      </td>
     </tr>
    </table>
    <?
   }
   else
   {
    $fp = @fopen($sqlfile,'r');
    if (!$fp)
    {
     ?>
     <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
      <tr>
       <td class="alignc">
          <?=$tplang['step7_0_1']?> (<?=$sqlfile?>)
       </td>
      </tr>
     </table>
     <?
    }
    else
    {
     require_once WANE_ROOT.'install/query/8-14.php';
     ?>
     <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
      <tr>
       <td class="alignc">
          <?=$tplang['step14_1']?>
       </td>
      </tr>
     </table>
     <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
      <tr>
       <td class="alignc">
          <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step-1?>"><?=$tplang['step_last']?></a>
          <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step+1?>"><?=$tplang['step_next']?></a>
       </td>
      </tr>
     </table>
     <?
    }
   }
   echo $tpl_footer;
  }
 }
 elseif ($step == '15')
 {
  echo $tpl_header;
  ?>
   <form action="install.php?lang=<?=$lang?>&amp;step=<?=$step+1?>&amp;submit=1" method="post" name="wane_post">
   <table border="0" cellspacing="0" cellpadding="0" class="step15">
              <tr>
                <td class="alignl"><?=$tplang['step15_u']?></td>
                <td class="alignl"><input type="text" name="username" value="<?=$val?>" /></td>
              </tr>
              <tr>
                <td class="alignl"><?=$tplang['step15_p']?></td>
                <td class="alignl"><input type="text" name="password" value="<?=$val?>" /></td>
              </tr>
              <tr>
                <td class="alignl"><?=$tplang['step15_s']?></td>
                <td class="alignl">
    <input name="sex" type="radio" value="1" checked /> <?=$tplang['step15_s1']?>
                <input name="sex" type="radio" value="2" /> <?=$tplang['step15_s2']?>
    </td>
              </tr>
              <tr>
                <td class="alignl"><?=$tplang['step15_e']?></td>
                <td class="alignl"><input type="text" name="email" value="<?=$val?>" /></td>
              </tr>
              <tr>
                <td colspan="2" class="alignc">
     <input type="hidden" name="configsubmit" value="1" />
     <input type="submit" name="Submit" value="<?=$tplang['step_confsave']?>" />
    </td>
              </tr>
            </table>
   </form>
  <?
  echo $tpl_footer;
 }
 else
 {
  $configsubmit = trim($_POST['configsubmit']);
  if ($step == '16' && $configsubmit)
  {
   $magic = @get_magic_quotes_gpc();
   function cutempty($varchar)
   {
    global $magic,$_POST;
    $varchar = $magic ? stripslashes($_POST[$varchar]) : $_POST[$varchar];
    return addslashes(htmlspecialchars(str_replace(array(" ","\n","\t","\r"),array("","","",""),$varchar)));
   }
   $username = substr(cutempty('username'),0,15);
   $password = cutempty('password');
   $email = cutempty('email');
   $sex = cutempty('sex');
   if (!$username || !$password || !$email || !$sex)
   {
    echo $tpl_header;
    ?>
    <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
     <tr>
      <td class="alignc">
       <br />
       <?=$tplang['step15_1_0']?><br /><br />
       <a href="install.php?lang=<?=$lang?>&amp;step=<?=$step-1?>"><?=$tplang['step_last']?></a>
       <br /> <br />  
      </td>
     </tr>
    </table>
    <?
    echo $tpl_footer;
   }
   else
   {
    require_once WANE_ROOT.'install/query/16.php';
    echo $tpl_header;
    ?>
    <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
     <tr>
      <td class="alignc">
       <br />
       <?=$tplang['step16_1']?><br /><br />
       <a href="../"><?=$tplang['step16_2']?></a>
       <br /> <br />    
      </td>
     </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
     <tr>
      <td class="alignc">
       <br />
       <?=$tplang['step15_u']?>:<?=$username?> <br />
       <?=$tplang['step15_p']?>:<?=$password?> <br />
       <?=$tplang['step15_s']?>:<?=$sex=='1' ? $tplang['step15_s1'] : $tplang['step15_s2']?> <br />
       <?=$tplang['step15_e']?>:<?=$email?> <br /><br />
      </td>
     </tr>
    </table>
    <?
    echo $tpl_footer;
   }
  }
  else
  {
   echo $tpl_header;
   ?>
    <table border="0" cellspacing="0" cellpadding="0" class="stepchose">
     <tr>
      <td class="alignc">
       <br />
       <?=$tplang['step16_1']?><br /><br />
       <a href="../"><?=$tplang['step16_2']?></a>
       <br /> <br />    
      </td>
     </tr>
    </table>
   <?
   echo $tpl_footer;
  }
 }
?>

[!--infotagslink--]

相关文章

  • MySQL性能监控软件Nagios的安装及配置教程

    这篇文章主要介绍了MySQL性能监控软件Nagios的安装及配置教程,这里以CentOS操作系统为环境进行演示,需要的朋友可以参考下...2015-12-14
  • 详解Mysql中的JSON系列操作函数

    新版 Mysql 中加入了对 JSON Document 的支持,可以创建 JSON 类型的字段,并有一套函数支持对JSON的查询、修改等操作,下面就实际体验一下...2016-08-23
  • js导出table数据到excel即导出为EXCEL文档的方法

    复制代码 代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta ht...2013-10-13
  • 深入研究mysql中的varchar和limit(容易被忽略的知识)

    为什么标题要起这个名字呢?commen sence指的是那些大家都应该知道的事情,但往往大家又会会略这些东西,或者对这些东西一知半解,今天我总结下自己在mysql中遇到的一些commen sense类型的问题。 ...2015-03-15
  • MySQL 字符串拆分操作(含分隔符的字符串截取)

    这篇文章主要介绍了MySQL 字符串拆分操作(含分隔符的字符串截取),具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2021-02-22
  • mysql的3种分表方案

    一、先说一下为什么要分表:当一张的数据达到几百万时,你查询一次所花的时间会变多,如果有联合查询的话,有可能会死在那儿了。分表的目的就在于此,减小数据库的负担,缩短查询时间。根据个人经验,mysql执行一个sql的过程如下:1...2014-05-31
  • Windows服务器MySQL中文乱码的解决方法

    我们自己鼓捣mysql时,总免不了会遇到这个问题:插入中文字符出现乱码,虽然这是运维先给配好的环境,但是在自己机子上玩的时候咧,总得知道个一二吧,不然以后如何优雅的吹牛B。...2015-03-15
  • 用VirtualBox构建MySQL测试环境

    宿主机使用网线的时候,客户机在Bridged Adapter模式下,使用Atheros AR8131 PCI-E Gigabit Ethernet Controller上网没问题。 宿主机使用无线的时候,客户机在Bridged Adapter模式下,使用可选项里唯一一个WIFI选项,Microsoft Virtual Wifi Miniport Adapter也无法上网,故弃之。...2013-09-19
  • Centos5.5中安装Mysql5.5过程分享

    这几天在centos下装mysql,这里记录一下安装的过程,方便以后查阅Mysql5.5.37安装需要cmake,5.6版本开始都需要cmake来编译,5.5以后的版本应该也要装这个。安装cmake复制代码 代码如下: [root@local ~]# wget http://www.cm...2015-03-15
  • 忘记MYSQL密码的6种常用解决方法总结

    首先要声明一点,大部分情况下,修改MySQL密码是需要有mysql里的root权限的...2013-09-11
  • MySQL数据库备份还原方法

    MySQL命令行导出数据库: 1,进入MySQL目录下的bin文件夹:cd MySQL中到bin文件夹的目录 如我输入的命令行:cd C:/Program Files/MySQL/MySQL Server 4.1/bin (或者直接将windows的环境变量path中添加该目录) ...2013-09-26
  • C# 导出Excel的6种简单方法实现

    C# 导出 Excel 的6种简单方法:数据表导出到 Excel,对象集合导出到 Excel,数据库导出到 Excel,微软网格控件导出到 Excel,数组导出到 Excel,CSV 导出到 Excel,你都会了吗?需要的朋友们下面随着小编来一起学习学习吧...2020-06-25
  • Mysql命令大全(详细篇)

    一、连接Mysql格式: mysql -h主机地址 -u用户名 -p用户密码1、连接到本机上的MYSQL。首先打开DOS窗口,然后进入目录mysql/bin,再键入命令mysql -u root -p,回车后提示你输密码.注意用户名前可以有空格也可以没有空格,但是密...2015-11-08
  • node.js如何操作MySQL数据库

    这篇文章主要介绍了node.js如何操作MySQL数据库,帮助大家更好的进行web开发,感兴趣的朋友可以了解下...2020-10-29
  • Navicat for MySQL 11注册码\激活码汇总

    Navicat for MySQL注册码用来激活 Navicat for MySQL 软件,只要拥有 Navicat 注册码就能激活相应的 Navicat 产品。这篇文章主要介绍了Navicat for MySQL 11注册码\激活码汇总,需要的朋友可以参考下...2020-11-23
  • mysql IS NULL使用索引案例讲解

    这篇文章主要介绍了mysql IS NULL使用索引案例讲解,本篇文章通过简要的案例,讲解了该项技术的了解与使用,以下就是详细内容,需要的朋友可以参考下...2021-08-14
  • 基于PostgreSQL和mysql数据类型对比兼容

    这篇文章主要介绍了基于PostgreSQL和mysql数据类型对比兼容,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2020-12-25
  • RHEL6.5编译安装MySQL5.6.26教程

    一、准备编译环境,安装所需依赖包yum groupinstall 'Development' -y yum install openssl openssl-devel zlib zlib-devel -y yum install readline-devel pcre-devel ncurses-devel bison-devel cmake -y二、编译安...2015-10-21
  • Mysql中 show table status 获取表信息的方法

    这篇文章主要介绍了Mysql中 show table status 获取表信息的方法的相关资料,需要的朋友可以参考下...2016-03-12
  • 20分钟MySQL基础入门

    这篇文章主要为大家分享了20分钟MySQL基础入门教程,快速掌握MySQL基础知识,真正了解MySQL,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...2016-12-02