QQ_ViewTable.inc
Line #0:<?php
Line #1:
Line #2:if (isset($_GET[bimod])) { $_GET[Desc]="*"; $_GET[biord]="wid";}
Line #3:
Line #4:if (isset($_GET[goon])) $_POST[goon]=$_GET[goon];
Line #5:if (isset($_GET[Desc])) $_POST[Desc]=$_GET[Desc];
Line #6:if (isset($_GET[Bis])) $_POST[Bis]=$_GET[Bis];
Line #7:if (isset($_GET[Export])) $_POST[Export]=$_GET[Export];
Line #8:if (isset($_GET[biord])) $_POST[biord]=$_GET[biord];
Line #9:if (isset($_GET[Limit])) $_POST[Limit]=$_GET[Limit];
Line #10:if (!isset($_POST[Limit])) $_POST[Limit]=50;
Line #11:
Line #12:$_POST[Bis]=trim($_POST[Bis]);
Line #13:if (isset($_GET[sql])) $_POST[Bis]=$_GET[sql];
Line #14:
Line #15:
Line #16:?>
Line #17:
Line #18:<BODY background='Qhat.gif' CELLSPACING="0" CELLPADDING="0" align="left">
Line #19:
Line #20:<FORM name=cimform action='' method='post'>
Line #21:
Line #22:<INPUT TYPE='CHECKBOX' NAME='Desc' Title='' value=''
Line #23:<? if (isset($_POST[Desc])) echo(' CHECKED '); ?>
Line #24:
Line #25:> Sorrend<?if (isset($_POST[Desc])) echo("(S)");?>
Line #26:
Line #27:
Line #28:
Line #29: TYPE='text' NAME='Bis' size=100
Line #30: value='<?php if (isset($_POST[Bis])) echo($_POST[Bis]); ?>'
Line #31:>
Line #32:
Line #33:<br> Limit:
Line #34:
Line #35:
Line #36: TYPE='text' NAME='Limit' size=5
Line #37: value='<?php if (isset($_POST[Limit])) echo($_POST[Limit]); ?>'
Line #38:>
Line #39:
Line #40:
Line #41:>
Line #42:
Line #43:
Line #44:onchange=this.form.submit(); return true name='Bis'>
Line #45:<hr>
Line #46:
Line #47:<?
Line #48:
Line #49:$Viewpar="";
Line #50:$Limit=" Limit ".$_POST[Limit];
Line #51://// IDEIGLENES ///
Line #52://$_POST[Desc]="Y";
Line #53:
Line #54:if (isset($_POST[Del])) $Viewpar.="&Del=Y";
Line #55:if (isset($_POST[Desc])) $Viewpar.="&Desc=Y";
Line #56:if (isset($_POST[Limit])) $Viewpar.="&Limit=".$_POST[Limit];
Line #57:if (isset($_POST[Bis])) $Viewpar.="&Bis=".trim($_POST[Bis]);
Line #58:
Line #59:$ParHead="";
Line #60:$export=false;
Line #61:$tabla=$_GET["tabla"];
Line #62:$biord="";
Line #63:
Line #64:// echo "<script language = javascript>";
Line #65:// echo "alert('".$Viewpar."');";
Line #66:// echo "</script>";
Line #67:
Line #68://echo "<script language = javascript>";
Line #69:
Line #70://echo "</script>";
Line #71:
Line #72:$_SESSION['sqlfile']=$tabla;
Line #73:
Line #74:
Line #75:
Line #76:if (isset($_POST[Desc])) {
Line #77:
Line #78:}
Line #79:
Line #80:if (isset($_POST[biord]) and $_POST[biord]<>"") {
Line #81:$biord= " order by ".$_POST["biord"];
Line #82:if (isset($_POST[Desc]) and $_POST[Desc]<>"") {
Line #83:
Line #84:$biord.=" DESC";
Line #85:}
Line #86:}
Line #87:
Line #88:
Line #89:
Line #90:ECHO('<html>
Line #91:<title>'. $tabla.' </title>
Line #92:');
Line #93:
Line #94:
Line #95:$ee='<table BORDER=1 bgcolor="#DBE6E0" ><tr><td></td>';
Line #96:$fullRec="CONCAT_WS(";
Line #97:$vesszo="";
Line #98:$fid='';
Line #99:
Line #100:$eredmeny = mysql_query('show fields from '.$tabla);
Line #101:
Line #102:while ($row =mysql_fetch_row($eredmeny))
Line #103:{
Line #104:$fid.=$row[0] . ":";
Line #105:$ee .= '<td with=50><b><a href="BiViewTable.php?&tabla='.$tabla.'&biord='.$row[0].$Viewpar.'">'.$row[0].'</a></b></td>';
Line #106:
Line #107:$fullRec.=$vesszo."(".$row[0].")";
Line #108:$vesszo=",'/', ";
Line #109:
Line #110:}
Line #111:
Line #112:$full=$fullRec.")";
Line #113:
Line #114:$fullRec.=") as full";
Line #115:$fid.="full:";
Line #116:
Line #117:if (isset($_POST[Bis]) and $_POST[Bis]<>"") $wer=" Where INSTR((".$full."),'".($_POST[Bis])."') "; else $wer="";
Line #118:
Line #119:
Line #120:$ee .= '</tr>';
Line #121:
Line #122:if (substr($_POST[Bis],0,2)=="//" and strlen($_POST[Bis])>4) {
Line #123:
Line #124: $sqlwer= str_replace("~", "'",substr($_POST[Bis],2,strlen($_POST[Bis])-2));
Line #125:// Use of the count parameter is available as of PHP 5.0.0
Line #126://$str = str_replace("ll", "", "good golly miss molly!", $count);
Line #127://echo $count; // 2
Line #128:
Line #129:
Line #130:// echo "<script language = javascript>";
Line #131:// echo "alert('SQL: SELECT * FROM ".$tabla." WHERE ".$sqlwer."');";
Line #132:// echo "</script>";
Line #133:
Line #134:
Line #135:$keres = "SELECT * FROM " . $tabla . " where ".$sqlwer . $biord;
Line #136:
Line #137:print "<font size=3 color=blue>SQL: <b>".$keres."</b></font>";
Line #138:
Line #139:
Line #140:$nurL=mysql_num_rows($eredmeny);
Line #141:$nur=$nurL;
Line #142:$Limit="";
Line #143:$biord="";
Line #144:
Line #145:////////
Line #146:} else {
Line #147:////////
Line #148:
Line #149:$keres = "SELECT * FROM " . $tabla . $wer . $biord;
Line #150://echo("<hr>".$keres."<hr>");
Line #151:
Line #152:
Line #153:$nurL=mysql_num_rows($eredmeny);
Line #154:
Line #155:$keres = "SELECT * FROM " . $tabla . $wer . $biord . $Limit;
Line #156://echo("<hr>".$keres."<hr>");
Line #157:
Line #158:
Line #159:
Line #160:$nur=mysql_num_rows($eredmeny);
Line #161:
Line #162:}
Line #163:
Line #164:///////////////////////////////////
Line #165://echo("<hr>".$keres."<hr>");
Line #166:///////////////////////////////////
Line #167:
Line #168:if ($nurL<1001) $Limit="";
Line #169:
Line #170:
Line #171://'</font></b>';
Line #172:
Line #173:$head=$ParHead;
Line #174:
Line #175:$head=$head.'<br><font size=3 color=red><b>'.($tabla).
Line #176:'</b></font> Reccount:<b> '.$nurL.
Line #177:'</b> <font color=blue> <b>'.$biord.
Line #178:'</b> <b>'.$Limit.
Line #179:'</b></font><br></table>';
Line #180:
Line #181:if (!$nur) {
Line #182:
Line #183:$ee =$head.$ee. '</table>';
Line #184:echo($ee);
Line #185:
Line #186:
Line #187:
Line #188://include ("gvarlist.php");
Line #189:
Line #190:exit;
Line #191:}
Line #192:
Line #193:$ii=0;
Line #194:
Line #195:$h=split(':',$fid);
Line #196:
Line #197:$e= $head.$ee;
Line #198:
Line #199:
Line #200:for($i=0;$i<$nur;$i++) {
Line #201:
Line #202:$r=mysql_fetch_row($eredmeny);
Line #203:
Line #204:$ii++;
Line #205:// $e .= '<tr bgcolor="#A7C2B3"><td bgcolor=gold>'.$i.'</td>';
Line #206:$e .= '<tr bgcolor="#A7C2B3">';
Line #207:$e .= '<td>
Line #208:<A STYLE="{vlink : gold}" target=ediFrame
Line #209:href="BI_ediTable.php?&wjid='.$r[0].'&sqlfile='.$tabla.'">
Line #210:<IMG width=20 height=20 SRC="../_Screen/edit.png" border=0></a>
Line #211:';
Line #212:
Line #213:$e .= '
Line #214:<A STYLE="{vlink : gold}" target=ediFrame
Line #215:href="BI_sqlRECopy.php?&wjid='.$r[0].'&tabla='.$tabla.'">
Line #216:<IMG width=20 height=20 SRC="../_Screen/plus.ico" border=0></a>
Line #217:</td>';
Line #218:
Line #219:for($j=0,$k=0;$j<count($r);$j++) {
Line #220:$e .= '<td with=50> '.htmlspecialchars($r[$j]).' </td>';
Line #221:}
Line #222:$e .= '</tr>';
Line #223:
Line #224:if ($ii==50 and $export==false) {
Line #225:$e .= '</table>';
Line #226:echo($e);
Line #227:$ii=0;
Line #228:$e=$ee;
Line #229:}
Line #230:
Line #231:}
Line #232:
Line #233:$e .= '</table>';
Line #234:echo($e);
Line #235:
Line #236:echo($e);
Line #237:
Line #238://mysql_free_result ($eredmeny);
Line #239://include ("gvarlist.php");
Line #240:///////
Line #241:/// BiViewTable.php /// 2009.09.07. 10:58:30
Line #242:?>
Line #243:
Line #244:</body>