当前位置: 首页>>代码示例>>PHP>>正文


PHP Ibos::import方法代码示例

本文整理汇总了PHP中Ibos::import方法的典型用法代码示例。如果您正苦于以下问题:PHP Ibos::import方法的具体用法?PHP Ibos::import怎么用?PHP Ibos::import使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ibos的用法示例。


在下文中一共展示了Ibos::import方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: parse

 public function parse($isUpdate = false)
 {
     Ibos::import("application.extensions.simple_html_dom", true);
     if ($isUpdate) {
         $model = preg_replace("/\\s+data-id\\s?=\\s?\"?\\d+\"?/i", "", $this->printmodel);
         $max = 0;
     } else {
         $model = $this->printmodel;
         $max = intval($this->itemmax);
     }
     $elements = array();
     $doc = new simple_html_dom();
     $doc->load($model, true, true, CHARSET);
     $items = $doc->find("ic");
     $config = $this->getItemConfig();
     if (!empty($items) && !empty($config)) {
         $this->refactor($items, $config, $max, $elements);
     }
     $html = $doc->save();
     $this->_cache = $elements;
     CacheUtil::set("form_" . $this->ID, $elements);
     $form["printmodelshort"] = $html;
     if ($max != $this->itemmax) {
         $form["itemmax"] = $max;
     }
     $doc->clear();
     FlowFormType::model()->modify($this->ID, $form);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:28,代码来源:SimpleHtmlParser.php

示例2: actionCropImg

 public function actionCropImg()
 {
     if (EnvUtil::submitCheck("userSubmit")) {
         $params = $_POST;
         if (!isset($params) && empty($params)) {
             return null;
         }
         $tempAvatar = $params["src"];
         $avatarPath = "data/avatar/";
         $avatarBig = UserUtil::getAvatar($params["uid"], "big");
         $avatarMiddle = UserUtil::getAvatar($params["uid"], "middle");
         $avatarSmall = UserUtil::getAvatar($params["uid"], "small");
         if (LOCAL) {
             FileUtil::makeDirs($avatarPath . dirname($avatarBig));
         }
         FileUtil::createFile("data/avatar/" . $avatarBig, "");
         FileUtil::createFile("data/avatar/" . $avatarMiddle, "");
         FileUtil::createFile("data/avatar/" . $avatarSmall, "");
         Ibos::import("ext.ThinkImage.ThinkImage", true);
         $imgObj = new ThinkImage(THINKIMAGE_GD);
         $imgObj->open($tempAvatar)->crop($params["w"], $params["h"], $params["x"], $params["y"])->save($tempAvatar);
         $imgObj->open($tempAvatar)->thumb(180, 180, 1)->save($avatarPath . $avatarBig);
         $imgObj->open($tempAvatar)->thumb(60, 60, 1)->save($avatarPath . $avatarMiddle);
         $imgObj->open($tempAvatar)->thumb(30, 30, 1)->save($avatarPath . $avatarSmall);
         $this->success(Ibos::lang("Upload avatar succeed"), $this->createUrl("home/personal", array("op" => "avatar")));
         exit;
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:28,代码来源:InfoController.php

示例3: init

 protected function init()
 {
     Ibos::setPathOfAlias("engineDriver", Ibos::getPathOfAlias("ext.enginedriver.sae"));
     $alias = Ibos::getPathOfAlias("engineDriver");
     $classes = array("CMemCache" => $alias . "/caching/CMemCache.php", "CDbCommand" => $alias . "/db/CDbCommand.php", "CDbConnection" => $alias . "/db/CDbConnection.php");
     Ibos::$classMap = CMap::mergeArray(Ibos::$classMap, $classes);
     Ibos::import("engineDriver.*");
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:8,代码来源:SaeEngine.php

示例4: getTplEditorContent

 public static function getTplEditorContent($file)
 {
     Ibos::import("application.extensions.simple_html_dom", true);
     $doc = file_get_html($file);
     if (!$doc) {
         return null;
     }
     $e = $doc->find("div[id=page_content]", 0);
     if (!$e) {
         return null;
     }
     return $e->innertext;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:13,代码来源:SinglePageUtil.php

示例5: createChart

 public function createChart($counter, $className, $properties = array())
 {
     $className = Ibos::import($className, true);
     $chart = new $className($counter);
     $this->chkInstance($chart);
     if (isset($this->charts[$className])) {
         $properties = $properties === array() ? $this->charts[$className] : CMap::mergeArray($this->charts[$className], $properties);
     }
     foreach ($properties as $name => $value) {
         $chart->{$name} = $value;
     }
     return $chart;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:13,代码来源:ICChartFactory.php

示例6: createAdapter

 public function createAdapter($className, $config = array(), $properties = array())
 {
     $className = Ibos::import($className, true);
     $adapter = new $className($config);
     $this->chkInstance($adapter);
     if ($adapter->check()) {
         foreach ($properties as $name => $value) {
             $adapter->{$name} = $value;
         }
         return $adapter;
     } else {
         $this->setError($className, $adapter->getError());
         return false;
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:15,代码来源:ICIMFactory.php

示例7: setCommonBg

 private function setCommonBg($src)
 {
     $bgPath = "data/home/";
     $random = StringUtil::random(16);
     $bgBig = $random . "_big.jpg";
     $bgMiddle = $random . "_middle.jpg";
     $bgSmall = $random . "_small.jpg";
     FileUtil::createFile($bgPath . $bgBig, "");
     FileUtil::createFile($bgPath . $bgMiddle, "");
     FileUtil::createFile($bgPath . $bgSmall, "");
     Ibos::import("ext.ThinkImage.ThinkImage", true);
     $imgObj = new ThinkImage(THINKIMAGE_GD);
     $imgObj->open($src)->thumb(1000, 300, 1)->save($bgPath . $bgBig);
     $imgObj->open($src)->thumb(520, 156, 1)->save($bgPath . $bgMiddle);
     $imgObj->open($src)->thumb(400, 120, 1)->save($bgPath . $bgSmall);
     $data = array("desc" => "", "status" => 0, "system" => 0, "image" => $random);
     $addRes = BgTemplate::model()->add($data);
     return $addRes;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:19,代码来源:SkinController.php

示例8: readLicence

 private function readLicence($licencekey)
 {
     $c = "";
     if (strpos($licencekey, "|") == false) {
         return false;
     }
     list($pre, $c) = explode("|", $licencekey);
     if (empty($c)) {
         return false;
     }
     $modulus = "247951816413205085921106286398120136896788014055199338629780778472204077308053767006218018324142651909195596003106594609159002643031774387211432583166542583483099049359378164797170552666392349957500492002826361302903529659499530039.0000000000";
     $public = "65537";
     $keylength = "768";
     Ibos::import("ext.auth.RSA", true);
     $RSA = new RSA();
     $pre = base64_decode($pre);
     $key = $RSA->verify($pre, $public, $modulus, $keylength);
     $key = trim($key, "");
     Ibos::import("ext.auth.AES", true);
     $AES = new AES(true);
     $keys = $AES->makeKey($key);
     $s = $AES->decryptString($c, $keys);
     $s = json_decode($s, true);
     return $s;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:25,代码来源:ICApplication.php

示例9: restoreZip

function restoreZip($id)
{
    $path = PATH_ROOT;
    if (strstr($path, 'data')) {
        $id = trim(str_replace('data', '', $id), '/');
    }
    if (!file_exists($id)) {
        return array('success' => 0, 'msg' => Ibos::lang('Database import file illegal', 'dashboard.default'));
    }
    $dataFileVol1 = trim(EnvUtil::getRequest('datafilevol1', 'G'));
    $multiVol = intval(EnvUtil::getRequest('multivol', 'G'));
    Ibos::import('ext.Zip', true);
    $unzip = new SimpleUnzip();
    $unzip->ReadFile($id);
    if ($unzip->Count() == 0 || $unzip->GetError(0) != 0 || !preg_match("/\\.sql\$/i", $importFile = $unzip->GetName(0))) {
        return array('success' => 0, 'msg' => Ibos::lang('Database import file illegal', 'dashboard.default'));
    }
    $identify = explode(',', base64_decode(preg_replace("/^# Identify:\\s*(\\w+).*/s", "\\1", substr($unzip->GetData(0), 0, 256))));
    $confirm = EnvUtil::getRequest('confirm', 'G');
    $confirm = !is_null($confirm) ? 1 : 0;
    if (!$confirm && $identify[1] != VERSION) {
        return array('type' => 'confirm', 'msg' => Ibos::lang('Database import confirm', 'dashboard.default'), 'url' => 'restore.php?' . http_build_query(array('op' => 'restorezip', 'confirm' => 'yes', 'id' => $id)));
    }
    $sqlFileCount = 0;
    foreach ($unzip->Entries as $entry) {
        if (preg_match("/\\.sql\$/i", $entry->Name)) {
            $fp = fopen('backup/' . $entry->Name, 'w');
            fwrite($fp, $entry->Data);
            fclose($fp);
            $sqlFileCount++;
        }
    }
    if (!$sqlFileCount) {
        return array('success' => 0, 'msg' => Ibos::lang('Database import file illegal', 'dashboard.default'));
    }
    if ($multiVol) {
        $multiVol++;
        $id = preg_replace("/-(\\d+)(\\..+)\$/", "-{$multiVol}\\2", $id);
        if (file_exists($multiVol)) {
            $param = array('op' => 'restorezip', 'multivol' => $multiVol, 'datafilevol1' => $dataFileVol1, 'delunzip' => $dataFileVol1, 'confirm' => 'yes');
            return array('type' => 'confirm', 'msg' => Ibos::lang('Database import multivol unzip redirect', 'dashboard.default', array('multivol' => $multiVol)), 'url' => 'restore.php?' . http_build_query($param));
        } else {
            $param = array('op' => 'restore', 'id' => $dataFileVol1, 'autorestore' => 'yes', 'delunzip' => 'yes');
            return array('type' => 'confirm', 'msg' => Ibos::lang('Database import multivol confirm', 'dashboard.default'), 'url' => 'restore.php?' . http_build_query($param));
        }
    }
    $info = '<b>' . basename($id) . '</b><br />' . Ibos::lang('Version') . ': ' . $identify[1] . '<br />' . Ibos::lang('Type') . ': ' . $identify[2] . '<br />' . Ibos::lang('Backup method') . ': ' . ($identify[3] == 'multivol' ? Ibos::lang('DBMultivol') : Ibos::lang('DBShell')) . '<br />';
    if ($identify[3] == 'multivol' && $identify[4] == 1 && preg_match("/-1(\\..+)\$/", $id)) {
        $dataFileVol1 = $id;
        $id = preg_replace("/-1(\\..+)\$/", "-2\\1", $id);
        if (file_exists($id)) {
            $param = array('op' => 'restorezip', 'multivol' => 1, 'datafilevol1' => 'backup/' . $importFile, 'id' => $id, 'confirm' => 'yes');
            return array('type' => 'redirect', 'msg' => Ibos::lang('Database import multivol unzip redirect', 'dashboard.default', array('multivol' => 1)), 'url' => 'restore.php?' . http_build_query($param));
        }
    }
    $param = array('op' => 'restore', 'datafilevol1' => $dataFileVol1, 'id' => 'backup/' . $importFile, 'delunzip' => 'yes', 'autorestore' => 'yes');
    return array('type' => 'confirm', 'msg' => Ibos::lang('Database import unzip', 'dashboard.default', array('info' => $info)), 'url' => 'restore.php?' . http_build_query($param));
}
开发者ID:AxelPanda,项目名称:ibos,代码行数:58,代码来源:restore.php

示例10: isset

									<i class='os-company'></i>
									<span data-node-type="departmentName"><?php 
echo isset($unit['fullname']) ? $unit['fullname'] : '';
?>
</span>
								</a>
							</td>
							<td>--</td>
							<td><?php 
echo $lang['Headquarters'];
?>
</td>
							<td class='posr'></td>
						</tr>
						<?php 
Ibos::import('ext.Tree', true);
if ($perEdit) {
    $editOp = "<a href='javascript:;' class='org-dep-btn' data-action='moveupDept' title='上移'><i class='glyphicon-arrow-up'></i></a>\r\n\t\t\t\t\t\t\t\t\t<a href='javascript:;' class='org-dep-btn' data-action='movedownDept' title='下移'><i class='glyphicon-arrow-down'></i></a>";
} else {
    $editOp = '';
}
if ($perDel) {
    $delOp = "<a href='javascript:;' class='org-dep-btn' data-action='removeDept' title='删除'><i class='glyphicon-remove'></i></a>";
} else {
    $delOp = '';
}
foreach ($dept as $key => $value) {
    $type = $value['isbranch'] ? 'Branch' : 'Department';
    // 图标
    if ($value['manager'] > 0) {
        $manager = User::model()->fetchByUid($value['manager']);
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:index.php

示例11: iIconv

 public static function iIconv($str, $inCharset, $outCharset = CHARSET, $forceTable = false)
 {
     $inCharset = strtoupper($inCharset);
     $outCharset = strtoupper($outCharset);
     if (empty($str) || $inCharset == $outCharset) {
         return $str;
     }
     $out = "";
     if (!$forceTable) {
         if (function_exists("iconv")) {
             $out = iconv($inCharset, $outCharset . "//IGNORE", $str);
         } elseif (function_exists("mb_convert_encoding")) {
             $out = mb_convert_encoding($str, $outCharset, $inCharset);
         }
     }
     if ($out == "") {
         Ibos::import("ext.chinese.Chinese", true);
         $chinese = new Chinese($inCharset, $outCharset, true);
         $out = $chinese->Convert($str);
     }
     return $out;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:22,代码来源:ConvertUtil.php

示例12: actionIndex

 public function actionIndex()
 {
     $operation = EnvUtil::getRequest("op");
     switch ($operation) {
         case "thumbpreview":
         case "waterpreview":
             $temp = Ibos::engine()->IO()->file()->getTempPath() . "/watermark_temp.jpg";
             if (LOCAL) {
                 if (is_file($temp)) {
                     @unlink($temp);
                 }
             }
             $quality = EnvUtil::getRequest("quality");
             $source = PATH_ROOT . "/static/image/watermark_preview.jpg";
             if ($operation == "waterpreview") {
                 $trans = EnvUtil::getRequest("trans");
                 $type = EnvUtil::getRequest("type");
                 $val = EnvUtil::getRequest("val");
                 $pos = EnvUtil::getRequest("pos");
                 if ($type == "image") {
                     $sInfo = ImageUtil::getImageInfo($source);
                     $wInfo = ImageUtil::getImageInfo($val);
                     if ($sInfo["width"] < $wInfo["width"] || $sInfo["height"] < $wInfo["height"]) {
                         Ibos::import("ext.ThinkImage.ThinkImage", true);
                         $imgObj = new ThinkImage(THINKIMAGE_GD);
                         $imgObj->open($val)->thumb(260, 77, 1)->save($val);
                     }
                     ImageUtil::water($source, $val, $temp, $pos, $trans, $quality);
                 } else {
                     $hexColor = EnvUtil::getRequest("textcolor");
                     $size = EnvUtil::getRequest("size");
                     $fontPath = EnvUtil::getRequest("fontpath");
                     $rgb = ConvertUtil::hexColorToRGB($hexColor);
                     ImageUtil::waterMarkString($val, $size, $source, $temp, $pos, $quality, $rgb, self::TTF_FONT_PATH . $fontPath);
                 }
                 $image = $temp;
             }
             if (!LOCAL) {
                 if (Ibos::engine()->IO()->file()->createFile($temp, file_get_contents($image))) {
                     $image = FileUtil::fileName($temp);
                 }
             }
             $data = array("image" => $image, "sourceSize" => ConvertUtil::sizeCount(FileUtil::fileSize($source)), "thumbSize" => ConvertUtil::sizeCount(FileUtil::fileSize($image)), "ratio" => sprintf("%2.1f", FileUtil::fileSize($image) / FileUtil::fileSize($source) * 100) . "%");
             $this->render("imagePreview", $data);
             exit;
             break;
         case "upload":
             return $this->imgUpload("watermark", true);
             break;
     }
     $formSubmit = EnvUtil::submitCheck("uploadSubmit");
     $uploadKeys = "attachdir,attachurl,thumbquality,attachsize,filetype";
     $waterMarkkeys = "watermarkminwidth,watermarkminheight,watermarktype,watermarkposition,watermarktrans,watermarkquality,watermarkimg,watermarkstatus,watermarktext,watermarkfontpath";
     if ($formSubmit) {
         $keys = $uploadKeys . "," . $waterMarkkeys;
         $keyField = explode(",", $keys);
         foreach ($_POST as $key => $value) {
             if (in_array($key, $keyField)) {
                 Setting::model()->updateSettingValueByKey($key, $value);
             } elseif ($key == "watermarkstatus") {
                 Setting::model()->updateSettingValueByKey("watermarkstatus", 0);
             }
         }
         CacheUtil::update(array("setting"));
         $this->success(Ibos::lang("Save succeed", "message"));
     } else {
         $upload = Setting::model()->fetchSettingValueByKeys($uploadKeys);
         $waterMark = Setting::model()->fetchSettingValueByKeys($waterMarkkeys);
         $fontPath = DashboardUtil::getFontPathlist(self::TTF_FONT_PATH);
         $data = array("upload" => $upload, "waterMark" => $waterMark, "fontPath" => $fontPath);
         $this->render("index", $data);
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:73,代码来源:UploadController.php

示例13: defined

<?php

defined("IN_MODULE_ACTION") || exit("Access Denied");
CacheUtil::update(array("setting", "nav"));
$creditExists = CreditRule::model()->countByAttributes(array("action" => "addresume"));
if (!$creditExists) {
    $data = array("rulename" => "添加简历", "action" => "addresume", "cycletype" => "3", "rewardnum" => "1", "extcredits1" => "0", "extcredits2" => "1", "extcredits3" => "1");
    CreditRule::model()->add($data);
}
Ibos::import("application.modules.recruit.model.ResumeStats", true);
ResumeStats::model()->add(array("new" => 0, "pending" => 0, "interview" => 0, "employ" => 0, "eliminate" => 0, "datetime" => strtotime(date("Y-m-d")) - 86400));
开发者ID:AxelPanda,项目名称:ibos,代码行数:11,代码来源:extention.php

示例14: createImgIcon

 private function createImgIcon($tempFile, $outputName)
 {
     $outputFile = $this->_iconPath . $outputName;
     FileUtil::createFile($outputFile, "");
     Ibos::import("ext.ThinkImage.ThinkImage", true);
     $imgObj = new ThinkImage(THINKIMAGE_GD);
     $imgObj->open($tempFile)->save($outputFile);
     return true;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:9,代码来源:QuicknavController.php

示例15: getTree

 public static function getTree($data, $format = "<option value='\$catid' \$selected>\$spacer\$name</option>", $id = 0, $nbsp = "&nbsp;&nbsp;&nbsp;&nbsp;", $icon = array("&nbsp;&nbsp;", "&nbsp;&nbsp;", "&nbsp;&nbsp;"))
 {
     Ibos::import("ext.Tree", true);
     $tree = new tree();
     $tree->init($data);
     $tree->icon = $icon;
     $tree->nbsp = $nbsp;
     $trees = $tree->get_tree(0, $format, $id);
     return $trees;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:10,代码来源:StringUtil.php


注:本文中的Ibos::import方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。