Viewing file: mmsinfo_events.php (1.09 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//BindEvents Method @1-CA38645B
function BindEvents()
{
global $informacije;
$informacije->CCSEvents["AfterUpdate"] = "informacije_AfterUpdate";
}
//End BindEvents Method
//informacije_AfterUpdate @2-0FDF5E47
function informacije_AfterUpdate()
{
$informacije_AfterUpdate = true;
//End informacije_AfterUpdate
//Custom Code @25-1A6233AA
// -------------------------
global $informacije;
mysql_connect (localhost, us10505a, proba);
mysql_select_db (monet);
$result = mysql_query ("SELECT * FROM infoservis");
if ($row = mysql_fetch_array($result)) {
do {
$tekst=$row["tekst_info"];
} while($row = mysql_fetch_array($result));
} else {}
$file = "/home/mmsinfo/vijesti.txt";
if (!$file_handle = fopen($file,"a")) { echo "Cannot open file"; }
if (!fwrite($file_handle, $tekst)) { echo "Cannot write to file"; }
fclose($file_handle);
// -------------------------
//End Custom Code
//Close informacije_AfterUpdate @2-AB2A7CDA
return $informacije_AfterUpdate;
}
//End Close informacije_AfterUpdate
?>
|