| Server IP : 61.19.30.66 / Your IP : 216.73.216.80 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/cooperative/ |
Upload File : |
<?
require_once "config/configuser.inc.php";
require_once "heads.php";
$teach=$objResult["Username"];
$cllass=$objResult["regisroom"];
$signup = (date("Y")+543).date("/n/j");
/////////////////////////
$crsql="SELECT (sell_years) FROM `sell_config`";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$yearsm1=$dcrd[0];
$yearsm2=$yearsm1-1;
$yearsm3=$yearsm1-2;
$yearsm4=$yearsm1-3;
$yearsm5=$yearsm1-4;
$yearsm6=$yearsm1-5;
$crsql="SELECT (sell_staconfig) FROM `sell_member` where sell_username='$teach' ";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$class=$dcrd[0];
$crsql="SELECT (sell_status) FROM `sell_config`";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$status=$dcrd[0];
?>
<html>
<head>
<title>-:- ADMIN -:-</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<script language="javascript">
function chk_all(){
var x=document.getElementsByTagName("input");
for(i=0;i<=x.length;i++){
if(x[i].type=="checkbox"){
x[i].checked=true;
}
}
}
function unchk_all(){
var x=document.getElementsByTagName("input");
for(i=0;i<=x.length;i++){
if(x[i].type=="checkbox"){
x[i].checked=false;
}
}
}
</script>
<body bgcolor="#FFFFFF" onLoad="javascript:document.getElementById('useradmin').focus();">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
</tr>
<tr>
<td><div align="left">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<form method="post" action="regisserchstu.php">
<tr>
<tr>
<td><div align="center"><font color="#666666" size="2">ค้นหา
:
<input type=text name=txtsearch size=20 class=input>
<input name="searchtype" type="radio" value="room" checked>ห้อง
<input name="Submit" type="submit" class="submitad" value="ค้นหา">
</font> </div></td>
</tr>
</form>
</table></td>
</tr>
<tr>
</tr>
</table>
<form name ="checkForm" action="regisavestu.php" method="post" onSubmit="return check()">
<table>
<tr>
<td><div align="right"><font color="#333333" size="2">จำนวนหุ้น
:</font></div></td>
<td><font size="3">
<input name=shere id=shere type=text class="input" size=20 maxlength ="50">
</font></td>
</tr>
<tr>
<td><div align="right"><font color="#333333" size="2">จำนวนเงิน
:</font></div></td>
<td><font size="3">
<input name=money id=money type=text class="input" size=20 maxlength ="50">
</font></td>
</tr>
<tr>
<td><div align="right"><font color="#333333" size="2">ปีเข้าเรียน
:</font></div></td>
<td><font size="3">
<input name=yearsin id=yearsin type=text class="input" size=20 maxlength ="50"
value='<? if($class==1 )
{
echo "$yearsm1";
}
else if($class== 2)
{
echo "$yearsm2";
}
else if($class== 3)
{
echo "$yearsm3";
}
else if($class== 4)
{
echo "$yearsm4";
}
else if($class== 5)
{
echo "$yearsm5";
}
else if($class== 6)
{
echo "$yearsm6";
}
?>'
>
</font></td>
</tr>
<tr>
<td><div align="right"><font color="#333333" size="2">วันที่สมัคร
:</font></div></td>
<td><font size="3">
<input name=datesi id=datesi type=text class="input" size=10 maxlength ="10" value='<? echo "$signup"; ?>'>
</font></td>
</tr>
<tr>
<td><div align="right"><font color="#333333" size="2">สถานะ นร.
:</font></div></td>
<td><font size="3">
<input name=status id=status type=text class="input" size=1 maxlength ="1" value='2' readonly='readonly'></font></td>
</tr>
</table>
<a href="javascript:chk_all();" >เลือกทั้งหมด All11</a>
<a href="javascript:unchk_all();">ยกเลิก All </a>
<table width="400" border="0" align="left" cellpadding="1" cellspacing="1">
<tr>
<td><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr class="jobscss">
<td bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr bgcolor="#006666">
<td width="44" height="24"> <div align="center"><font color="#FFFFFF" size="2">#</font></div></td>
<td width="100"> <div align="center"><font color="#FFFFFF" size="2">เลขประจำตัว</font></div></td>
<td width="600"><div align="center"><font color="#FFFFFF" size="2">ชื่อ</font></div></td>
<td width="600"><div align="center"><font color="#FFFFFF" size="2">ห้อง</font></div></td>
<td width="100"> <div align="center"><font color="#FFFFFF" size="2">#</font></div></td>
</tr>
</table></td>
</tr>
</table>
<?
$page = $_GET['page'];
$num = 1;
$select_type="select * from klw";
$query_select=mysql_query($select_type);
$num_rows=mysql_num_rows($query_select);
if($num_rows<1){
echo "<br><br><center><font color=#666666 face=tahoma size=2>ไม่พบข้อมูลทีี่ท่านค้นหาค่ะ</font></center>";
}else{
$select="select * from klw";
$q_ry = mysql_query($select);
$num_rows=mysql_num_rows($q_ry);
$pagesize=900;
$rt=$num_rows%$pagesize;
if($rt!=0)
{
$totalpage=floor($num_rows/$pagesize)+1;
}
else
{
$totalpage=floor($num_rows/$pagesize);
$toppic_id=1;
}
if(empty($page))
{
$page=1;
}
mysql_free_result($q_ry);
$goto=($page-1)*$pagesize;
$sql_select_mem="select * from klw where room='$_POST[txtsearch]' and cllass='$class' limit $goto,$pagesize";
$fect=mysql_query($sql_select_mem);
if(!$fect)
{
("ติดต่อฐานข้อมูลไม่ได้".mysql_error());
exit;
}
$bgcount=0;
while($rows=mysql_fetch_array($fect))
{
$idmember =$rows['UserID'];
$idcodestoc =$rows['Username'];
$namestoc =$rows['Name'];
$surname=$rows['surname'];
$pricinstoc =$rows['pricinstoc'];
$pricsellstoc =$rows['pricsellstoc'];
$room =$rows['room'];
?>
<?
$crsql="SELECT count(sell_username) FROM `sell_member` where sell_username='$idcodestoc'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$countname=$dcrd[0];
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr bgcolor="#FFFFFF">
<td width="44" height="24"> <div align="center"><font color="#990000" size="2"><? echo "$num"; ?></font></div></td>
<td width="50"><font color="#003366" size="2"><? echo "$idcodestoc"; ?></font><br> <div align="left"></div></td>
<td width="210"><font color="#003366" size="2"><? echo "$namestoc"; ?> <? echo "$surname"; ?></font></td>
<td width="210"><font color="#003366" size="2"><? echo "$room"; ?>
<? if($countname< 1 )
{
echo "";
}
else if($countname>= 1)
{
echo "สมาชิก";
}
?>
</font></td>
<td align="center" width="20"><input type="checkbox" name="chkEmail[]" value="<? echo "$idcodestoc"; ?>"></td>
</tr>
</table></td>
</tr>
</table>
<?
$num = $num+1;
}
echo "<div align=center><br>
<font color=#999999 size=2><span class=cc> ";
for($i=1;$i<$page;$i++)
{
echo"<a href='$PHP_SELF?page=$i'><font size=2 color='#000000' class=textborder>$i</font></a> ";
}
echo"<font size=2 color=#000000><b><font size=2 color='#FF00000' class=textborderok>$page</font></b></font> ";
for($i=$page+1;$i<=$totalpage;$i++)
{
echo"<a href='$PHP_SELF?page=$i'><font size=2 color='#000000' class=textborder>$i</font></a> ";
}
echo "</span></font> </div>";
}
?>
</td>
</tr>
</table></td>
</tr>
</table>
<? if($status == 1)
{
echo "<input name=btnSave type=submit style=font-size:30px; value=เพิ่มสมาชิก >
";
}
else if($status == "")
{
echo "ไม่มีสิทธิ์ขาย";
}
else
{
echo "ไม่มีสิทธิ์ขาย";
}
?>
<script language="javascript">
function check() {
if(document.checkForm.shere.value=="") {
alert("ระบุหุ้น จำนวนเงิน") ;
document.checkForm.shere.focus() ;
return false ;
}
else
return true ;
}
</script>
</form>
<? if($status< 1 )
{
echo "";
}
else if($status== 1)
{
echo include ("regisinstu.php");
}
?>
</table>
</body>
</html>