Jump to content

dgnzcn

Members
  • Posts

    92
  • Joined

  • Last visited

Everything posted by dgnzcn

  1. ok I edit but, but still same error if (!isset($_SESSION['session_kullanici'])) { if($_SESSION['_login_id'] != $_SESSION['session_kullanici']echo "<script>window.location='index.php'</script>"; exit(); } else { echo "Unable to set the SESSION."; } }
  2. thanks, but some errors.. Parse error: syntax error, unexpected T_ECHO in F:\sank\WEB\vidman\ilan_edit.php on line 8 if (!isset($_SESSION['session_kullanici'])) // line 7 if($_SESSION['_login_id'] != $_SESSION['session_kullanici']echo "<script>window.location='index.php'</script>"; // line 8 exit(); // line 9 } else { // line 10 echo "Unable to set the SESSION."; } }
  3. finally i do like this : <?php session_start(); $_SESSION['session_kullanici']=$row_ILAN['session_kullanici']; ?> <?php if($_SESSION['_login_id'] != $_SESSION['session_kullanici']echo "<script>window.location='index.php'</script>"; exit();}?> l what is wrong ?
  4. i have got the A table. and i want get from data this table to session. how can I ?
  5. I try this but not working echo "<a href=pop.php?git=urun&popu&id=".$row_Rec1['id']."rel=\"facebox\">".$bul."</a>";
  6. I have this link code : echo "<a href=pop.php?git=urun&popu&id=".$row_Rec1['id'].">".$bul."</a>"; and I wanna add beetwen this code rel="facebox" help please.
  7. hi, I have a small problem, how can i filter by kt_login_id in this codes.. plesase help. kt_login_id ids recorded in : session_user column <?php // Load the common classes require_once('includes/common/KT_common.php'); // Load the required classes require_once('includes/tfi/TFI.php'); require_once('includes/tso/TSO.php'); require_once('includes/nav/NAV.php'); // Make unified connection variable $conn_vekipman = new KT_connection($vekipman, $database_vekipman); if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } // Filter $tfi_listurunler7 = new TFI_TableFilter($conn_vekipman, "tfi_listurunler7"); $tfi_listurunler7->addColumn("urunler.urun_grubu", "STRING_TYPE", "urun_grubu", "%"); $tfi_listurunler7->addColumn("urunler.marka", "STRING_TYPE", "marka", "%"); $tfi_listurunler7->addColumn("urunler.model", "STRING_TYPE", "model", "%"); $tfi_listurunler7->addColumn("urunler.urun_durumu", "STRING_TYPE", "urun_durumu", "%"); $tfi_listurunler7->addColumn("urunler.fiyat", "STRING_TYPE", "fiyat", "%"); $tfi_listurunler7->addColumn("urunler.aciklama", "STRING_TYPE", "aciklama", "%"); $tfi_listurunler7->addColumn("urunler.foto", "STRING_TYPE", "foto", "%"); $tfi_listurunler7->Execute(); // Sorter $tso_listurunler7 = new TSO_TableSorter("rsurunler1", "tso_listurunler7"); $tso_listurunler7->addColumn("urunler.urun_grubu"); $tso_listurunler7->addColumn("urunler.marka"); $tso_listurunler7->addColumn("urunler.model"); $tso_listurunler7->addColumn("urunler.urun_durumu"); $tso_listurunler7->addColumn("urunler.fiyat"); $tso_listurunler7->addColumn("urunler.aciklama"); $tso_listurunler7->addColumn("urunler.foto"); $tso_listurunler7->setDefault("urunler.urun_grubu"); $tso_listurunler7->Execute(); // Navigation $nav_listurunler7 = new NAV_Regular("nav_listurunler7", "rsurunler1", "", $_SERVER['PHP_SELF'], 50); //NeXTenesio3 Special List Recordset $maxRows_rsurunler1 = $_SESSION['max_rows_nav_listurunler7']; $pageNum_rsurunler1 = 0; if (isset($_GET['pageNum_rsurunler1'])) { $pageNum_rsurunler1 = $_GET['pageNum_rsurunler1']; } $startRow_rsurunler1 = $pageNum_rsurunler1 * $maxRows_rsurunler1; // Defining List Recordset variable $NXTFilter_rsurunler1 = "1=1"; if (isset($_SESSION['filter_tfi_listurunler7'])) { $NXTFilter_rsurunler1 = $_SESSION['filter_tfi_listurunler7']; } // Defining List Recordset variable $NXTSort_rsurunler1 = "urunler.urun_grubu"; if (isset($_SESSION['sorter_tso_listurunler7'])) { $NXTSort_rsurunler1 = $_SESSION['sorter_tso_listurunler7']; } mysql_select_db($database_vekipman, $vekipman); $query_rsurunler1 = "SELECT urunler.urun_grubu, urunler.marka, urunler.model, urunler.urun_durumu, urunler.fiyat, urunler.aciklama, urunler.foto, urunler.id FROM urunler WHERE {$NXTFilter_rsurunler1} ORDER BY {$NXTSort_rsurunler1}"; $query_limit_rsurunler1 = sprintf("%s LIMIT %d, %d", $query_rsurunler1, $startRow_rsurunler1, $maxRows_rsurunler1); $rsurunler1 = mysql_query($query_limit_rsurunler1, $vekipman) or die(mysql_error()); $row_rsurunler1 = mysql_fetch_assoc($rsurunler1); if (isset($_GET['totalRows_rsurunler1'])) { $totalRows_rsurunler1 = $_GET['totalRows_rsurunler1']; } else { $all_rsurunler1 = mysql_query($query_rsurunler1); $totalRows_rsurunler1 = mysql_num_rows($all_rsurunler1); } $totalPages_rsurunler1 = ceil($totalRows_rsurunler1/$maxRows_rsurunler1)-1; //End NeXTenesio3 Special List Recordset $nav_listurunler7->checkBoundries(); ?>
  8. just is it ? this is very simple, but i don't know. thanks.
  9. hi to everbody. i have a search submit form and button like this : <form id="f1" name="title" method="post" action="index.php?come=results"><td><div style="border-width:0px 0px 0px 1px;border-color:#aaaaaa;border-style:solid;font-size:1px;width:8px;height:31px;"></div> <td style="padding:0px 5px 0px 0px;"><input type="text" name="title" id="title "style"font-family:arial;font-size:12px;width:175px;border-style:solid;border-width:1px;border-color:#ffffff;border-top-color:#aca899;border-left-color:#aca899;" value=""></td> <td style="padding:0px 5px 0px 0px;font-family:arial;font-size:10px;color:#444444"><label><input name="Search" type="submit" id="Search" value="Search" /> </label></td></form> and how to replace search button with link? ( with Search text ) thanks for your replys.
  10. thanls for reply. search working but, searched words is not highlighting.
  11. hi my highlight class is not hightlighting in mw search results.. class highlight { public $output_text; function __construct($text, $words) { $split_words = explode( " " , $words ); foreach ($split_words as $word) { $color = self::generate_colors(); $text = preg_replace("|($word)|Ui" , "<span style=\"background:".$color.";\"><b>$1</b></span>" , $text ); } $this->output_text = $text; } private function rgbhex($red, $green, $blue) { return sprintf('#%02X%02X%02X', $red, $green, $blue); } private function generate_colors() { $red = rand( rand(60,100) , rand(200,252) ); $green = rand( rand(60,100) , rand(200,252) ); $blue = rand( rand(60,100) , rand(200,252) ); $color = self::rgbhex( $red , $green , $blue ); return $color; } } <?php $aranan = '$aranan'; $renkver = new highlight ($row_Recordset1['aciklama'], $aranan); $ArananSonuc = $renkver ->output_text; echo $ArananSonuc ; ?>
  12. working. thanks for your help
  13. I have a code problem. this is not working. but need link like this index.php?gogo=ureticidetay this is working. but need link like this
  14. this is my detail page. but my letter pagination does not show any results on the same page ? i need quick help please. <?php require_once('Con/ad.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $currentPage = $_SERVER["PHP_SELF"]; $maxRows_Recordset1 = 10; $pageNum_Recordset1 = 0; if (isset($_GET['pageNum_Recordset1'])) { $pageNum_Recordset1 = $_GET['pageNum_Recordset1']; } $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1; $colname_Recordset1 = "-1"; if (isset($_GET['ureticimenu'])) { $colname_Recordset1 = $_GET['ureticimenu']; } mysql_select_db($database_adminpaneli, $adminpaneli); $query_Recordset1 = sprintf("SELECT * FROM urunler WHERE ureticimenu = %s", GetSQLValueString($colname_Recordset1, "text")); $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1); $Recordset1 = mysql_query($query_limit_Recordset1, $adminpaneli) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); if (isset($_GET['totalRows_Recordset1'])) { $totalRows_Recordset1 = $_GET['totalRows_Recordset1']; } else { $all_Recordset1 = mysql_query($query_Recordset1); $totalRows_Recordset1 = mysql_num_rows($all_Recordset1); } $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1; $queryString_Recordset1 = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_Recordset1") == false && stristr($param, "totalRows_Recordset1") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams)); } } $queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1); ?> <style type="text/css"> <!-- .tablo { float: left; border: 1px solid #FFC1C1; } .urun_adi { font-family: Verdana, Geneva, sans-serif; font-size: 16px; color: #03C; font-weight: bold; } .ba { font-family: Verdana, Geneva, sans-serif; font-size: 11px; color: #C3C3C3; } .marka { font-family: Verdana, Geneva, sans-serif; color: #601806; font-size: 16px; font-weight: bold; text-indent: 15px; } .aciklama { font-family: Verdana, Geneva, sans-serif; font-size: 12px; color: #333; font-weight: bold; } .pdf_ { font-family: Verdana, Geneva, sans-serif; font-size: 10px; color: #C00; } .aciklama_ince { font-family: Verdana, Geneva, sans-serif; font-size: 11px; color: #333; font-weight: normal; } --> </style> <table width="790" border="0" align="center" cellpadding="0" cellspacing="0" id="ad"> <tr> <td height="42" colspan="2" bgcolor="#FFFFFF" class="pdf_"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" class="pdf_"><?php $alpha = range('A','Z'); function linkify(&$letter) { $letter = "<a href=index.php?gogo=ureticidetay&'?l={$letter}'>{$letter}</a>"; } array_walk($alpha,'linkify'); $alpha = implode(' - ',$alpha); echo $alpha; $search = (in_array(strtolower($_GET['l']),range('a','z')))? $_GET['l'] : 'A'; $sql = mysql_query("SELECT * FROM urunler WHERE ureticimenu LIKE '{$search}%'"); while($row = mysql_fetch_array($sql)) { echo "<br/>"; echo $row['ureticimenu']; } ?> </td> </tr> </table></td> </tr> <tr> <td colspan="2" align="center" bgcolor="#FFFFFF" class="pdf_"> </td> </tr> <tr> <td colspan="2" bgcolor="#FFFFFF" class="marka"><?php echo $row_Recordset1['uretici']; ?></td> </tr> <tr> <td width="644" bgcolor="#FFFFFF" class="marka"><span class="ba"> </span></td> <td width="645" bgcolor="#FFFFFF" class="marka"> </td> </tr> <tr> <td colspan="2" align="center" bgcolor="#FCFCFC"><?php do { ?> <table width="792" border="0" align="center" cellpadding="0" cellspacing="0" class="tablo"> <tr> <td width="11"> </td> <td width="695" class="urun_adi"><span class="urun_adi"><?php echo $row_Recordset1['ad']; ?></span></td> <td width="75" align="left" class="pdf_"><table width="65" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td width="45" class="pdf_">Belge: </td> <td align="right"><a href="urunler/<?php echo $row_Recordset1['pdf']; ?>" target="_blank"><img src="urunler/pdf.gif" width="20" hspace="5" vspace="5" border="0" /></a></td> </tr> </table></td> <td width="9" align="left" class="pdf_"> </td> </tr> <tr> <td height="10" colspan="4" align="center"><img src="images/urun_detay_line.gif" width="98%" height="1" align="baseline" /></td> </tr> <tr> <td width="11" align="left"> </td> <td colspan="2" align="left" class="aciklama_ince"><div align="justify"><a href="urunler/<?php echo $row_Recordset1['image']; ?>" class="highslide" id="thumb3" onclick="return hs.expand(this)"> <img src="urunler/<?php echo $row_Recordset1['image']; ?>" alt="" width="150" hspace="10" vspace="5" border="0" align="left" title="Büyüt" /></a><a class="highslide" onclick="return hs.expand(this)"></a></div> <?php echo $row_Recordset1['aciklama']; ?></td> <td align="left" valign="bottom"> </td> </tr> <tr> <td align="left"> </td> <td colspan="3" align="left"> </td> </tr> <tr> <td align="left" bgcolor="#CCCCFF"> </td> <td colspan="3" align="left" bgcolor="#CCCCFF"> </td> </tr> </table> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?></td> </tr> <tr> <td height="50" colspan="2" align="left" bgcolor="#FFFFE1"> <table border="0"> <tr> <td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>">First</a> <?php } // Show if not first page ?></td> <td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>">Previous</a> <?php } // Show if not first page ?></td> <td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>">Next</a> <?php } // Show if not last page ?></td> <td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>">Last</a> <?php } // Show if not last page ?></td> </tr> </table></td> </tr> </table> <?php mysql_free_result($Recordset1); ?>
  15. Hi all. my letter pagination does not work. if I press any letter of my page, nothing happen. where is wrong. thanks. <!--mysql--> <?php if(empty($_POST)) { $harf = $_GET['harf']; $harf .= "%"; $search = $harf; $sdesc = "*"; $classquery = ""; } else { $search = $_POST['search']; $search = "%" . $search . "%"; $sdesc = "%" . $search . "%"; $sclass = $_POST['harf']; $classquery = "AND 'harf' = CONVERT( _iso-8859-9 '" . $sclass . "' USING latin5 )"; } mysql_connect("localhost", "adminpa", "Lw"); mysql_select_db("adminpaneli"); // If current page number, use it // if not, set one! $query = mysql_query("SELECT * FROM `urunler` WHERE `ad` LIKE '.$alphabet.%' ORDER BY `ad` DESC"); if(!isset($_GET['page'])){ $page = 1; } else { $page = $_GET['page']; } // Define the number of results per page $max_results = 5; // Figure out the limit for the query based // on the current page number. $from = (($page * $max_results) - $max_results); // Perform mysql query on only the current page number's results $result = mysql_query("SELECT * FROM urunler ORDER BY ad DESC LIMIT $from, $max_results") or die(mysql_error()); //TO PRINT OUT THE DATA echo "<table border='1'>"; echo "<tr> <th>ad</th></tr>"; // keeps getting the next row until there are no more to get while($urunler = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $urunler['ad']; echo "</td><td>"; } echo "</table>"; //STOP PRINTING OUT THE DATA // Figure out the total number of results in DB: $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM urunler ORDER BY ad DESC"),0); // Figure out the total number of pages. Always round up using ceil() $total_pages = ceil($total_results / $max_results); // Build Page Number Hyperlinks echo "<p class=\"center\">Sayfa: "; // Build Previous Link if($page > 1){ $prev = ($page - 1); echo "<a href=\"".$_SERVER['php_SELF']."?page=$prev\">«</a> "; } for($i = 1; $i <= $total_pages; $i++){ if(($page) == $i){ echo "$i "; } else { echo "<a href=\"".$_SERVER['php_SELF']."?page=$i &harf=$harf\">$i</a> "; } } // Build Next Link if($page < $total_pages){ $next = ($page + 1); echo "<a href=\"".$_SERVER['php_SELF']."?page=$next\">»</a>"; } echo "</p>"; mysql_close(); ?> <?php $alphabet = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); foreach ($alphabet as $harf) { echo "<a href=\"?harf=" . $harf . "\">" . $harf . "</a> ¦ "; } echo "<a href=\"?\">Show All</a></p><br /> <form method=\"post\" action=\"?\"> <input type=\"text\" name=\"search\" /> <select name=\"class\"> <option>Select Category</option> <option>---</option> <option value=\"restaurant\">restaurant</option> </select> <input type=\"submit\" name=\"submit\" value=\"Search\" class=\"submit\" /> </form>"; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.