Tesy

HCM modul

Feb 22nd, 2013
34
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /* --- kontrola jadra --- */
  4. if(!defined('_core')) exit;
  5.  
  6. /* --- definice funkce modulu --- */
  7. function _HCM_moje_citace()
  8. {
  9.   $vysledek = DB::query("SELECT * FROM `citace`");
  10.   $i = 0;
  11.  
  12.   while($zaznam = DB::row($vysledek))
  13.   {
  14.     $citace[$i] = $zaznam["id"] . $zaznam["datum"];
  15.     $i++;
  16.   }
  17.  
  18.   $i = rand (0 , $i - 1);
  19.  
  20.   return $citace[$i];
  21. }
RAW Paste Data