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


PHP helper::safe64Decode方法代码示例

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


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

示例1: index

 /**
  * The error page.
  * 
  * @access public
  * @return void
  */
 public function index($type, $locate = '')
 {
     $this->view->title = $this->lang->error->common;
     $this->view->message = isset($this->lang->error->typeList[$type]) ? $this->lang->error->typeList[$type] : $this->lang->error->typeList['notFound'];
     $this->view->locate = helper::safe64Decode($locate);
     $this->display();
 }
开发者ID:leowh,项目名称:colla,代码行数:13,代码来源:control.php

示例2: cat

 /**
  * Cat a file.
  * 
  * @param  string $path
  * @param  int    $revision 
  * @access public
  * @return void
  */
 public function cat($path, $revision)
 {
     $path = helper::safe64Decode($path);
     $this->view->path = $path;
     $this->view->revision = $revision;
     $this->view->code = $this->git->cat($path, $revision);
     $this->display();
 }
开发者ID:caiwenhao,项目名称:zentao,代码行数:16,代码来源:control.php

示例3: cat

 /**
  * Cat a file.
  * 
  * @param  string $url 
  * @param  int    $revision 
  * @access public
  * @return void
  */
 public function cat($url, $revision)
 {
     $url = helper::safe64Decode($url);
     $this->view->url = $url;
     $this->view->revision = $revision;
     $this->view->code = $this->svn->cat($url, $revision);
     $this->display();
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:16,代码来源:control.php

示例4: checkUpdate

 /**
  * Check current version is latest or not.
  * 
  * @access public
  * @return void
  */
 public function checkUpdate()
 {
     $note = isset($_GET['note']) ? $_GET['note'] : '';
     $browser = isset($_GET['browser']) ? $_GET['browser'] : '';
     $this->view->note = urldecode(helper::safe64Decode($note));
     $this->view->browser = $browser;
     $this->display();
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:14,代码来源:control.php

示例5: getResult

 public function getResult($eventID)
 {
     $eventID = helper::safe64Decode($eventID);
     $result = $this->api->getResultByEvent($eventID);
     if ($result->status != 200) {
         $this->send(array('result' => 'fail', 'message' => $result->description));
     }
     $this->session->set('openID', $result->uid);
     $this->session->set('oauthProvider', 'yangcong');
     $this->send(array('result' => 'success'));
 }
开发者ID:hansen1416,项目名称:eastsoft,代码行数:11,代码来源:control.php

示例6: debug

 /**
  * The interface of api.
  * 
  * @param  int    $filePath 
  * @param  int    $action 
  * @access public
  * @return void
  */
 public function debug($filePath, $action)
 {
     $filePath = helper::safe64Decode($filePath);
     if ($action == 'extendModel') {
         $method = $this->api->getMethod($filePath, 'Model');
     } elseif ($action == 'extendControl') {
         $method = $this->api->getMethod($filePath);
     }
     if (!empty($_POST)) {
         $result = $this->api->request($method->className, $method->methodName, $action);
         $content = json_decode($result['content']);
         $status = $content->status;
         $data = json_decode($content->data);
         $data = '<xmp>' . print_r($data, true) . '</xmp>';
         $response['result'] = 'success';
         $response['status'] = $status;
         $response['url'] = $result['url'];
         $response['data'] = $data;
         $this->send($response);
     }
     $this->view->method = $method;
     $this->view->filePath = $filePath;
     $this->display();
 }
开发者ID:iamazhi,项目名称:zentaopms,代码行数:32,代码来源:control.php

示例7: addScore

 /**
  * Add score.
  * 
  * @param  int    $account 
  * @param  int    $objectType 
  * @param  int    $objectID 
  * @param  int    $score 
  * @access public
  * @return void
  */
 public function addScore($account, $objectType, $objectID)
 {
     $this->loadModel('score');
     if ($objectType == 'thread') {
         $board = $this->dao->select('board')->from(TABLE_THREAD)->where('id')->eq($objectID)->fetch('board');
     }
     if ($objectType == 'reply') {
         $board = $this->dao->select('t1.board')->from(TABLE_THREAD)->alias('t1')->leftJoin(TABLE_REPLY)->alias('t2')->on('t1.id=t2.thread')->where('t2.id')->eq($objectID)->fetch('board');
     }
     if (!isset($board) or !$this->thread->canManage($board)) {
         die;
     }
     if ($_POST) {
         $account = helper::safe64Decode($account);
         if ($objectType == 'thread') {
             $result = $this->score->award($account, 'valueThread', $this->post->count, $objectType, $objectID, $this->post->note);
         }
         if ($objectType == 'reply') {
             $result = $this->score->award($account, 'valueReply', $this->post->count, $objectType, $objectID, $this->post->note);
         }
         if ($result) {
             $this->send(array('result' => 'success', 'locate' => $this->server->http_referer));
         }
         $this->send(array('result' => 'fail', 'message' => dao::getError()));
     }
     $this->view->title = $this->lang->thread->score;
     $this->view->account = $account;
     $this->view->objectType = $objectType;
     $this->view->objectID = $objectID;
     $this->display();
 }
开发者ID:jnan77,项目名称:chanzhieps,代码行数:41,代码来源:control.php

示例8: uploadImages

 /**
  * Upload zip of Images.
  * 
  * @param  string    $module 
  * @param  string    $params 
  * @access public
  * @return void
  */
 public function uploadImages($module, $params)
 {
     if ($_FILES) {
         $file = $this->file->getUpload('file');
         $file = $file[0];
         if (!$file) {
             die(js::alert($this->lang->error->noData));
         }
         if ($file['extension'] != 'zip') {
             die(js::alert($this->lang->file->errorSuffix));
         }
         if ($file['size'] == 0) {
             die(js::alert($this->lang->file->errorFileUpload));
         }
         if (@move_uploaded_file($file['tmpname'], $this->file->savePath . $file['pathname'])) {
             $zipFile = $this->file->savePath . $file['pathname'];
             $filePath = $this->file->extractZip($zipFile);
             unlink($zipFile);
             if (!$filePath) {
                 die(js::alert($this->lang->file->errorExtract));
             }
             $this->session->set($module . 'ImagesFile', $filePath);
             die(js::locate($this->createLink($module, 'batchCreate', helper::safe64Decode($params)), 'parent.parent'));
         }
     }
     $this->display();
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:35,代码来源:control.php

示例9:

</th>
            <td><?php 
echo $plan->begin;
?>
</td>
          </tr>
          <tr>
            <th><?php 
echo $lang->productplan->end;
?>
</th>
            <td><?php 
echo $plan->end;
?>
</td>
          </tr>
        </table>
      </fieldset>
      <?php 
include '../../common/view/action.html.php';
?>
    </div>
  </div>
</div>
<?php 
js::set('param', helper::safe64Decode($param));
js::set('link', $link);
js::set('planID', $plan->id);
js::set('orderBy', $orderBy);
js::set('type', $type);
include '../../common/view/footer.html.php';
开发者ID:jsyinwenjun,项目名称:zentao,代码行数:31,代码来源:view.html.php

示例10: ignoreBind

 /**
  * Ignore bind an openID and an account.
  * 
  * @access public
  * @return void
  */
 public function ignoreBind()
 {
     $provider = $this->session->oauthProvider;
     $openID = $this->session->openID;
     $this->post->set('account', uniqid("{$provider}_"));
     // Create a uniq account.
     if ($provider == 'qq') {
         $this->post->set('realname', htmlspecialchars($this->session->openUser->nickname));
     }
     // Set the realname.
     if ($provider == 'sina') {
         $this->post->set('realname', htmlspecialchars($this->session->openUser->name));
     }
     // Set the realname.
     $this->user->registerOauthAccount($provider, $openID);
     $user = $this->user->getUserByOpenID($provider, $openID);
     $this->session->set('random', md5(time() . mt_rand()));
     if ($user and $this->user->login($user->account, md5($user->password . $this->session->random))) {
         if ($referer) {
             $this->locate(helper::safe64Decode($referer));
         }
         /* No referer, go to the user control panel. */
         $default = $this->config->user->default;
         $this->locate($this->createLink($default->module, $default->method));
     } else {
         die('some error occers.');
     }
 }
开发者ID:jnan77,项目名称:chanzhieps,代码行数:34,代码来源:control.php

示例11: array

          <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">X</span></button>
          <h4 class="modal-title"><?php 
        echo $lang->guarder->verify;
        ?>
</h4>
        </div>
        <div class="modal-body">
  <?php 
    }
    ?>
  <form class='form-inline' id='validateForm' action="<?php 
    echo $this->createLink('guarder', 'validate', "url={$url}&target={$target}&account={$account}&method={$method}");
    ?>
" method='post' style='min-height:165px'>
    <?php 
    $refUrl = helper::safe64Decode($url) == 'close' ? $this->app->getURI() : helper::safe64Decode($url);
    ?>
    <?php 
    $fileBtn = html::a($refUrl, $lang->guarder->created, "class='btn btn-sm btn-primary okFile'");
    ?>
    <table class='table table-form'>
      <tr>
        <th class='w-100px'><?php 
    echo $lang->guarder->options;
    ?>
</th>
        <td colspan='3'>
          <?php 
    $types = array();
    $options = explode(',', $this->config->site->importantValidate);
    if (in_array('securityQuestion', $options)) {
开发者ID:hansen1416,项目名称:eastsoft,代码行数:31,代码来源:validate.html.php

示例12: install

 /**
  * Install a extension
  * 
  * @param  string $extension 
  * @param  string $downLink 
  * @param  string $md5 
  * @param  string $type 
  * @param  string $overridePackage 
  * @param  string $ignoreCompatible 
  * @param  string $overrideFile 
  * @param  string $agreeLicense 
  * @param  int    $upgrade 
  * @access public
  * @return void
  */
 public function install($extension, $downLink = '', $md5 = '', $type = '', $overridePackage = 'no', $ignoreCompatible = 'no', $overrideFile = 'no', $agreeLicense = 'no', $upgrade = 'no')
 {
     $this->view->error = '';
     $installTitle = $upgrade == 'no' ? $this->lang->extension->install : $this->lang->extension->upgrade;
     $installType = $upgrade == 'no' ? $this->lang->extension->installExt : $this->lang->extension->upgradeExt;
     $this->view->installType = $installType;
     $this->view->upgrade = $upgrade;
     $this->view->title = $installTitle . $this->lang->colon . $extension;
     /* Get the package file name. */
     $packageFile = $this->extension->getPackageFile($extension);
     if ($downLink) {
         /* Checking download path. */
         $return = $this->extension->checkDownloadPath();
         if ($return->result != 'ok') {
             $this->view->error = $return->error;
             die($this->display());
         }
         /* Check file exists or not. */
         if (file_exists($packageFile) and $overridePackage == 'no') {
             $overrideLink = inlink('install', "extension={$extension}&downLink={$downLink}&md5={$md5}&type={$type}&overridePackage=yes&ignoreCompatible={$ignoreCompatible}&overrideFile={$overrideFile}&agreeLicense={$agreeLicense}&upgrade={$upgrade}");
             $this->view->error = sprintf($this->lang->extension->errorPackageFileExists, $packageFile, $installType, $overrideLink);
             die($this->display());
         }
         /* Download the package file. */
         $this->extension->downloadPackage($extension, helper::safe64Decode($downLink));
         if (!file_exists($packageFile)) {
             $this->view->error = sprintf($this->lang->extension->errorDownloadFailed, $packageFile);
             die($this->display());
         } elseif ($md5 != '' and md5_file($packageFile) != $md5) {
             unlink($packageFile);
             $this->view->error = sprintf($this->lang->extension->errorMd5Checking, $packageFile);
             die($this->display());
         }
     }
     /* Check the package file exists or not. */
     if (!file_exists($packageFile)) {
         $this->view->error = sprintf($this->lang->extension->errorPackageNotFound, $packageFile);
         die($this->display());
     }
     /* Checking the extension pathes. */
     $return = $this->extension->checkExtensionPathes($extension);
     if ($this->session->dirs2Created == false) {
         $this->session->set('dirs2Created', $return->dirs2Created);
     }
     // Save the dirs to be created.
     if ($return->result != 'ok') {
         $this->view->error = $return->errors;
         die($this->display());
     }
     /* Extract the package. */
     $return = $this->extension->extractPackage($extension);
     if ($return->result != 'ok') {
         $this->view->error = sprintf($this->lang->extension->errorExtracted, $packageFile, $return->error);
         die($this->display());
     }
     /* Get condition. e.g. zentao|depends|conflicts. */
     $condition = $this->extension->getCondition($extension);
     $installedExts = $this->extension->getLocalExtensions('installed');
     /* Check version incompatible */
     $incompatible = $condition->zentao['incompatible'];
     if ($this->extension->checkVersion($incompatible)) {
         $this->view->error = sprintf($this->lang->extension->errorIncompatible);
         die($this->display());
     }
     /* Check conflicts. */
     $conflicts = $condition->conflicts;
     if ($conflicts) {
         $conflictsExt = '';
         foreach ($conflicts as $code => $limit) {
             $hasConflicts = false;
             if (isset($installedExts[$code])) {
                 if ($this->extension->compare4Limit($installedExts[$code]->version, $limit)) {
                     $hasConflicts = true;
                 }
             }
             if ($hasConflicts) {
                 $conflictsExt .= $installedExts[$code]->name . " ";
             }
         }
         if ($hasConflicts) {
             $this->view->error = sprintf($this->lang->extension->errorConflicts, $conflictsExt);
             die($this->display());
         }
     }
     /* Check Depends. */
//.........这里部分代码省略.........
开发者ID:laiello,项目名称:zentaoms,代码行数:101,代码来源:control.php

示例13: setReferer

 /**
  * set the referer 
  * 
  * @param  string $referer 
  * @access public
  * @return void
  */
 public function setReferer($referer = '')
 {
     if (!empty($referer)) {
         $this->referer = helper::safe64Decode($referer);
     } else {
         $this->referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
     }
 }
开发者ID:leowh,项目名称:colla,代码行数:15,代码来源:control.php

示例14: delete

 /**
  * Delete extension file.
  * 
  * @param  string $filePath 
  * @param  string $confirm 
  * @access public
  * @return void
  */
 public function delete($filePath = '', $confirm = 'no')
 {
     if ($confirm == 'no') {
         die(js::confirm($this->lang->editor->deleteConfirm, inlink('delete', "filePath={$filePath}&confirm=yes")));
     }
     $filePath = helper::safe64Decode($filePath);
     if (file_exists($filePath) and unlink($filePath)) {
         die(js::reload('parent'));
     }
     die(js::alert($this->lang->editor->notDelete));
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:19,代码来源:control.php

示例15: bind

 /**
  * Bind user. 
  * 
  * @param  string $referer 
  * @access public
  * @return void
  */
 public function bind($referer = '')
 {
     if (!$this->session->ssoData) {
         die;
     }
     $ssoData = $this->session->ssoData;
     $userIP = $this->server->remote_addr;
     $code = $this->config->sso->code;
     $key = $this->config->sso->key;
     if ($ssoData->auth != md5($code . $userIP . $ssoData->token . $key)) {
         die;
     }
     $this->loadModel('user');
     if ($_POST) {
         $user = $this->sso->bind();
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         /* Authorize him and save to session. */
         $user->rights = $this->user->authorize($user->account);
         $user->groups = $this->user->getGroups($user->account);
         $this->dao->update(TABLE_USER)->set('visits = visits + 1')->set('ip')->eq($userIP)->set('last')->eq($last)->where('account')->eq($user->account)->exec();
         $user->last = date(DT_DATETIME1, $last);
         $this->session->set('user', $user);
         $this->app->user = $this->session->user;
         $this->loadModel('action')->create('user', $user->id, 'login');
         unset($_SESSION['ssoData']);
         die(js::locate(helper::safe64Decode($referer), 'parent'));
     }
     $this->view->title = $this->lang->sso->bind;
     $this->view->users = $this->user->getPairs('nodeleted|noclosed');
     $this->view->data = $ssoData;
     $this->display();
 }
开发者ID:caiwenhao,项目名称:zentao,代码行数:41,代码来源:control.php


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