Esempio n. 1
0
 public function __construct($dbo = NULL, $accountId = 0)
 {
     parent::__construct($dbo);
     $this->accountId = $accountId;
     if ($this->accountId != 0) {
         $account = new account($this->db, $this->accountId);
         $deviceId = $account->getGCM_regId();
         if (strlen($deviceId) != 0) {
             $this->addDeviceId($deviceId);
         }
     }
 }
Esempio n. 2
0
 public function __construct($dbo = NULL, $imgFilename, $photoSize = 160)
 {
     parent::__construct($dbo);
     $this->imgFilename = $imgFilename;
     $this->photoSize = $photoSize;
     $this->initialfilesize = filesize($imgFilename);
     $this->imageproperties = getimagesize($imgFilename);
     $this->mimetype = image_type_to_mime_type($this->imageproperties[2]);
     if ($this->imageproperties[2] === IMAGETYPE_JPEG) {
         $this->imgData = imagecreatefromjpeg($this->imgFilename);
     } else {
         $this->imgData = imagecreatefrompng($this->imgFilename);
     }
     $srcW = $this->imageproperties[0];
     $srcH = $this->imageproperties[1];
     if ($srcW > $this->photoSize || $srcH > $this->photoSize) {
         if ($srcW < $srcH) {
             $koe = $srcW / $this->photoSize;
             $destW = $this->photoSize;
             $destH = ceil($srcH / $koe);
             $src_x = $destW / 2 - $this->photoSize / 2;
             $src_y = 0;
         } else {
             $koe = $srcH / $this->photoSize;
             $destH = $this->photoSize;
             $destW = ceil($srcW / $koe);
             $src_x = $destW / 2 - $this->photoSize / 2;
             $src_y = 0;
         }
         $copy = imagecreatetruecolor($destW, $destH);
         imagecopyresampled($copy, $this->imgData, 0, 0, 0, 0, $destW, $destH, imagesx($this->imgData), imagesy($this->imgData));
         imagedestroy($this->imgData);
         imageconvolution($copy, array(array(-1, -1, -1), array(-1, 16, -1), array(-1, -1, -1)), 8, 0);
         $this->imgData = imagecreatetruecolor($this->photoSize, $this->photoSize);
         imagecopy($this->imgData, $copy, 0, 0, $src_x, $src_y, $this->photoSize, $this->photoSize);
         imagedestroy($copy);
     }
 }
Esempio n. 3
0
 public function __construct($dbo = NULL)
 {
     parent::__construct($dbo);
 }
 public function __construct($dbo = NULL, $accountId = 0)
 {
     parent::__construct($dbo);
     $this->setId($accountId);
 }
 public function __construct($dbo = NULL, $profileId = 0)
 {
     parent::__construct($dbo);
     $this->setId($profileId);
 }
Esempio n. 6
0
 /**
  * Passes arguments to the parent constructor and immediately
  * initializes a connection
  *
  */
 public function __construct($source = "ARCH")
 {
     parent::__construct("ARCH");
     $this->database_connection = $this->connect($source);
     return $this->database_connection;
 }
 public function __construct($dbo = NULL, $profile_id = 0)
 {
     parent::__construct($dbo);
 }
 public function __construct($dbo = NULL, $language = "en")
 {
     parent::__construct($dbo);
     $this->set($language);
 }
Esempio n. 9
0
 public function __construct($dbo = NULL)
 {
     $this->conn_id = @ftp_connect($this->ftp_server);
     parent::__construct($dbo);
 }
Esempio n. 10
0
 public function __construct($dbo = NULL)
 {
     parent::__construct($dbo);
     $this->auth_valid_sec = 7 * 24 * 3600;
     // 7 days
 }