HOME


Mini Shell 1.0
DIR: /home/islapiiu/sites/evergreenvilla/class/
Upload File :
Current File : /home/islapiiu/sites/evergreenvilla/class/Helper.php
<?php

class Helper {

    public function randamId() {



        $today = time();

        $startDate = date('YmdHi', strtotime('1912-03-14 09:06:00'));

        $range = $today - $startDate;

        $rand = rand(0, $range);

        $randam = $rand . "_" . ($startDate + $rand) . '_' . $today . "_n";

        return $randam;
    }

    public function calImgResize($newHeight, $width, $height) {



        $percent = $newHeight / $height;

        $result1 = $percent * 100;



        $result2 = $width * $result1 / 100;



        return array($result2, $newHeight);
    }

    public function getSitePath() {

//        return substr_replace(dirname(__FILE__), '', 26);

        $path = str_replace('class', '', dirname(__FILE__));

        return $path;
    }

}