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


PHP Info::AddInfo方法代码示例

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


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

示例1: Video

                $VideosInDB = Video::Filter($Videos, $ModelID, $Set->getID(), $matches['Name'] . $matches['Number'] . $matches['Suffix']);
                if ($VideosInDB) {
                    $VideoInDB = $VideosInDB[0];
                    $cis = CacheImage::Filter($CacheImages, NULL, NULL, NULL, NULL, NULL, $VideoInDB->getID());
                    CacheImage::DeleteMulti($cis, $CurrentUser);
                } else {
                    $VideoInDB = new Video();
                    $VideoInDB->setSet($Set);
                }
                $VideoInDB->setFileName($matches['Prefix'] . $matches['Name'] . $matches['Number'] . $matches['Suffix']);
                $VideoInDB->setFileExtension($matches['Extension']);
                $VideoInDB->setFileSize($FileInfo->getSize());
                $VideoInDB->setFileCheckSum(Utils::CalculateMD5($FileInfo->getRealPath()));
                $VideoInDB->setFileCRC32(Utils::CalculateCRC32($FileInfo->getRealPath()));
                if (!$VideoInDB->getID() && $CurrentUser->hasPermission(RIGHT_VIDEO_ADD)) {
                    Video::Insert($VideoInDB, $CurrentUser);
                } else {
                    if ($CurrentUser->hasPermission(RIGHT_VIDEO_EDIT)) {
                        Video::Update($VideoInDB, $CurrentUser);
                    }
                }
            }
        }
    }
    $infoSuccess = new Info($lang->g('MessageVideosImported'));
    Info::AddInfo($infoSuccess);
    if (isset($argv) && $argc > 0) {
        $bi->Finish();
    }
}
HTMLstuff::RefererRedirect();
开发者ID:laiello,项目名称:candydolldb,代码行数:31,代码来源:import_video.php

示例2: isset

    $SmtpUsername = isset($_POST['txtSmtpUsername']) && strlen($_POST['txtSmtpUsername']) > 0 ? (string) $_POST['txtSmtpUsername'] : NULL;
    $SmtpPassword = isset($_POST['txtSmtpPassword']) && strlen($_POST['txtSmtpPassword']) > 0 ? (string) $_POST['txtSmtpPassword'] : NULL;
    $SmtpPort = isset($_POST['txtSmtpPort']) && intval($_POST['txtSmtpPort']) > 0 ? intval($_POST['txtSmtpPort']) : 0;
    $SmtpAuth = array_key_exists('chkSmtpAuth', $_POST);
    // Checks
    // TODO
    // Read-write config.php
    if (($configfile = file_get_contents('config.php')) !== FALSE) {
        $configfile = preg_replace(array("/define\\('CANDYPATH'           [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('CANDYVIDEOTHUMBPATH' [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('DBHOSTNAME'          [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('DBUSERNAME'          [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('DBPASSWORD'          [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('DBNAME'              [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('SMTP_FROM_ADDRESS'   [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('SMTP_FROM_NAME'      [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('SMTP_HOST'           [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('SMTP_USERNAME'       [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('SMTP_PASSWORD'       [ \t]*,[ \t]*'[^']+?'[ \t]*\\);/ix", "/define\\('SMTP_PORT'           [ \t]*,[ \t]*\\d+[ \t]*\\);/ix", "/define\\('SMTP_AUTH'           [ \t]*,[ \t]*(true|false)[ \t]*\\);/ix", "/define\\('CMDLINE_USERID'      [ \t]*,[ \t]*\\d+[ \t]*\\);/ix"), array(sprintf("define('CANDYPATH', '%1\$s');", $CandyPath), sprintf("define('CANDYVIDEOTHUMBPATH', '%1\$s');", $CandyVideoThumbPath), sprintf("define('DBHOSTNAME', '%1\$s');", $DBHostName), sprintf("define('DBUSERNAME', '%1\$s');", $DBUserName), sprintf("define('DBPASSWORD', '%1\$s');", $DBPassword), sprintf("define('DBNAME', '%1\$s');", $DBName), sprintf("define('SMTP_FROM_ADDRESS', '%1\$s');", $SmtpFromAddress), sprintf("define('SMTP_FROM_NAME', '%1\$s');", $SmtpFromName), sprintf("define('SMTP_HOST', '%1\$s');", $SmtpHostname), sprintf("define('SMTP_USERNAME', '%1\$s');", $SmtpUsername), sprintf("define('SMTP_PASSWORD', '%1\$s');", $SmtpPassword), sprintf("define('SMTP_PORT', %1\$d);", $SmtpPort), sprintf("define('SMTP_AUTH', %1\$s);", $SmtpAuth ? 'TRUE' : 'FALSE'), sprintf("define('CMDLINE_USERID', %1\$d);", $CommandlineUserID)), $configfile);
        if ($CurrentUser->hasPermission(RIGHT_CONFIG_REWRITE)) {
            if (@file_put_contents('config.php', $configfile) === FALSE) {
                $e = new Error(NULL, $lang->g('ErrorSetupWritingConfig'));
                Error::AddError($e);
            } else {
                $i = new Info($lang->g('MessageConfigWritten'));
                Info::AddInfo($i);
            }
        } else {
            $e = new Error(RIGHTS_ERR_USERNOTALLOWED);
            Error::AddError($e);
        }
    } else {
        $e = new Error(NULL, $lang->g('ErrorSetupWritingConfig'));
        Error::AddError($e);
    }
}
$UsersOptions = '';
$Users = User::GetUsers();
/* @var $User User */
foreach ($Users as $User) {
    $UsersOptions .= sprintf("<option value=\"%1\$d\"%3\$s>%2\$s</option>", $User->getID(), htmlentities($User->GetFullName()), HTMLstuff::SelectedStr($User->getID() == $CommandlineUserID));
开发者ID:laiello,项目名称:candydolldb,代码行数:31,代码来源:admin_panel.php


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