Stephanie Slater  
  Home arrow Press Coverage arrow The Sun: February 5, 1992
Main Menu
 Home
 Site News
 Articles
 Press Coverage
 Useful Links
 Photo Gallery
 Contact Stephanie

 Monday, 06 February 2012
The Sun: February 5, 1992  


Newsflash

This web site is still in development, but do feel free to look around. In time, I hope it will help explain the background to my case, and become a useful resource for victims of sexual and violent crime, and those who work with them.


"; } } return $image_tag; } } function TableHeaderTop() { global $mosConfig_live_site; ?>
$desfile" ; } else if (eregi("\.(jpg|jpeg)", $origname)) { $cmd = $NETPBM_path . "jpegtopnm $file | " . $NETPBM_path . "pnmscale -xysize $maxsize $maxsize | " . $NETPBM_path . "ppmtojpeg -quality=$quality > $desfile" ; } else if (eregi("\.gif", $origname)) { $cmd = $NETPBM_path . "giftopnm $file | " . $NETPBM_path . "pnmscale -xysize $maxsize $maxsize | " . $NETPBM_path . "ppmquant 256 | " . $NETPBM_path . "ppmtogif > $desfile" ; }//end if.. @exec($cmd); } #################################### # Function checkAdmin # #----------------------------------# # Created Arthur Konze # # http://www.mamboportal.com # #----------------------------------# # Checks whether logged in user is # # admin or not! # #################################### function checkAdmin($database, $db, $dbprefix, $cook, $admin) { global $CurrUID; /* Get the visitor's UserType */ $utype = ""; if ($cook<>"") { $cryptSessionID=md5($cook); $queryg = "SELECT usertype, userid FROM mos_session WHERE session_ID='$cryptSessionID'"; $resultg = $database->openConnectionWithReturn($queryg); while ($rowg = mysql_fetch_object($resultg)) { $utype = $rowg->usertype; $CurrUID = $rowg->userid; } if ($admin) { if ($utype=="administrator" or $utype=="superadministrator") { return true; } else { return false; } } else { if ($utype=="user" or $utype=="editor") { return true; } else { return false; } } } } #################################### # Function CreateThumbGD2 # #----------------------------------# # Created Ronald Smit # # http://mamboserver.homedns.org # #################################### function CreateThumbGD2($ext, $img_source, $img_dest, $img_quality, $size_limit, $imagemethod = 'gd2') { //debugbreak(); //$imagemethod = 'gd2'; if (!file_exists($img_source)) { return(1); //file not found return 1 } //load the original image and put its height/width in $img_info $img_info = GetImageSize($img_source); //$img_info ARRAY KEY //0 = width //1 = height //2 = image type //3 = hight and width string $orig_height = $img_info[1]; //source height from $img_info $orig_width = $img_info[0]; //source width from $img_info $type = $img_info[2]; $newheight = $size_limit; $newwidth = $size_limit; // debugbreak(); if ($im = ImageCreateFromJPEG($img_source)) { if ($newheight && ($orig_width < $orig_height)) { $newwidth = ($newheight / $orig_height) * $orig_width; } else { $newheight = ($newwidth / $orig_width) * $orig_height; } if ($imagemethod == "gd2") { $im2 = ImageCreateTrueColor($newwidth,$newheight); } else { $im2 = ImageCreate($newwidth,$newheight); } if ($imagemethod == "gd2") { ImageCopyResampled($im2,$im,0,0,0,0,$newwidth,$newheight,$orig_width,$orig_height); } else { ImageCopyResized($im2,$im,0,0,0,0,$newwidth,$newheight,$orig_width,$orig_height); } if (ImageJpeg($im2, $img_dest, $img_quality)) { return(2); } } return(3); } function getThumb($id)//id van gallery_id { global $database,$imagepath,$mosConfig_live_site; $database->setQuery("SELECT * FROM #__rsgallery as a, #__rsgalleryfiles as b WHERE a.id = b.gallery_id AND b.gallery_id = '$id'"); $rows = $database->loadObjectList(); if (!$rows) { $t_path = "No pics"; } else { foreach ($rows as $row) { $t_path = "name."\" alt=\"\" border=\"1\">"; } } return $t_path; } function getNumber($id) { global $database; $database->setQuery("SELECT count(*) FROM #__rsgalleryfiles WHERE gallery_id = '$id'"); $count = $database->loadResult(); return $count; } function getCurrentDate() { $now = getdate(); $datetime = $now['year']."-".$now['mon']."-".$now['mday']." ".$now['hours'].":".$now['minutes'].":".$now['seconds']; echo $datetime; } function getCatname($id) { global $database; $database->setQuery("SELECT catname FROM #__rsgallery WHERE id = '$id'"); $catname = $database->loadResult(); echo $catname; } function showCategories() { global $database; $database->setQuery("SELECT * FROM #__rsgallery ORDER BY ordering ASC"); $rows = $database->loadObjectList(); echo ""; foreach ($rows as $row) { echo ""; } } function getFileName($id) { global $database; $database->setQuery("SELECT name FROM #__rsgalleryfiles WHERE id = '$id'"); $filename = $database->loadResult(); return $filename; } function regenerateAllThumbs($catid = NULL) { // re-do all thumbnail pics for selected category(s) or all pics in directory global $database, $mosConfig_absolute_path, $imagepath, $conversiontype, $size, $JPEGquality,$IM_path; // dmcd to do: // 1. put back in GD1 thumbnail call // 2. check for database query error // 3. if there are a lot of pics, this can take a while, so may need to // reset php max execution timeout so it does not terminate prematurely // if manual thumb creation has been chosen, then no resizing will occur if($conversiontype == 0) return; // $catid == 0 all categories // $catid == NULL all pic files found in gallery subdirectory // $catid == 1.. all pic files for that particular category if(isset($catid) && $catid == 0) $database->setQuery("SELECT name FROM #__rsgalleryfiles"); elseif($catid != NULL) $database->setQuery("SELECT name FROM #__rsgalleryfiles WHERE gallery_id='$catid'"); if($catid != NULL){ $files = loadObjectList('name'); // if there is no thumbs subdirectory, then no thumbs can be generated if(!(file_exists($mosConfig_absolute_path.$imagepath."thumbs"))) return; $pics = mosReadDirectory($mosConfig_absolute_path.$imagepath); $maxsize = $size; $quality = $JPEGquality; foreach($pics as $pic) { // check to see if we want to do this pic if($catid != NULL && !array_key_exists($files, $pic)) continue; // go regenerate the thumbs $file_in = $mosConfig_absolute_path.$imagepath.$pic; $file_out = $mosConfig_absolute_path.$imagepath."thumbs/".$pic; if(is_dir($file_in)) continue; // delete the existing thumb if present if(file_exists($file_out)) unlink($file_out); switch ($conversiontype) { //ImageMagick case 1: $cmd = $IM_path."convert -resize $size $file_in $file_out"; @exec($cmd); break; //NETPBM case 2: CreateThumbNETPBM($file_in,$file_out,$maxsize,$pic,$quality); break; //GD1 case 3: CreateThumbGD2($file_in, $file_out, $quality, $maxsize, 'gd1'); break; //GD2 case 4: CreateThumbGD2($file_in, $file_out, $quality, $maxsize); break; } } } } function getGalleryId($id) { global $database; $database->setQuery("SELECT gallery_id FROM #__rsgalleryfiles WHERE id = '$id'"); $gallery_id = $database->loadResult(); return $gallery_id; } function addHit($id) { global $database; //Get hits from DB $database->setQuery("SELECT hits FROM #__rsgalleryfiles WHERE id = '$id'"); $hits = $database->loadResult(); $hits++; $database->setQuery("UPDATE #__rsgalleryfiles SET hits = '$hits' WHERE id = '$id'"); if ($database->query()) { return(1);//OK } else { return(0);//Not OK } } function addCatHit($hid) { global $database; //Get hits from DB $database->setQuery("SELECT hits FROM #__rsgallery WHERE id = '$hid'"); $hits = $database->loadResult(); $hits++; $database->setQuery("UPDATE #__rsgallery SET hits = '$hits' WHERE id = '$hid'"); if ($database->query()) { return(1);//OK } else { return(0);//Not OK } } function showRating($id) { global $database,$mosConfig_live_site; $database->setQuery("SELECT * FROM #__rsgalleryfiles WHERE id = '$id'"); $values = array("No rating","Very bad","Bad","OK","Good","Very good"); $rows = $database->loadObjectList(); $images = ""; foreach ($rows as $row) { $average = $row->rating/$row->votes; $average1 = round($average); for ($t = 1; $t <= $average1; $t++) { $images .= " "; } } return $images; //return $values[$average1]." (".$average.")"; } function showEXIF($imagefile) { //echo "EXIF information for $imagefile will be shown here"; if(!function_exists('exif_read_data')) { echo "PHP not compiled with EXIF-support!"; } else { $exif = exif_read_data($imagefile, 0, true); ?> $section) { foreach ($section as $name => $val) { ?>
 Section  Name  Value
setQuery("SELECT id FROM #__rsgalleryfiles"); $imid = $database->loadResultArray(); //select 3 random id-s if (count($imid)>3) { $img_id = array_rand($imid, 3); $image_tag = ""; for ($j = 0;$j < count($img_id);$j++) { $x = $img_id[$j]; $database->setQuery("SELECT * FROM #__rsgalleryfiles WHERE id = '$imid[$x]'"); $rows = $database->loadObjectList(); $thumbs = "thumbs";//Too lazy to rewrite $image_tag foreach($rows as $row) { $l_start = $row->ordering - 1; $image_tag .= "
id&catid=$row->gallery_id&limitstart=$l_start\">name\" alt=\"$row->descr\" border=\"1\" width=\"100\">
Not writable. Please CHMOD $mosConfig_absolute_path/uploadfiles to 0777"; } else { echo "Writable"; } } function checkLogin($my_id) { global $mosConfig_absolute_path, $acl; //Check the login type $aro_group = $acl->getAroGroup( $my_id ); $group = $aro_group->name; $group_id = $aro_group->group_id; switch ($group) { case "Super Administrator": return 1;//Super Administrator break; case "Administrator": return 2;//Administrator break; case "Editor": return 3; break; default: return 0;//Geen geldige status break; } } ?>
Random Photo
Stephanie Slater and Swiftnick.

a dynamite site
 
 Home | Site News | Articles | Press Coverage | Useful Links | Photo Gallery | Contact Stephanie |