function display_stories($stories) { for ($i = 0; $i < sizeof($stories); $i++) { $info = $stories[$i]; echo "<div class=\"feature-box\">" . "<h3>" . $info['headline'] . "</h3>\n"; display_pic($info['pic_url'], $info['pic']); echo "<div class=\"clearfix\">" . $info['story'] . "</div>\n</div>"; } }
$uploadc = new Upload(); $uploadc->maxupload_size = $config['gallery_max_filesize']; $destination = $config['gallery_path'] . "/{$param_galid}/"; $field_filename = trim($uploadc->getFileName("userfile")); if ($field_filename && (eregi(".jpg\$", $field_filename) || eregi(".png\$", $field_filename) || eregi(".gif\$", $field_filename))) { if ($uploadc->save($destination, "userfile", true)) { is_picture($field_filename, $param_galid); js_goto("?page=galerie&g={$param_galid}"); } else { show_warning($uploadc->errors); } } else { show_warning("{$strFichierInvalide} : {$field_filename}"); } } elseif ($op == 'delete') { /*** verification securite ***/ //verif_admin_general($s_joueur); if ($grade['a'] != 'a' && $grade['b'] != 'q' && $grade['c'] != 'q') { js_goto($PHP_SELF); } $filename = str_replace("/", "", $filename); @unlink($config['gallery_path'] . "/{$param_galid}/{$filename}"); @unlink($config['gallery_path'] . "/{$param_galid}/_thb_{$filename}"); js_goto("?page=galerie&g={$param_galid}"); } else { if ($param_picid == '') { display_gal($param_galid, $param_page); } else { display_pic($param_galid, $param_picid, $param_page); } }