Jump to content
php.lv forumi

viesu grāmata


keissfootball

Recommended Posts

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Roze, jā, bet ar to man tāpat rādīsies tabula pa centru nogriežot labo malu un kontaktu logu (apakšā). šis kods ir, kad piemēram ievada nepareizu paroli un viņš tev parāda šo logu, bet kāpēc viņš to nobīda pa labi noraujot malas? :huh:

 

// tjipa nepareiza parole

if ($pwd <> $admin_password) {
echo "<HTML>
<HEAD>
<TITLE>".$lang[$conf['lang']]['wrong-admin-password']." - $title</TITLE>
<META HTTP-EQUIV='REFRESH' CONTENT='1; URL=$PHP_SELF?page=$page'>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<LINK REL='StyleSheet' HREF='fg-style.css' TYPE='text/css'>
</HEAD>";
echo "<BODY bgcolor='$background'>
<H1>".$lang[$conf['lang']]['wrong-admin-password']."</H1>
<center>".$lang[$conf['lang']]['one-moment']."</center>
</BODY>
</HTML>";
exit;
}

Link to comment
Share on other sites

JOCĪGI , KA VIŅŠ MAN , KAD ES IEVADU PAROLI , LAI DZĒSTU ZIŅU UN AROLE IR PAREIZA , TAD VISS IR KĀRTĪBĀ, BET, JA NEPAREIZA, TAD NOGRIEŽ MALAS  :blink:  :blink:  :blink:  :blink:  :blink:  :blink:  :blink:

25198[/snapback]

Nepareizs kods, acīmredzot.

Link to comment
Share on other sites

es neredzu lielu starpību starp "pareizas paroles" kodu:

echo "<HTML>
<HEAD>
<TITLE>".$lang[$conf['lang']]['deleted']." - $title</TITLE>
<META HTTP-EQUIV='REFRESH' CONTENT='1; URL=$PHP_SELF?page=$page'>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<LINK REL='StyleSheet' HREF='fg-style.css' TYPE='text/css'>
</HEAD>";
  echo "<BODY bgcolor='$background'>
<H1>".$lang[$conf['lang']]['deleted']."</H1>
<center>".$lang[$conf['lang']]['one-moment']."</center>
</BODY>
</HTML>";

break;
}

 

un "nepareizās parole kodu"

if ($pwd <> $admin_password) {
        echo "<HTML>
<HEAD>
<TITLE>".$lang[$conf['lang']]['wrong-admin-password']." - $title</TITLE>
<META HTTP-EQUIV='REFRESH' CONTENT='1; URL=$PHP_SELF?page=$page'>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<LINK REL='StyleSheet' HREF='fg-style.css' TYPE='text/css'>
</HEAD>";
  echo "<BODY bgcolor='$background'>
<H1>".$lang[$conf['lang']]['wrong-admin-password']."</H1>
<center>".$lang[$conf['lang']]['one-moment']."</center>
</BODY>
</HTML>";
        exit;
  }

  $record = file($data_path);  [COLOR=orange]//laikam sheit jau beidzas tā funkcija un viņš ieraksta kautko failā[/COLOR]
  $jmlrec = count($record);
  for ($i=0; $i<$jmlrec; $i++) {
      $row = explode("|~~|",$record[$i]);
      if ($id==$row[1]) {
             $record[$i] = "";
                 break;
          }
  }
  $update_data = fopen($data_path,"w");
        for ($j=0; $j<$jmlrec; $j++) {
       if ($record[$j] <> "") fputs($update_data,$record[$j]);
       }
        fclose($update_data);

Link to comment
Share on other sites

eu bet shitaa koda dalja

$record = file($data_path);  [COLOR=orange]//laikam sheit jau beidzas tā funkcija un viņš ieraksta kautko failā[/COLOR]
 $jmlrec = count($record);
 for ($i=0; $i<$jmlrec; $i++) {
     $row = explode("|~~|",$record[$i]);
     if ($id==$row[1]) {
            $record[$i] = "";
                break;
         }
 }
 $update_data = fopen($data_path,"w");
       for ($j=0; $j<$jmlrec; $j++) {
      if ($record[$j] <> "") fputs($update_data,$record[$j]);
      }
       fclose($update_data);

 

vispaar neattiecas uz to paraadiishanu

Link to comment
Share on other sites


×
×
  • Create New...