我的論壇源代碼(七)

info.inc.php(做為現在的主流開發語言)主要做些判斷和信息處理

<?php(做為現在的主流開發語言)
function update($reginfo)
{
     switch ($reginfo[4])
      {
     case ($reginfo[4]==1):
       $reginfo[4]=”男”;
       break;
     default:
       $reginfo[4]=”女”;
       break;
      }

      switch ($reginfo[11])
      {
      case ($reginfo[11]==1):
        $reginfo[11]=”會員”;
        break;
      case ($reginfo[11]==2):
        $reginfo[11]=”版主”;
        break;
      case ($reginfo[11]==3):
        $reginfo[11]=”管理員”;
        break;
      case ($reginfo[11]==4):
        $reginfo[11]=”站長”;
        break;
      default:
        $reginfo[11]=”遊客”;
      break;
      }
      switch ($reginfo[6])
      {
      case ($reginfo[6]==5):
        $reginfo[6]=”我是學生”;
        break;
      case ($reginfo[6]==1):
        $reginfo[6]=”公務員”;
        break;
      case ($reginfo[6]==2):
        $reginfo[6]=”公司雇員”;
        break;
      case ($reginfo[6]==3):
        $reginfo[6]=”自由職業”;
        break;
      case ($reginfo[6]==4):
        $reginfo[6]=”無所事事”;
        break;
      default:
        $reginfo[6]=”不告訴你”;
      break;
      }
      if ($reginfo[12]==1) $reginfo[12]=”是”;
      else $reginfo[12]==”否”;
      if ($reginfo[18]==1) $reginfo[18]=”是”;
      else $reginfo[18]=”否”;
if ($reginfo[12]==2)

發佈留言