Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Mysql lygiavimai

Parašė WantedBoy· 2008 Kov. 26 18:03:09
#5

Infusion.php

<?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

// Infusiono informacija
$inf_title = "Rezultatai";
$inf_description = "Rezultatø administravimo sistema";
$inf_version = "2.0";
$inf_developer = "LT Modding Team (MAnjack)";
$inf_email = "MAnjack@super.lt";
$inf_weburl = "http://turnuras.xz.lt/";

$inf_folder = "rezultatai";
$inf_admin_image = "";
$inf_admin_panel = "rezultatai_admin.php";

// Duombaze
$inf_newtables = 1;
$inf_altertables = 0;
$inf_deldbrows = 0;

$inf_newtable_[1] = "rezultatai (
id int(255) unsigned NOT NULL auto_increment,
komanda1 varchar(55) NOT NULL default '',
rezultatas1 varchar(55) NOT NULL default '',
rezultatas2 varchar(55) NOT NULL default '',
komanda2 varchar(55) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
";


$inf_droptable_[1] = "rezultatai";
?>



Rezultatai.php

<?
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";

echo "<table width='100%'>\n";
$uzklausa=mysql_query("SELECT komanda1, rezultatas1, rezultatas2, komanda2 from ".$db_prefix."rezultatai order by id");
   if (dbrows($uzklausa)) {
      echo "<tr>
  <td class='tbl1'><b>Komanda</b></td>
  <td class='tbl1'><b>Rezultatas</b></td>
  <td class='tbl1'><b>Rezultatas</b></td>
  <td class='tbl1'><b>Komanda</b></td>
</tr>\n";
      $i = 1;
      while ($data = dbarray($uzklausa)) {
         $i = $i+1;
         $tbl = $i%2 == 0 ? "class='tbl2'" : "class='tbl1'";
         echo "<tr>
  <td $tbl>".$data['komanda1']."</td>
  <td $tbl>".$data['rezultatas1']."</td>
  <td $tbl>".$data['rezultatas2']."</td>
  <td $tbl>".$data['komanda2']."</td>
  </tr>\n";
  }
  }
     echo "</table>\n";
   
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>



Irasyti.php
<?

require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";


opentable("Rezultato ra&#240;ymas");
$komanda1 = $_POST['komanda1'];
$rezultatas1 = $_POST['rezultatas1'];
$rezultatas2 = $_POST['rezultatas2'];
$komanda2 = $_POST['komanda2'];

if ($komanda1!='' && $rezultatas1!='' && $rezultatas2!='' && $komanda2!=''){
$uzklausa = dbquery("INSERT INTO ".$db_prefix."rezultatai (komanda1,rezultatas1,rezultatas2,komanda2) VALUES ('$komanda1','$rezultatas1','$rezultatas2','$komanda2');");
if ($uzklausa) echo "<center><a href='".BASEDIR."index.php'>Rungtyn&#235;s prid&#235;tos</a></center>\n";
} else { echo "<center>Blogi duomenys, bandykite dar kart&#224;</center>";
}

echo "<form method='post' action='".FUSION_SELF."'>
<center><br><select name='komanda1'>
<option value='Atlanta'>Atlanta</option>
<option value='Boston'>Boston</option>
<option value='Charlotte'>Charlotte</option>
<option value='Chicago'>Chicago</option>
<option value='Cleveland'>Cleveland</option>
<option value='Clippers'>Clippers</option>
<option value='Dallas'>Dallas</option>
<option value='Denver'>Denver</option>
<option value='Detroit'>Detroit</option>
<option value='Goden State'>Goden State</option>
<option value='Houston'>Houston</option>
<option value='Indiana'>Indiana</option>
<option value='Lakers'>Lakers</option>
<option value='Memphis'>Memphis</option>
<option value='Miami'>Miami</option>
<option value='Milwaukee'>Milwaukee</option>
<option value='Minnesota'>Minnesota</option>
<option value='New Jersey'>New Jersey</option>
<option value='New Orlean'>New Orlean</option>
<option value='New York'>New York</option>
<option value='Orlando'>Orlando</option>
<option value='Philadelphia'>Philadelphia</option>
<option value='Phoenix'>Phoenix</option>
<option value='Portland'>Portland</option>
<option value='Sacramento'>Sacramento</option>
<option value='San Antonio'>San Antonio</option>
<option value='Seatle'>Seatle</option>
<option value='Toronto'>Toronto</option>
<option value='Utah'>Utah</option>
<option value='Washington'>Washington</option>
</select>
&nbsp;
 <input format='NNN' name='rezultatas1' size='3' maxlength='3'/> :
 <input format='NNN' name='rezultatas2' size='3' maxlength='3'/>
&nbsp;
<select name='komanda2'>
<option value='Atlanta'>Atlanta</option>
<option value='Boston'>Boston</option>
<option value='Charlotte'>Charlotte</option>
<option value='Chicago'>Chicago</option>
<option value='Cleveland'>Cleveland</option>
<option value='Clippers'>Clippers</option>
<option value='Dallas'>Dallas</option>
<option value='Denver'>Denver</option>
<option value='Detroit'>Detroit</option>
<option value='Goden State'>Goden State</option>
<option value='Houston'>Houston</option>
<option value='Indiana'>Indiana</option>
<option value='Lakers'>Lakers</option>
<option value='Memphis'>Memphis</option>
<option value='Miami'>Miami</option>
<option value='Milwaukee'>Milwaukee</option>
<option value='Minnesota'>Minnesota</option>
<option value='New Jersey'>New Jersey</option>
<option value='New Orlean'>New Orlean</option>
<option value='New York'>New York</option>
<option value='Orlando'>Orlando</option>
<option value='Philadelphia'>Philadelphia</option>
<option value='Phoenix'>Phoenix</option>
<option value='Portland'>Portland</option>
<option value='Sacramento'>Sacramento</option>
<option value='San Antonio'>San Antonio</option>
<option value='Seatle'>Seatle</option>
<option value='Toronto'>Toronto</option>
<option value='Utah'>Utah</option>
<option value='Washington'>Washington</option>
</select></br><p>
<input type='submit' value='Saugoti' class='button'>&nbsp;
<input type='reset' value='Valyti' class='button'></p>
</form>
</center>";
closetable();

require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>



Redagavimo manau nereikia failo ;)

Redagavo WantedBoy· 2008 Kov. 26 18:03:18