Skip to content

Instantly share code, notes, and snippets.

Created May 23, 2009 09:59
Show Gist options
  • Save anonymous/116570 to your computer and use it in GitHub Desktop.
Save anonymous/116570 to your computer and use it in GitHub Desktop.
rating.php
<?
$domain = GetHostByName($REMOTE_ADDR);
if($_POST[submit1])
{
$f="INSERT INTO vote SET id_img='".$_POST['img1']."',rating='".$_POST['num']."',ipname='$domain'";
$row=mysql_query($f);
}
else { echo "<b>click on vote!</b> or go back to <A HREF=http://agh.ge/form/vote/index.php>home page</A>";}
?>
<?php
function yana_table($pic, $text,$form2, $radio2){
echo '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
for ($i=0; $i<count($pic); $i++){
echo '<tr><td valign=top><TABLE width="100%" border="0" cellpadding="0" cellspacing="0" >
<TR>
';
for($g=0; $g<count($pic[$i]); $g++){
echo "<td valign=top class=models><img src='images/models/".$pic[$i][$g]."'></td>
<td valign=top align=left class=models>
<TABLE width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#333333>
<TR>
<TD class=models><span id=mnumber1>".$text."</span></TD>
</TR>
<TR>
<TD class=models>
<TABLE width=100% border=0 cellpadding=0 cellspacing=0>
<TR>";
echo "<TD align=left valign=top id='mnumber1'>
<form action='index.php?page=cont2' method='POST' name='form1'>";
for ($for2=0; $for2<count($form2); $for2++){
for ($s=0; $s<count($form2[$for2]); $s++){
echo " <input type='hidden' name='img1' value='".$form2[$for2][$s]."'>";
}
}
for ($form=0; $form<count($radio2); $form++){
echo "<span class=myClass><input name='num' value='".$radio2[$form]."' type='radio'></span>";
}
echo " </TD>
";
echo "</TR>
<tr><td><input type=submit name=submit1 value=Vote!></form></td></tr>
</TABLE>
</TD>
</TR>
</TABLE></td>";
}
echo '</TR>
</TABLE></td>
</tr>';
}
echo '</table>';
}
$mtext="<span><B>Models 1 London</B><BR>
2pm Model Management Copenhagen
Elite New York New York
Marilyn Agency Paris
Model Management Hamburg Hamburg</span><BR>";
$form=array('1','2','3','4','5','6','7','8','9');
$radio=array('1','2','3','4','5','6');
$mpic=array (array('1.jpg', '2.jpg', '3.jpg'), array('4.jpg','5.jpg','6.jpg'), array('7.jpg','8.jpg','9.jpg'));
yana_table($mpic,$mtext,$form,$radio);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment