Advertisement
Guest User

Untitled

a guest
Feb 5th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.96 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
  6. *
  7. * @ Version : 1.1.3.0
  8. * @ Author : DeZender
  9. * @ Release on : 17.05.2011
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function index($kategori, $pozisyon, $zps) {
  15. global $config;
  16. global $lisan_global;
  17. global $modul_data;
  18.  
  19. include( './sistem/_siteust.php' );
  20.  
  21. if (!( isset( $pozisyon ))) {
  22. $pozisyon = 0;
  23. }
  24.  
  25. if (!( isset( $zps ))) {
  26. $zps = 20;
  27. }
  28.  
  29. $rows = '3';
  30. $proz = @round( 100 / $rows );
  31. $col_count = 0;
  32. $x = 0;
  33. $table1 = dbgetmodultable( 'kategoriler' );
  34. $table2 = dbgetmodultable( 'sinavlar' );
  35. $table3 = dbgetmodultable( 'sorular' );
  36. $table4 = dbgetmodultable( 'raporlar' );
  37. $query = $config['db']->build_query( 'Select', array( $table1 ), array( '*' ), '', array( 'kategori_adi ASC' ), 'durum = \'1\'' );
  38. $kat_id = $config['db']->query( $query );
  39. $toplam_kategori = $config['db']->num_rows( );
  40. $content .= '
  41. <table border="0" width="100%" cellpadding="4" cellspacing="0" style="border:1px solid ' . $config['tpl']->tpl_vars['bgc_border'] . '">
  42. <tr>';
  43.  
  44. while ($config['db']->next_record( $kat_id )) {
  45. $row = $config['db']->Record;
  46. ++$col_count;
  47. ++$x;
  48. $query1 = $config['db']->build_query( 'Select', array( $table2 ), array( '*' ), '', '', 'kategori_id = \'' . $row['id'] . '\' and durum = \'1\'' );
  49. $sinav_id = $config['db']->query( $query1 );
  50. $toplam_sinav = $config['db']->num_rows( );
  51. $content .= '<td width="' . $proz . '%"><img src="' . otomatiksiteurl( ) . 'images/arr-blcri-tree.gif" width="9" height="9">&nbsp;<b><a title="' . stripslashes( $row['kategori_adi'] ) . '" href="' . seo_linkim( otomatiksiteurl( ) . 'index.php?modul=' . $modul_data['name'] . '&kategori=' . $row['id'], otomatiksiteurl( ) . 'online-sinav/kategori/' . $row['id'] . '/' . makeseo( $row['kategori_adi'] ) . '.html' ) . '"><font size="2">' . stripslashes( $row['kategori_adi'] ) . '</font></a>&nbsp;(' . number_format( $toplam_sinav ) . ')</b></td>';
  52.  
  53. if ($col_count == $rows) {
  54. if ($x != $count) {
  55. $content .= '</tr><tr>';
  56. $col_count = 0;
  57. continue;
  58. }
  59.  
  60. continue;
  61. }
  62. }
  63.  
  64.  
  65. if ($col_count < $rows) {
  66. for ($i = $col_count; $i < $rows; ++$i) {
  67. $content .= '<td></td>';
  68. }
  69. }
  70.  
  71. $content .= '
  72. </tr>
  73. </table>
  74. <div style="padding:1px;"></div>
  75. <table width="100%" border="0" cellpadding="6" cellspacing="1" bgcolor="' . $config['tpl']->tpl_vars['bgc_border'] . '">
  76. <tr class="genBG4">
  77. <td width="80%" height="5" align="left"><img src="' . otomatiksiteurl( ) . 'images/arr-yeldo-two.gif" width="9" height="9">&nbsp;<font color="' . $config['tpl']->tpl_vars['gen_01'] . '"><b>' . _LNG865465_0045 . '</b></font></td>
  78. <td width="10%" height="5" align="left"><img src="' . otomatiksiteurl( ) . 'images/arr-yeldo-two.gif" width="9" height="9">&nbsp;<font color="' . $config['tpl']->tpl_vars['gen_01'] . '"><b>' . _LNG865465_0046 . '</b></font></td>
  79. <td width="10%" height="5" align="left"><img src="' . otomatiksiteurl( ) . 'images/arr-yeldo-two.gif" width="9" height="9">&nbsp;<font color="' . $config['tpl']->tpl_vars['gen_01'] . '"><b>' . _LNG865465_0047 . '</b></font></td>
  80. </tr>
  81. </table>
  82. <div style="padding:1px;"></div>';
  83.  
  84. if ($kategori) {
  85. $query1 = $config['db']->build_query( 'Select', array( $table2 ), array( '*' ), '', array( 'id DESC' ), 'kategori_id = \'' . $kategori . '\' and durum = \'1\'' );
  86. $config['db']->query( $query1 );
  87. $toplam_sinav = $config['db']->num_rows( );
  88. $query2 = $config['db']->build_query( 'Select', array( $table2 ), array( '*' ), '', array( 'id DESC' ), 'kategori_id = \'' . $kategori . '\' and durum = \'1\'', $zps, $pozisyon );
  89. $res_id = $config['db']->query( $query2 );
  90.  
  91. if (0 < $toplam_sinav) {
  92. $beginn = $pozisyon + 1;
  93. } else {
  94. $beginn = $pozisyon;
  95. }
  96.  
  97. $bulunan = $pozisyon + $config['db']->num_rows( );
  98. } else {
  99. $query1 = $config['db']->build_query( 'Select', array( $table2 ), array( '*' ), '', array( 'id DESC' ), 'durum = \'1\'' );
  100. $config['db']->query( $query1 );
  101. $toplam_sinav = $config['db']->num_rows( );
  102. $query2 = $config['db']->build_query( 'Select', array( $table2 ), array( '*' ), '', array( 'id DESC' ), 'durum = \'1\'', $zps, $pozisyon );
  103. $res_id = $config['db']->query( $query2 );
  104.  
  105. if (0 < $toplam_sinav) {
  106. $beginn = $pozisyon + 1;
  107. } else {
  108. $beginn = $pozisyon;
  109. }
  110.  
  111. $bulunan = $pozisyon + $config['db']->num_rows( );
  112. }
  113.  
  114.  
  115. if ($toplam_sinav == '0') {
  116. $content .= '
  117. <table width="100%" border="0" cellpadding="4" cellspacing="1">
  118. <tr ' . rowcolor( $zeile ) . '>
  119. <td width="100%" height="50" align="center">' . _LNG865465_0052 . '</td>
  120. </tr>
  121. </table>';
  122. }
  123.  
  124. $content .= '
  125. <table width="100%" border="0" cellpadding="2" cellspacing="1">
  126. <tr>
  127. <td width="50%" align="left">&nbsp;' . _LNG000001_0127 . '&nbsp;<b>' . number_format( $bulunan ) . '</b>&nbsp;/&nbsp;<b>' . number_format( $toplam_sinav ) . '</b></td>
  128. <td width="50%" align="right">' . shownextpages( otomatiksiteurl( ) . 'index.php?modul=' . $modul_data['name'] . '&kategori=' . $katdata['id'] . '&duzen=' . number_format( $duzen ), $pozisyon, $zps, $toplam_sinav, $bulunan ) . '</td>
  129. </tr>
  130. </table>';
  131.  
  132. while ($config['db']->next_record( $res_id )) {
  133. $row = $config['db']->Record;
  134. ++$zeile;
  135.  
  136. if ($row['sure'] == '0') {
  137. $sinav_suresi = '-';
  138. } else {
  139. $sinav_suresi = $row['sure'] . ' ' . _LNG865465_0048;
  140. }
  141.  
  142. $query3 = $config['db']->build_query( 'Select', array( $table3 ), array( '*' ), '', '', 'sinav_id = \'' . $row['id'] . '\'' );
  143. $soru_id = $config['db']->query( $query3 );
  144. $toplam_soru = $config['db']->num_rows( );
  145. $content .= '
  146. <table width="100%" border="0" cellpadding="4" cellspacing="1">
  147. <tr ' . rowcolor( $zeile ) . '>
  148. <td width="80%" height="30" align="left"><img src="' . otomatiksiteurl( ) . 'images/arr-blcri-tree.gif" width="9" height="9">&nbsp;<a title="' . stripslashes( $row['sinav_adi'] ) . '" href="' . seo_linkim( otomatiksiteurl( ) . 'index.php?modul=online-sinav&op=sinav&id=' . $row['id'], otomatiksiteurl( ) . 'online-sinav/' . $row['id'] . '/' . makeseo( $row['sinav_adi'] ) . '.html' ) . '"><b>' . stripslashes( $row['sinav_adi'] ) . '</b></a></td>
  149. <td width="10%" align="center">' . $toplam_soru . '</td>
  150. <td width="10%" align="center">' . $sinav_suresi . '</td>
  151. </tr>
  152. </table>';
  153. }
  154.  
  155.  
  156. if (configgetvar( 'son_sgirenler', $modul_data['name'] )) {
  157. $query = $config['db']->build_query( 'Select', array( $table4 ), array( '*' ), '', array( 'id DESC' ), '', 5 );
  158. $rapor_id = $config['db']->query( $query );
  159. $toplam = $config['db']->num_rows( );
  160. $content .= '
  161. <br>
  162. <table width="100%" border="0" cellpadding="6" cellspacing="1" bgcolor="' . $config['tpl']->tpl_vars['bgc_border'] . '">
  163. <tr class="genBG4">
  164. <td width="100%" height="5" align="left"><img src="' . otomatiksiteurl( ) . 'images/arr-yeldo-two.gif" width="9" height="9">&nbsp;<font color="' . $config['tpl']->tpl_vars['gen_01'] . '"><b>' . _LNG865465_0050 . '</b></font></td>
  165. </tr>
  166. </table>
  167. <div style="padding:1px;"></div>
  168. <table width="100%" border="0" cellpadding="4" cellspacing="1">
  169. <tr ' . rowcolor( $zeile ) . '>
  170. <td width="20%" align="left">&nbsp;</td>
  171. <td width="40%" align="left"><b>' . _LNG865465_0045 . '</b></td>
  172. <td width="7%" align="center"><b>' . _LNG865465_0025 . '</b></td>
  173. <td width="7%" align="center"><b>' . _LNG865465_0028 . '</b></td>
  174. <td width="7%" align="center"><b>' . _LNG865465_0031 . '</b></td>
  175. <td width="19%" align="center"><b>' . _LNG000001_0223 . '</b></td>
  176. </tr>';
  177.  
  178. while ($config['db']->next_record( $rapor_id )) {
  179. $rapor = $config['db']->Record;
  180. ++$zeile;
  181. $query = $config['db']->build_query( 'Select', array( $table2 ), array( '*' ), '', '', 'id = \'' . $rapor['sinav_id'] . '\'' );
  182. $config['db']->query( $query );
  183. $config['db']->next_record( );
  184. $sinav_data = $config['db']->Record;
  185. $content .= '
  186. <tr ' . rowcolor( $zeile ) . '>
  187. <td align="left">' . check_name_st( $rapor['sinav_gad'] ) . '</td>
  188. <td align="left"><a title="' . stripslashes( $sinav_data['sinav_adi'] ) . '" href="' . seo_linkim( otomatiksiteurl( ) . 'index.php?modul=online-sinav&op=sinav&id=' . $sinav_data['id'], otomatiksiteurl( ) . 'online-sinav/' . $sinav_data['id'] . '/' . makeseo( $sinav_data['sinav_adi'] ) . '.html' ) . '">' . stripslashes( $sinav_data['sinav_adi'] ) . '</a></td>
  189. <td align="center"><font size="2" color="#008000"><b>' . number_format( $rapor['dogru_cevap'] ) . '</b></font></td>
  190. <td align="center"><font size="2" color="#CD0000"><b>' . number_format( $rapor['yanlis_cevap'] ) . '</b></font></td>
  191. <td align="center"><font size="2" color="#E87132"><b>' . number_format( $rapor['bos_cevap'] ) . '</b></font></td>
  192. <td align="center">' . tarihcevir( $rapor['tarih'] ) . '</font></td>
  193. </tr>';
  194. }
  195.  
  196. $content .= '</table>';
  197. }
  198.  
  199. if (configgetvar( 'en_basarili_olanlar', $modul_data['name'] )) {
  200. $query = $config['db']->build_query( 'SelectDistinct', array( $table4 ), array( 'sinav_gad' ), '', array( 'dogru_cevap DESC' ), '', 5 );
  201. $rapor_id = $config['db']->query( $query );
  202. $toplam = $config['db']->num_rows( );
  203. $content .= '
  204. <br>
  205. <table width="100%" border="0" cellpadding="6" cellspacing="1" bgcolor="' . $config['tpl']->tpl_vars['bgc_border'] . '">
  206. <tr class="genBG4">
  207. <td width="100%" height="5" align="left"><img src="' . otomatiksiteurl( ) . 'images/arr-yeldo-two.gif" width="9" height="9">&nbsp;<font color="' . $config['tpl']->tpl_vars['gen_01'] . '"><b>' . _LNG865465_0051 . '</b></font></td>
  208. </tr>
  209. </table>
  210. <div style="padding:1px;"></div>
  211. <table width="100%" border="0" cellpadding="4" cellspacing="1">
  212. <tr ' . rowcolor( $zeile ) . '>
  213. <td width="20%" align="left">&nbsp;</td>
  214. <td width="40%" align="left"><b>' . _LNG865465_0045 . '</b></td>
  215. <td width="7%" align="center"><b>' . _LNG865465_0025 . '</b></td>
  216. <td width="7%" align="center"><b>' . _LNG865465_0028 . '</b></td>
  217. <td width="7%" align="center"><b>' . _LNG865465_0031 . '</b></td>
  218. <td width="19%" align="center"><b>' . _LNG000001_0223 . '</b></td>
  219. </tr>';
  220.  
  221. while ($config['db']->next_record( $rapor_id )) {
  222. $rapor_dis = $config['db']->Record;
  223. ++$zeile;
  224. $query = $config['db']->build_query( 'Select', array( $table4 ), array( '*' ), '', '', 'sinav_gad = \'' . $rapor_dis['sinav_gad'] . '\'' );
  225. $config['db']->query( $query );
  226. $config['db']->next_record( );
  227. $rapor = $config['db']->Record;
  228. $query1 = $config['db']->build_query( 'Select', array( $table2 ), array( '*' ), '', '', 'id = \'' . $rapor['sinav_id'] . '\'' );
  229. $config['db']->query( $query1 );
  230. $config['db']->next_record( );
  231. $sinav_data = $config['db']->Record;
  232. $content .= '
  233. <tr ' . rowcolor( $zeile ) . '>
  234. <td align="left">' . check_name_st( $rapor['sinav_gad'] ) . '</td>
  235. <td align="left"><a title="' . stripslashes( $sinav_data['sinav_adi'] ) . '" href="' . seo_linkim( otomatiksiteurl( ) . 'index.php?modul=online-sinav&op=sinav&id=' . $sinav_data['id'], otomatiksiteurl( ) . 'online-sinav/' . $sinav_data['id'] . '/' . makeseo( $sinav_data['sinav_adi'] ) . '.html' ) . '">' . stripslashes( $sinav_data['sinav_adi'] ) . '</a></td>
  236. <td align="center"><font size="2" color="#008000"><b>' . number_format( $rapor['dogru_cevap'] ) . '</b></font></td>
  237. <td align="center"><font size="2" color="#CD0000"><b>' . number_format( $rapor['yanlis_cevap'] ) . '</b></font></td>
  238. <td align="center"><font size="2" color="#E87132"><b>' . number_format( $rapor['bos_cevap'] ) . '</b></font></td>
  239. <td align="center">' . tarihcevir( $rapor['tarih'] ) . '</font></td>
  240. </tr>';
  241. }
  242.  
  243. $content .= '</table>';
  244. }
  245.  
  246. $config['tpl']->varRef( array( 'modul_baslik' => configgetvar( 'dizin_adi', $modul_data['name'] ), 'modul_icerik' => $content ) );
  247. include( 'sistem/_sitealt.php' );
  248. }
  249. .............................
  250. ...............
  251. ......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement