本文整理汇总了PHP中manager类的典型用法代码示例。如果您正苦于以下问题:PHP manager类的具体用法?PHP manager怎么用?PHP manager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了manager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: other
function other()
{
$dept = new department();
$admindept = $dept->getAll();
$man = new manager();
$dept_managers = $man->getAllDept();
while ($element = each($dept_managers)) {
}
$smt = new SMT('manager/AddAdmin', '..');
$smt->render(array('admindept' => $admindept, 'admindept_sel' => key($admindept), 'dept_managers' => $dept_managers));
}
开发者ID:skydel,项目名称:universal-online-exam,代码行数:11,代码来源:AddAdmin.php
示例2: printArray
public function printArray($all)
{
if (is_array($all)) {
// Kint::dump($all);
echo "<table border=1px>";
echo "\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<th></th>\r\n \t\t\t\t<th>id</th>\r\n \t\t\t\t\t<th>Задание</th>\r\n \t\t\t\t\t<th>Описание</th>\r\n \t\t\t\t\t<th>Поручено</th>\r\n \t\t\t\t\t<th>Срок</th>\r\n \t\t\t\t\t<th>Окончено</th>\r\n \t\t\t\t\t<th>Кто поручил</th>\r\n \t\t\t\t\t<th>Кому поручено</th>\r\n \t\t\t\t\t<th>Приоритет</th>\r\n \t\t\t\t\t<th>Статус</th>\r\n \t\t\t\t\t<th>Сайт</th>\r\n\t\t\t\t</thead>";
foreach ($all as $x) {
$id = $x->id;
$hostingName = hosting::GET($x->hostingID)->name;
$managerName = manager::GET($x->managerID)->name;
$registratorName = registrator::GET($x->registratorID)->name;
$from = $_SERVER['REQUEST_URI'];
echo "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<a href=\"/task/edit/{$id}?return-url={$from}\">\r\n\t\t\t\t\t\t\t\tE\r\n\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<a href=\"/task/view/{$id}\">\r\n\t\t\t\t\t\t\t\t{$id}\r\n\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td><a href=\"/task/view/{$id}\">\r\n\t\t\t\t\t\t\t{$x->name}\r\n\t\t\t\t\t\t</td></a>\r\n\t\t\t\t\t\t<td>{$x->description}</td>\r\n\t\t\t\t\t\t<td>";
if (!is_null($x->insert_datetime)) {
echo DateTime::createFromFormat("M d Y h:i:s:uA", $x->insert_datetime)->format("Y-m-d H:i");
}
echo "</td>\r\n\t\t\t\t\t\t<td>";
if (!is_null($x->deadlineDate)) {
echo DateTime::createFromFormat("M d Y h:i:s:uA", $x->deadlineDate)->format("Y-m-d H:i");
}
echo "</td>\r\n\t\t\t\t\t\t<td>";
if (!is_null($x->finishedDate)) {
echo DateTime::createFromFormat("M d Y h:i:s:uA", $x->finishedDate)->format("Y-m-d H:i");
}
echo "</td>\r\n\t\t\t\t\t\t<td><a href=\"/user/view/{$x->giver_userID}\">\r\n\t\t\t\t\t\t\t" . user::GET($x->giver_userID)->username . "\r\n\t\t\t\t\t\t</a></td>\r\n\t\t\t\t\t\t<td><a href=\"/user/view/{$x->doer_userID}\">\r\n\t\t\t\t\t\t\t" . user::GET($x->doer_userID)->username . "\r\n\t\t\t\t\t\t</a></td>\r\n\t\t\t\t\t\t<td>" . priority::GET($x->priorityID)->name . "</td>\r\n\t\t\t\t\t\t<td>" . status::GET($x->statusID)->name . "</td>\r\n\t\t\t\t\t\t<td><a href=\"/site/view/{$x->siteID}\">" . site::GET($x->siteID)->name . "</a></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t";
}
echo "</table>";
}
}
开发者ID:Tacit007,项目名称:Tacit007-php-framework,代码行数:29,代码来源:task.php
示例3: GET
public function GET($id)
{
if (!manager::IFDELETED($id)) {
$getQuery = "SELECT id, name FROM [dbo].[manager] WHERE id={$id};";
$row = mssql_fetch_array(mssql_query($getQuery));
$result = new manager($row["id"], $row["name"]);
return $result;
}
}
开发者ID:Tacit007,项目名称:Tacit007-php-framework,代码行数:9,代码来源:manager.php
示例4: newEntry
public function newEntry()
{
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
manager::INSERT($_POST['name']);
header("Location: /manager/view/{$id}");
} else {
managerController::loadView('new', $args = array());
}
}
开发者ID:Tacit007,项目名称:Tacit007-php-framework,代码行数:9,代码来源:managerController.php
示例5: __construct
function __construct($model, $session = "0", $clock = 0)
{
$this->clock = $clock;
//0;
wfDebugLog('p2p', $this->clock . ' - function logootEngine::__construct ');
if (isset($model)) {
$this->model = $model;
} else {
$this->model = manager::getNewBoModel();
}
$this->sessionid = $session;
}
开发者ID:hala54,项目名称:DSMW,代码行数:12,代码来源:logootEngine.php
示例6: loadModel
/**
*
* @param <String> $rev_id Revision id
* @return boModel
*/
static function loadModel($rev_id)
{
try {
if ($rev_id != 0) {
$dao = new dao();
return $dao->loadModel($rev_id);
} else {
return manager::getNewBoModel();
}
} catch (Exception $e) {
throw new MWException(__METHOD__ . ' db access problems,
if this page existed before the DSMW installation,
maybe it has not been processed by DSMW');
}
}
开发者ID:hala54,项目名称:DSMW,代码行数:20,代码来源:manager.php
示例7: user
<?php
include "php/user.php";
include "php/security.php";
include "php/manager.php";
$login = new user();
$sec = new security();
$manager = new manager();
$logincheck = $login->islogin();
if ($logincheck != 1) {
header("location: index.php");
} else {
if (isset($_GET['error'])) {
$error = $_GET['error'];
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$managername = $sec->escape($_POST['managername']);
$managerlength = $sec->checknullwithoutwhitespace($managername);
$managerage = $sec->escape($_POST['managerage']);
$managermail = $sec->escape($_POST['managermail']);
$manageraddress = $sec->escape($_POST['manageraddress']);
if ($managerlength != 0) {
$ans = $manager->addmanager($managername, $managerage, $managermail, $manageraddress);
if ($ans == 0) {
$error = "نام مدیر نباید تکراری باشد";
} else {
$error = "مدیر با موفقیت ایجاد شد";
}
} else {
$error = "لطفا ابتدا نام مدیر را وارد کنید";
}
开发者ID:padratec,项目名称:school-last,代码行数:31,代码来源:managers.php
示例8: user
<?php
include "php/security.php";
include "php/school.php";
include "php/user.php";
include "php/manager.php";
$login = new user();
$logincheck = $login->islogin();
if ($logincheck != 1) {
header("location: index.php");
die;
}
$manager = new manager();
$sec = new security();
$name;
$age;
$email;
$address;
if ($_SERVER["REQUEST_METHOD"] == "GET") {
if (isset($_GET['id'])) {
$result = $manager->getmanagerbyid($_GET['id']);
$row = $result->fetch_assoc();
$name = $row['Name'];
$age = $row['Age'];
$email = $row['Email'];
$address = $row['Address'];
}
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$id = $sec->escape($_POST['managerid']);
$managername = $sec->escape($_POST["managername"]);
开发者ID:padratec,项目名称:school-last,代码行数:31,代码来源:editmanager.php
示例9: user
<?php
include "php/user.php";
include "php/manager.php";
include "php/school.php";
include "php/security.php";
$login = new user();
$manager = new manager();
$school = new school();
$sec = new security();
$logincheck = $login->islogin();
if ($logincheck != 1) {
header("location: index.php");
} else {
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if (isset($_POST['schoolid'])) {
$schoolid = $_POST['schoolid'];
$managerid = $_POST['managerid'];
$shift = $_POST['shift'];
$school->addmanagertoschool($managerid, $schoolid, $shift);
header("location: schools.php");
}
}
if ($_SERVER['REQUEST_METHOD'] == "GET") {
if (isset($_GET['schoolid']) & isset($_GET['shift'])) {
$schoolid = $sec->escape($_GET['schoolid']);
$shift = $sec->escape($_GET['shift']);
$schoolresult = $school->getschoolbyid($schoolid);
if ($schoolresult->num_rows == 1) {
$schoolrow = $schoolresult->fetch_assoc();
$managerresult = $manager->getmanagers();
开发者ID:padratec,项目名称:school-last,代码行数:31,代码来源:setmanagers.php
示例10: manager
<?php
include "php/user.php";
include "php/manager.php";
$manager = new manager();
$login = new user();
$logincheck = $login->islogin();
if ($logincheck != 1) {
header("location: index.php");
}
if (isset($_GET['id'])) {
$manager->removemanager($_GET['id']);
header("location: managers.php");
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
</body>
</html>
开发者ID:padratec,项目名称:school-last,代码行数:25,代码来源:deletemanager.php
示例11: api_get_path
<?php
/* For licensing terms, see /license.txt */
/**
* @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
* @link www.phpletter.com
* @since 22/April/2007
*
*/
require_once '../../../../../../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH) . 'fckeditor/editor/plugins/ajaxfilemanager/inc/config.php';
if (!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path'])) {
include_once CLASS_MANAGER;
$manager = new manager($_GET['path'], false);
$fileTypes = $manager->getFileType(basename($_GET['path']));
if ($fileTypes['preview']) {
switch ($fileTypes['fileType']) {
case "image":
$imageInfo = @getimagesize($_GET['path']);
if (!empty($imageInfo[0]) && !empty($imageInfo[1])) {
$thumInfo = getThumbWidthHeight($imageInfo[0], $imageInfo[1], 400, 135);
printf("<img src=\"%s\" width=\"%s\" height=\"%s\" />", getFileUrl($_GET['path']), $thumInfo['width'], $thumInfo['height']);
} else {
echo PREVIEW_IMAGE_LOAD_FAILED;
}
break;
case "txt":
if ($fp = @fopen($_GET['path'], 'r')) {
echo @fread($fp, @filesize($_GET['path']));
@fclose($fp);
} else {
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:ajax_preview.php
示例12: __construct
/**
* Constructor
*
* @param manager $manager Trim tools manager object
*/
public function __construct(manager $manager)
{
$this->tools = $manager->get_tools();
}
开发者ID:VSEphpbb,项目名称:topicpreview,代码行数:9,代码来源:trim.php
示例13: getFolderInfo
/**
* get current or the specified dir information
*
* @param string $path
* @return array
*/
function getFolderInfo($path = null)
{
if (is_null($path)) {
return $this->currentFolderInfo;
} else {
$obj = new manager($path, false);
$obj->setSessionAction($this->sessionAction);
$obj->getFileList();
return $obj->getFolderInfo();
}
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:17,代码来源:class.manager.php
示例14: elseif
$error = SYS_DISABLED;
} elseif (empty($_POST['new_folder'])) {
$error = ERR_FOLDER_NAME_EMPTY;
} elseif (!preg_match("/^[a-zA-Z0-9_\\- ]+\$/", $_POST['new_folder'])) {
$error = ERR_FOLDER_FORMAT;
} else {
if (empty($_POST['currentFolderPath']) || !isUnderRoot($_POST['currentFolderPath'])) {
$error = ERR_FOLDER_PATH_NOT_ALLOWED;
} elseif (file_exists(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'])) {
$error = ERR_FOLDER_EXISTS;
} else {
include_once CLASS_FILE;
$file = new file();
if ($file->mkdir(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], 0775)) {
include_once CLASS_MANAGER;
$manager = new manager(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], false);
$pathInfo = $manager->getFolderInfo(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder']);
foreach ($pathInfo as $k => $v) {
switch ($k) {
case "ctime":
case "mtime":
case "atime":
$v = date(DATE_TIME_FORMAT, $v);
break;
case 'name':
$info .= sprintf(", %s:'%s'", 'short_name', shortenFileName($v));
break;
case 'cssClass':
$v = 'folderEmpty';
break;
}
开发者ID:bachnx92,项目名称:vemaybay,代码行数:31,代码来源:ajax_create_folder.php
示例15: basename
if(file_exists($doc) && isUnderRoot($doc) )
{
if( array_search(getRealPath($doc), $allDocs) === false || CONFIG_OVERWRITTEN)
{
if(CONFIG_OVERWRITTEN)
{
$file->delete($doc);
}
if($file->copyTo($doc, $_GET['current_folder_path']))
{
$finalPath = $destFolderPath . basename($doc);
$objFile = new file($finalPath);
$tem = $objFile->getFileInfo();
$obj = new manager($finalPath, false);
$fileType = $obj->getFileType($finalPath);
foreach($fileType as $k=>$v)
{
$tem[$k] = $v;
}
$tem['path'] = backslashToSlash($doc);
$tem['type'] = (is_dir($finalPath)?'folder':'file');
$tem['size'] = @transformFileSize($tem['size']);
$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
$tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']);
$tem['flag'] = 'noFlag';
$tem['url'] = getFileUrl($doc);
开发者ID:Ting-Article,项目名称:Interview,代码行数:31,代码来源:ajax_file_paste.php
示例16: testManyInsDel
function testManyInsDel()
{
$model = manager::loadModel(0);
//$logoot = new logootEngine($model);
$logoot = manager::getNewEngine($model);
$oldContent = "";
for ($i = 0; $i < 500; $i++) {
//500 inserts / 499 deletion
//insert X
$newContent = "{$i}";
$listOp1 = $logoot->generate($oldContent, $newContent);
if ($i == 0) {
//ins first line
$this->assertEquals(1, $listOp1->size());
} else {
$this->assertEquals(2, $listOp1->size());
}
$oldContent = $newContent;
}
$modelAssert = $logoot->getModel();
$this->assertEquals(3, count($modelAssert->getPositionlist()));
}
开发者ID:hala54,项目名称:DSMW,代码行数:22,代码来源:logootTest.php
示例17: say_hello
function say_hello()
{
return "I'm a programmer, dude";
}
}
$p = new programmer();
echo "verifying method override in subclass<br>\n";
echo "Result: " . ($p->say_hello() == "I'm a programmer, dude" ? 'pass' : 'fail') . "<br><br>\n\n";
}
function test2()
{
class manager extends person
{
var $mytype = 'manager';
}
$p = new manager();
echo "verifying variable override in subclass<br>\n";
echo "Result: " . ($p->say_hello() == "I am a manager" ? 'pass' : 'fail') . "<br><br>\n\n";
}
function test3()
{
class user extends person
{
function __construct()
{
$this->mytype = 'user';
}
}
$p = new user();
echo "verifying variable override in subclass constructor<br>\n";
echo "Result: " . ($p->say_hello() == "I am a user" ? 'pass' : 'fail') . "<br><br>\n\n";
开发者ID:rex786,项目名称:php2js,代码行数:31,代码来源:class_inheritance.php
示例18: testConcDelOpIntegration
function testConcDelOpIntegration()
{
$oldtext = "";
$conctext = "line1\nline2\nline3\nline4";
$model = manager::loadModel(0);
//$logoot = new logootEngine($model);
$logoot = manager::getNewEngine($model);
$listOp = $logoot->generate($oldtext, $conctext);
//$model has 4 lines created by 4 ins operations
$tmpMod = $logoot->getModel();
$this->assertEquals(6, count($tmpMod->getPositionlist()));
$this->assertEquals(6, count($tmpMod->getLinelist()));
$oldtext = "line1\nline2\nline3\nline4";
$actualtext = "line1\nline2\nline4";
$listOp1 = $logoot->generate($oldtext, $actualtext);
$tmpMod = $logoot->getModel();
$this->assertEquals(5, count($tmpMod->getPositionlist()));
$this->assertEquals(5, count($tmpMod->getLinelist()));
$logoot->integrate($listOp1);
$modelAssert = $logoot->getModel();
$this->assertEquals(5, count($modelAssert->getPositionlist()));
$this->assertEquals(5, count($modelAssert->getLinelist()));
}
开发者ID:hala54,项目名称:DSMW,代码行数:23,代码来源:logootTest1.php
示例19: doSearch
/**
* get the file according to the search keywords
*
*/
function doSearch($baseFolderPath = null)
{
$baseFolderPath = addTrailingSlash(backslashToSlash((is_null($baseFolderPath)?$this->rootFolder:$baseFolderPath)));
$dirHandler = @opendir($baseFolderPath);
if($dirHandler)
{
while(false !== ($file = readdir($dirHandler)))
{
if($file != '.' && $file != '..')
{
$path = $baseFolderPath . $file;
if(is_file($path))
{
$isValid = true;
$fileTime = @filemtime($path);
$fileSize = @filesize($path);
if($this->searchkeywords['name'] !== '' && @eregi($this->searchkeywords['name'], $file) === false)
{
$isValid = false;
}
if($this->searchkeywords['mtime_from'] != '' && $fileTime < @strtotime($this->searchkeywords['mtime_from']))
{
$isValid = false;
}
if($this->searchkeywords['mtime_to'] != '' && $fileTime > @strtotime($this->searchkeywords['mtime_to']))
{
$isValid = false;
}
if($this->searchkeywords['size_from'] != '' && $fileSize < @strtotime($this->searchkeywords['size_from']))
{
$isValid = false;
}
if($this->searchkeywords['size_to'] != '' && $fileSize > @strtotime($this->searchkeywords['size_to']))
{
$isValid = false;
}
if($isValid && isListingDocument($path))
{
$finalPath = $path;
$objFile = new file($finalPath);
$tem = $objFile->getFileInfo();
$obj = new manager($finalPath, false);
$obj->setSessionAction($this->sessionAction);
$selectedDocuments = $this->sessionAction->get();
$fileType = $obj->getFileType($finalPath);
foreach($fileType as $k=>$v)
{
$tem[$k] = $v;
}
$tem['path'] = backslashToSlash($finalPath);
$tem['type'] = (is_dir($finalPath)?'folder':'file');
/* $tem['size'] = transformFileSize($tem['size']);
$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
$tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']);*/
$tem['flag'] = (array_search($tem['path'], $selectedDocuments) !== false?($this->sessionAction->getAction() == "copy"?'copyFlag':'cutFlag'):'noFlag');
$tem['url'] = getFileUrl($tem['path']);
$this->rootFolderInfo['file']++;
$manager = null;
$this->files[] = $tem;
$tem = null;
}
}elseif(is_dir($path) && $this->searchkeywords['recursive'])
{
$this->Search($baseFolderPath);
}
}
}
}
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:79,代码来源:class.search.php
示例20: ini_set
ini_set('display_errors', '1');
//*/
//includes
require '../config.php';
require 'manager.php';
// check if action is set (read/write/delete)
// return error if not.
if (!isset($_POST['action'])) {
echo '{"error": 100, "message": "Action must be set."}';
die;
} else {
$arg_action = $_POST['action'];
}
// start the manager
// only one user for now. Use path prefix
$manager = new manager('admin', '../');
//## Write a note ##//
if ("write" == $arg_action) {
// create new note if no id is given
if (!isset($_POST['id']) || $_POST['id'] == '') {
$arg_id = $manager->generate_id();
} else {
$arg_id = $_POST['id'];
}
// title must not be empty -> space
if (!isset($_POST['title'])) {
$title = ' ';
} else {
$title = $_POST['title'];
}
if (!isset($_POST['text'])) {
开发者ID:jjjhrl,项目名称:WebNote,代码行数:31,代码来源:ajax.php
注:本文中的manager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论