/** * veritabanına kayıtlı settings tablosundaki verileri geri döndürüyor. * Bu sayede bazı verileri yapabileceğimiz web arayüzünden değiştirebiliriz. * */ function get_setting($get){ $q = mysql_query("SELECT*FROM `settings` WHERE `Define`='".sqlcleaner($get)."';"); if (mysql_num_rows($q)==0) return false; $t = mysql_fetch_array($q); return $t["Value"]; }
function edit_sql($tablename, $where, $fields) { $numargs = func_num_args(); $fields = explode("#", $fields); $where = explode("#", $where); if (count($fields) == $numargs - 3) { $con = ""; for ($i = 3; $i < $numargs; $i++) { $con .= "`" . $fields[$i - 3] . "`='" . sqlcleaner(func_get_arg($i)) . "',"; } return "UPDATE SET `" . sqlcleaner($tablename) . "` " . substr($con, 0, -1) . " WHERE `" . $where[0] . "`=" . $where[1] . ";"; } else { return false; } }
function content_accordingto_category_with_image($id) { global $siteUrl; define("_KACTANEBIRSIRADA", 5); $con = '<!-- Import jQuery and SimpleModal source files-->'; $con .= '<!--[if !IE 6]><!-->'; $con .= '<script src="' . $siteUrl . 'icerik/Scripts/js/jquery.js" type="text/javascript"></script>'; $con .= '<!--<![endif]-->'; $con .= '<script src="' . $siteUrl . 'icerik/Scripts/js/jquery.simplemodal.js" type="text/javascript"></script>'; $con .= '<!-- Contact Form JS and CSS files -->'; $con .= '<link type="text/css" href="' . $siteUrl . 'icerik/Scripts/css/basic.css" rel="stylesheet" media="screen" />'; $con .= '<!-- IE 6 hacks -->'; $con .= '<!--[if lt IE 7]>'; $con .= '<link type="text/css" href="' . $siteUrl . 'css/basic_ie.css" rel="stylesheet" media="screen" />'; $con .= '<![endif]-->'; $con .= '<script type="text/javascript">'; $con .= 'function getHTML(methodcum, urle, pars, katman){'; $con .= ' $.ajaxSetup({'; $con .= ' global: false,'; $con .= ' type: methodcum,'; $con .= ' url: urle,'; $con .= ' cache: false '; $con .= ' });'; $con .= ' $.ajax({'; $con .= ' data: pars,'; $con .= ' success: function(ajaxCevap) {$(\'#\'+katman).html(ajaxCevap);}'; $con .= ' }); '; $con .= '}'; $con .= '</script>'; $con .= '<div id="basicModalContent" style=\'display:none;\'>Sayfa Yükleniyor...</div>'; $con .= '<table celpadding="0" cellspacing="0">'; $urunlerQuery = mysql_query("SELECT * FROM `contents` WHERE contents.Category = '" . sqlcleaner($id) . "'"); while ($tt = mysql_fetch_array($urunlerQuery)) { if ($i == 0) { $con .= '<tr>'; } $con .= '<td class="td_urunler_listesi">'; $con .= content_short_info_with_images($tt["Image_Category"], $tt["Id"], $tt["Title"]); $con .= '</td>'; if ($i == _KACTANEBIRSIRADA) { $con .= '</tr>'; } $i++; if ($i == _KACTANEBIRSIRADA) { $i = 0; } } $con .= '</table>'; $con .= '<a href="javascript:history.back(-1)">geri <img height="23" width="35" src="' . $siteUrl . 'userfiles/image/devam.jpg" alt="" border=0/></a>'; return $con; }