לוגו אתר Fresh          
 
 
  אפשרות תפריט  ראשי     אפשרות תפריט  צ'אט     אפשרות תפריט  מבזקים     אפשרות תפריט  צור קשר     חץ שמאלה ‎print ‎"Hello World!"; if‎ ‎not rules.‎know ‎then rules.‎read(); חץ ימינה  

לך אחורה   לובי הפורומים > מחשבים > תכנות ובניית אתרים
שמור לעצמך קישור לדף זה באתרי שמירת קישורים חברתיים
תגובה
 
כלי אשכול חפש באשכול זה



  #3  
ישן 17-09-2008, 17:04
  Koritza Koritza אינו מחובר  
 
חבר מתאריך: 04.09.08
הודעות: 50
בתגובה להודעה מספר 2 שנכתבה על ידי שימי שמתחילה ב "אפשר בבקשה לראות את הקוד..."

אפשר:
קוד PHP:
<?php
header
("Content-type: image/gif");
//==================================================  ====================
class Diploma {
 var 
$course;
 var 
$student;
 var 
$settings;
 
//==================================================  ====================
 
function Diploma($student,$course){
  
$this->settings = array('baseURL' => 'Diploma.gif',
          
'font' => 5,
          
'fontcr' => 189,
          
'fontcg' => 216,
          
'fontcb' => 232,
          
'useICONV' => false,
          
'studentY' => 155,
          
'studentX' => 330,
          
'courseX' => 165,
          
'courseY' => 250
  
);
  
//++++++++
  
$this->course $this->validCourse(trim($course));
  
$this->student $this->validStudent(trim($student));
 }
 
//==================================================  ====================
 
function validCourse($course){
  if(
strlen($course) < || strlen($course) > 9)
   return 
false;
  return 
$course;
 }
 
//==================================================  ====================
 
function validStudent($student){
  if(
strlen($student) < || strlen($student) > 28)
   return 
false;
  return 
$student;
 }
 
//==================================================  ====================
 
function ErrorOutput($errorstr){
  
$image imagecreate(40050);
  
$bg imagecolorallocate($image250250250);
  
$textcolor imagecolorallocate($image$this->settings['fontcr'], $this->settings['fontcg'], $this->settings['fontcb']);
  
imagestring($image$this->settings['font'], 55'Error creating Diploma: '.$errorstr$textcolor);
  
imagegif($image);
  
imagedestroy($image);
  die();
 }
 
//==================================================  ====================
 
function output(){
  if(
$this->course === false)
   
$this->ErrorOutput('Bad Course');
  if(
$this->student === false)
   
$this->ErrorOutput('Bad Student');
  
//++++++++
  
$image = @imagecreatefromgif($this->settings['baseURL']);
  if(!
$image || $image === false)
   
$this->ErrorOutput('Loading Base Failure');
  
//++++++++
  
if($this->settings['useICONV'] && ereg("[א-ת]",$this->student))
   
$student iconv("Windows-1255""Latin2"$this->student);
  else
   
$student $this->student;
  
//++++++++
  
$textcolor imagecolorallocate($image$this->settings['fontcr'], $this->settings['fontcg'], $this->settings['fontcb']);
  
imagestring($image$this->settings['font'], ($this->settings['studentX']-(strlen($student)*$this->settings['font'])-70), $this->settings['studentY'], $student$textcolor);
  
imagestring($image$this->settings['font'], ($this->settings['courseX']-(strlen($this->course)*$this->settings['font'])-10), $this->settings['courseY'], $this->course$textcolor);
  
imagegif($image);
  
imagedestroy($image);
 }
}
//==================================================  ====================
if(!isset($_GET['student']))
 
$student '';
else
 
$student trim($_GET['student']);
if(!isset(
$_GET['course']))
 
$course '';
else
 
$course trim($_GET['course']);
$diploma = new Diploma($student,$course);
$diploma->output();
?>

וזה לא בהעלאת קבצים כפי שאתה רואה, תמונת GIF שהעלתי בFTP לשרת בגודל 400*500.
הטקסט פשוט נכתב בלבן [כשמסמנים את התמונה ב IE רואים את זה], ולא בצבע שבחרתי.
תגובה ללא ציטוט תגובה עם ציטוט חזרה לפורום
תגובה

כלי אשכול חפש באשכול זה
חפש באשכול זה:

חיפוש מתקדם
מצבי תצוגה דרג אשכול זה
דרג אשכול זה:

מזער את תיבת המידע אפשרויות משלוח הודעות
אתה לא יכול לפתוח אשכולות חדשים
אתה לא יכול להגיב לאשכולות
אתה לא יכול לצרף קבצים
אתה לא יכול לערוך את ההודעות שלך

קוד vB פעיל
קוד [IMG] פעיל
קוד HTML כבוי
מעבר לפורום



כל הזמנים המוצגים בדף זה הם לפי איזור זמן GMT +2. השעה כעת היא 00:27

הדף נוצר ב 0.04 שניות עם 12 שאילתות

הפורום מבוסס על vBulletin, גירסא 3.0.6
כל הזכויות לתוכנת הפורומים שמורות © 2026 - 2000 לחברת Jelsoft Enterprises.
כל הזכויות שמורות ל Fresh.co.il ©

צור קשר | תקנון האתר