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


PHP Validator::getBool方法代码示例

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


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

示例1: login

function login($userid, $userpw, $saveId = false) {
	global $database, $db, $service, $event;

	if (!((strlen($userpw) == 40) && preg_match('/[0-9a-f]/i', $userpw))) $forceRaw = true;		
	if (!isset($_SESSION['sslPublicKey']) && !$forceRaw) return false;
	if (Validator::getBool($forceRaw) === true) $userid = sha1($userid);
	
	$db->query('SELECT id, loginid, password, email FROM '.$database['prefix'].'Users WHERE SHA1(loginid)="'.$db->escape($userid).'"');
	if ($db->numRows() != 0) {
		list($uid, $loginid, $password, $email) = $db->fetchRow();
		$db->free();
		$input = array('loginid'=>$loginid, 'email'=>$email, 'saveId'=>$saveId);
		
		if ($password != getEncryptedPassword($loginid, $userpw))
			return false;

		authorizeSession($uid);
		@$db->query('UPDATE '.$database['prefix'].'Users SET lastLogin = UNIX_TIMESTAMP() WHERE loginid="'.$loginid.'"');
		if (!isset($saveId) || empty($saveId)) {
			setcookie('BLOGLOUNGE_LOGINID', '', time() - 31536000, $service['path'] . '/', '.'.$_SERVER['HTTP_HOST']);
		} else {
			setcookie('BLOGLOUNGE_LOGINID', $loginid, time() + 31536000, $service['path'] . '/', '.'.$_SERVER['HTTP_HOST']);
		}
		$event->on('Auth.login', $input);

		return true;
	} 
	return false;
}
开发者ID:ncloud,项目名称:bloglounge,代码行数:29,代码来源:auth.php

示例2: buildTagIndex

		function buildTagIndex($itemId, $tags, $oldtags = null, $firstDelete = true) {
			global $database, $db;
			if (!isset($tags) || !is_array($tags) || !isset($itemId) || !Validator::getBool($itemId))
				return false;
			
			$tagChunk = array();
			$tagInsertChunk = array();
			
			if($firstDelete) 
				@array_shift($tags); // first tag is category

			if (empty($tags)) return false;
			foreach ($tags as $tag) {
				if (!Validator::is_empty($tag)) {
					
					$tag = trim($tag);
					array_push($tagChunk, "'$tag'");
					array_push($tagInsertChunk, "('$tag')");
				}
			}
			$tagInsertStr = implode(',', $tagInsertChunk); // ('tag'),('tag')...
			$tagStr = implode(',', $tagChunk); // 'tag','tag',...

			$db->execute("INSERT IGNORE INTO {$database['prefix']}Tags (name) VALUES $tagInsertStr");

			$tagIdList = array();
			if (!$db->query("SELECT id FROM {$database['prefix']}Tags WHERE name IN ($tagStr)")) return false;
			while ($taglist = $db->fetchRow()) { 
					array_push($tagIdList, $taglist[0]); 
			}
			$db->free();

			$relationList = array();
			foreach ($tagIdList as $tagId) {
				array_push($relationList, "('$itemId', '$tagId', UNIX_TIMESTAMP())");
			}
			$relationStr = implode(',', $relationList); // ('itemId','tagId'),('itemId','tagId')...

			$db->execute("INSERT IGNORE INTO {$database['prefix']}TagRelations (item, tag, linked) VALUES $relationStr");

			if (!isset($oldtags) || empty($oldtags)) return true; // finish here if oldtags empty.

			$deletedTags = array_diff($oldtags, $tags);
			if (count($deletedTags) > 0) {
				$delTags = array();
				$dTagStr = '\'' . implode('\' , \'', $deletedTags) . '\'';
				if (!$db->query("SELECT id FROM {$database['prefix']}Tags WHERE name IN ($dTagStr)")) return false;
				while ($dlist = $db->fetchRow()) { 
					array_push($delTags, $dlist[0]); 
				}
				$db->free();
				$delTagStr = implode(', ', $delTags); // 삭제된 태그의 id 리스트

				$db->execute("DELETE FROM {$database['prefix']}TagRelations WHERE item='$itemId' AND type='feed' AND tag IN ($delTagStr)"); // TagRelation 삭제
			}
		}
开发者ID:ncloud,项目名称:bloglounge,代码行数:56,代码来源:Bloglounge.Data.Tags.php

示例3: scanner

function scanner($path, $node, $line)
{
    global $migrational, $items;
    switch ($path) {
        case '/blog':
            if (!preg_match('/^tattertools\\/1\\.[01]$/', @$node['.attributes']['type']) && !preg_match('/^textcube\\/1\\.[01]$/', @$node['.attributes']['type'])) {
                finish(_t('지원하지 않는 백업파일입니다.'));
            }
            $migrational = Validator::getBool(@$node['.attributes']['migrational']);
            return true;
        case '/blog/setting/banner/content':
        case '/blog/post/attachment/content':
        case '/blog/notice/attachment/content':
        case '/blog/keyword/attachment/content':
            if (!empty($node['.stream'])) {
                fclose($node['.stream']);
                unset($node['.stream']);
            }
            return true;
        case '/blog/setting':
        case '/blog/category':
        case '/blog/post':
        case '/blog/notice':
        case '/blog/keyword':
        case '/blog/link':
        case '/blog/logs/referer':
        case '/blog/statistics/referer':
        case '/blog/statistics/visits':
        case '/blog/statistics/daily':
        case '/blog/skin':
        case '/blog/plugin':
        case '/blog/commentNotified/comment':
        case '/blog/commentNotifiedSiteInfo/site':
        case '/blog/guestbook/comment':
        case '/blog/filter':
        case '/blog/feed':
        case '/blog/line':
            $items++;
            if (!strpos($path, 'referer')) {
                setProgress(null, _t('백업파일을 확인하고 있습니다.'), $line);
            }
            return true;
        case '/blog/personalization':
        case '/blog/userSetting':
            // skip
            return true;
    }
}
开发者ID:webhacking,项目名称:Textcube,代码行数:48,代码来源:index.php

示例4: array

	if (!$xmls->openFile(ROOT . '/exports/'.$programName.'/index.xml')) {
		func::alert(_t('프로그램 정보를 읽을 수 없습니다'), 'dialog');
	}

	$exportInfo = array();
	$exportInfo['domain'] = $domainName;
	$exportInfo['program'] = $programName;
	$exportInfo['title'] = $xmls->getValue('/export/information/name[lang()]');
	$exportInfo['config'] = $xmls->selectNode('/export/config[lang()]');
	$exportInfo['description'] = func::filterJavascript($xmls->getValue('/export/information/description[lang()]'));
	$exportInfo['license'] = func::filterJavascript($xmls->getValue('/export/information/license[lang()]'));
	$exportInfo['version'] = func::filterJavascript($xmls->getValue('/export/information/version'));
	$exportInfo['author'] = func::filterJavascript($xmls->getValue('/export/information/author[lang()]'));
	$exportInfo['email'] = func::filterJavascript($xmls->getAttribute('/export/information/author[lang()]', 'email'));
	$exportInfo['homepage'] = func::filterJavascript($xmls->getAttribute('/export/information/author[lang()]', 'link'));
	$exportInfo['status'] = Validator::getBool($db->queryCell("SELECT status FROM {$database['prefix']}Exports WHERE domain='{$domainName}'"));

	$exportInfo['tags'] = array();
	$sNode = $xmls->selectNode('/export/binding');
	if(isset($sNode['tag'])) {
		foreach($sNode['tag'] as $tag) {
			array_push($exportInfo['tags'], '[##_'.$tag['.attributes']['name'].'_##]');
		}
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $exportInfo['title'];?></title>
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $service['path'];?>/style/common.css" />
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:index.php

示例5: array

	$xmls = new XMLStruct;
	if (!$xmls->openFile(ROOT . '/plugins/'.$pluginName.'/index.xml')) {
		func::alert(_t('플러그인 정보를 읽을 수 없습니다'), 'dialog');
	}

	$pluginInfo = array();
	$pluginInfo['name'] = $pluginName;
	$pluginInfo['title'] = $xmls->getValue('/plugin/information/name[lang()]');
	$pluginInfo['config'] = $xmls->selectNode('/plugin/config[lang()]');
	$pluginInfo['description'] = func::filterJavascript($xmls->getValue('/plugin/information/description[lang()]'));
	$pluginInfo['license'] = func::filterJavascript($xmls->getValue('/plugin/information/license[lang()]'));
	$pluginInfo['version'] = func::filterJavascript($xmls->getValue('/plugin/information/version'));
	$pluginInfo['author'] = func::filterJavascript($xmls->getValue('/plugin/information/author[lang()]'));
	$pluginInfo['email'] = func::filterJavascript($xmls->getAttribute('/plugin/information/author[lang()]', 'email'));
	$pluginInfo['homepage'] = func::filterJavascript($xmls->getAttribute('/plugin/information/author[lang()]', 'link'));
	$pluginInfo['status'] = Validator::getBool($db->queryCell("SELECT status FROM {$database['prefix']}Plugins WHERE name='{$pluginName}'"));

	$pluginInfo['tags'] = array();
	$sNode = $xmls->selectNode('/plugin/binding');
	if(isset($sNode['tag'])) {
		foreach($sNode['tag'] as $tag) {
			array_push($pluginInfo['tags'], '[##_'.$tag['.attributes']['name'].'_##]');
		}
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $pluginInfo['title'];?></title>
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $service['path'];?>/style/common.css" />
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:index.php

示例6: htmlspecialchars

					if(!empty($logoFile)) {
						$s_logo = (!Validator::is_empty($logoFile)) ? $skin->parseTag('post_logo', $logoFile, $src_logo) : '';
						$sp_posts = $skin->dressOn('cond_logo', $src_logo, $s_logo, $sp_posts);		
						$sp_posts = $skin->parseTag('post_logo_exist', 'post_logo_exist', $sp_posts);
					} else {
						$sp_posts = $skin->dressOn('cond_logo', $src_logo, '', $sp_posts);
						$sp_posts = $skin->parseTag('post_logo_exist', 'post_logo_nonexistence', $sp_posts);
					}

					$sp_posts = $skin->parseTag('post_position', ($index==1?'firstItem':($index==$lastIndex?'lastItem':'')), $sp_posts);

					$sp_posts = $skin->parseTag('post_id', $item['id'], $sp_posts);
					
					$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$item['id'] : $service['path'].'/go/'.htmlspecialchars($item['permalink']);
					$sp_posts = $skin->parseTag('post_url',  $event->on('Text.postURL',(Validator::getBool($config->directView)?$service['path'].'/read/'.$item['id']:$link_url)), $sp_posts);	
					$sp_posts = $skin->parseTag('post_link_target',  (Validator::getBool($config->directView)?'_self':'_blank'), $sp_posts);					
					$sp_posts = $skin->parseTag('post_permalink',  htmlspecialchars($item['permalink']), $sp_posts);

					$sp_posts = $skin->parseTag('post_visibility', (($item['visibility'] == 'n' || $item['feedVisibility'] == 'n') ? 'hidden' : 'visible' ), $sp_posts);

					$sp_posts = $skin->parseTag('post_title', UTF8::clear($event->on('Text.postTitle', UTF8::lessen(func::stripHTML($item['title']), $skinConfig->postTitleLength))), $sp_posts);
					$sp_posts = $skin->parseTag('post_author', UTF8::clear($event->on('Text.postAuthor',$item['author'])), $sp_posts);

					list($post_category) = explode(',', UTF8::clear($item['tags']), 2);
					$sp_posts = $skin->parseTag('post_category', $post_category, $sp_posts);
					$sp_posts = $skin->parseTag('post_date', $event->on('Text.postDate',(Validator::is_digit($item['written']) ? date('Y-m-d h:i a', $item['written']) : $item['written'])), $sp_posts);
					$sp_posts = $skin->parseTag('post_view', $item['click'], $sp_posts);

					$post_description = func::stripHTML($item['description'].'>');
					if (substr($post_description, -1) == '>') $post_description = substr($post_description, 0, strlen($post_description) - 1);
					$post_description = UTF8::lessenAsByte(func::htmltrim($post_description), $skinConfig->postDescLength);
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:postlist.php

示例7: array

	include ROOT . '/lib/includeForAjax.php';

	requireStrictRoute();

	$response = array();
	$response['error'] = 0;
	$response['message'] = '';
	
	if (!isAdmin()) {
		$response['error'] = 1;
		$response['message'] = _t('관리자만이 이 기능을 사용할 수 있습니다.');
	} else {
		$response['error'] = 1;

		$pluginName = $_POST['plugin'];
		$ting = (isset($_POST['ting']) && !empty($_POST['ting'])) ? Validator::getBool($_POST['ting']) : null;

		if (!preg_match('/^[A-Za-z0-9 _-]+$/', $pluginName)) {
			$response['message'] = _t('잘못된 플러그인 이름입니다');
			func::printRespond($response);
		}

		if (!is_dir(ROOT . '/plugins/'.$pluginName)) {
			$response['message'] = _t('플러그인이 존재하지 않습니다');
			func::printRespond($response);
		}

		if (!file_exists(ROOT . '/plugins/'.$pluginName.'/index.xml')) {
			$response['message'] = _t('플러그인 정보를 찾을 수 없습니다');
			func::printRespond($response);
		}
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:activate.php

示例8:

				if (!isset($IV['userid']) || !isset($IV['userpw'])) {
					header("Location: {$path}/setup/?step=uninstall&error=10");
					exit;
				}

				if (!list($loginid, $password, $is_admin) = $db->pick("SELECT loginid, password, is_admin FROM {$database['prefix']}Users WHERE loginid='{$IV['userid']}'")) {
					header("Location: {$path}/setup/?step=uninstall&error=11");
					exit;
				}

				if ($password != Encrypt::hmac($IV['userid'], md5(md5($IV['userpw'])))) {
					header("Location: {$path}/setup/?step=uninstall&error=12");
					exit;
				}

				if (!Validator::getBool($is_admin)) {
					header("Location: {$path}/setup/?step=uninstall&error=13");
					exit;
				}

				$db->execute("DROP TABLE 
									{$database['prefix']}Booms,
									{$database['prefix']}Categories,
									{$database['prefix']}CategoryRelations,
									{$database['prefix']}DailyStatistics,
									{$database['prefix']}DeleteHistory,		
									{$database['prefix']}Exports,
									{$database['prefix']}FeedItems,
									{$database['prefix']}Feeds,	
									{$database['prefix']}Groups,
									{$database['prefix']}Medias,
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:setup.php

示例9: buildCategoryRelations

		function buildCategoryRelations($itemId, $tags, $oldtags = null) {		
			global $database, $db;
			if(empty($tags) || !isset($tags) || !isset($itemId) || !Validator::getBool($itemId))
				return false;
	
			$tagChunk = array();
			foreach ($tags as $tag) {
				if (!Validator::is_empty($tag)) {
					$tag = trim($tag);
					array_push($tagChunk, "'$tag'");
				}
			}	
			
			$tagString = implode(',', $tagChunk);
			if(!$db->query('SELECT id FROM '.$database['prefix'].'Tags WHERE name IN ('.$tagString.')')) return false;
	
			$tagIds = array();
			
			while($taglist = $db->fetchRow()) {
				array_push($tagIds, $taglist[0]);
			}
				
			if(!$db->query('SELECT item FROM '.$database['prefix'].'TagRelations WHERE tag IN ('. implode(',', $tagIds) .') AND (type = "category")')) return false;
			
			$categoryIds = array();	
			while ($categorylist = $db->fetchRow()) { 
				array_push($categoryIds, $categorylist[0]); 
			}
			$db->free();

			$relationList = array();	
			foreach ($categoryIds as $categoryId) {
				array_push($relationList, "('$itemId', '$categoryId', UNIX_TIMESTAMP(), 'n')");
			}
			$relationStr = implode(',', $relationList); // ('itemId','tagId'),('itemId','tagId')...

			$db->execute("INSERT IGNORE INTO {$database['prefix']}CategoryRelations (item, category, linked, custom) VALUES $relationStr");
		
			foreach($categoryIds as $categoryId) {
				Category::rebuildCount($categoryId);
			}
			
			if (!isset($oldtags) || empty($oldtags)) return true;

			$deletedTags = array_diff($oldtags, $tags);
			if (count($deletedTags) > 0) {
				$delTags = array();
				$dTagStr = '\'' . implode('\' , \'', $deletedTags) . '\'';
				if (!$db->query("SELECT id FROM {$database['prefix']}Tags WHERE name IN ($dTagStr)")) return false;
				while ($dlist = $db->fetchRow()) { 
					array_push($delTags, $dlist[0]); 
				}
				$db->free();
			
				$delTagStr = implode(', ', $delTags);
			
				if(!$db->query('SELECT item FROM '.$database['prefix'].'TagRelations WHERE tag IN ('.$delTagStr.') AND (type = "category")')) return false;
			
				$delCategories = array();
		
				while ($dlist = $db->fetchRow()) { 
					array_push($delCategories, $dlist[0]); 
				}

				$db->free();
			
				$delCategoryStr = implode(', ', $delCategories);
		
				$db->execute("DELETE FROM {$database['prefix']}CategoryRelations WHERE item='$itemId' AND category IN ($delCategoryStr)");
			
				foreach($delCategories as $categoryId) {
					Category::rebuildCount($categoryId);
				}
			}

		}
开发者ID:ncloud,项目名称:bloglounge,代码行数:76,代码来源:Bloglounge.Data.Category.php

示例10: array

			}
			
			$data = array();

			$data['class'] = ($read==$member['id']?' list_item_select':'');
			
			$data['datas'] = array();
			
			// 멤버 번호
			array_push($data['datas'], array('class'=>'member_number','data'=> $member['id'] ));

			// 멤버 가입일	
			array_push($data['datas'], array('class'=>'member_created','data'=> date('y.m.d H:i:s', $member['created']) ));
			
			// 멤버 아이디	
			array_push($data['datas'], array('class'=>'member_id','data'=> '<a href="'.$service['path'].'/admin/member/list/?read='.$member['id'].'">'.$member['loginid'].'</a>' . (!Validator::getBool($member['is_accepted'])?(' <span class="not_accept">('._t('미인증').')</span>'):'') ));
		
			// 멤버 별명
			array_push($data['datas'], array('class'=>'member_nickname','data'=> $member['name'] ));

			// 멤버 블로그
			ob_start();

			if($totalFeeds > 0) {
				if($totalFeeds == 1) {
?>
					<a href="<?php echo $service['path'];?>/admin/blog/list/?read=<?php echo $feeds[0]['id'];?>"><?php echo $feeds[0]['title'];?></a>
<?php
				} else {
?>
					<?php echo _f('"%1" 외 %2 개의 블로그', '<a href="'.$service['path'].'/admin/blog/list/?read='.$feeds[0]['id'].'">'.$feeds[0]['title'].'</a>', $totalFeeds-1);?>
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:index.php

示例11: getTitle

		function getTitle($item, $feedId, $feedItemId = null) {
			$title = array();
			$autoUpdate = array();
			$title['result'] = $item['title'];

			/*list($autoUpdate['feed'], $title['feed']) = Feed::gets($feedId, 'autoUpdate,title');
			$autoUpdate['feed'] = Validator::getBool($autoUpdate['feed']);

			if (!$autoUpdate['feed'] && !Validator::is_empty($title['feed']))
				$title['result'] = $title['feed'];*/ // 피드의 제목을 피드아이템 제목에 덮어 씌우는일이 없도록..

			if (isset($feedItemId) || ($feedItemId !== false)) { // update
				requireComponent('Bloglounge.Data.FeedItems');
				list($autoUpdate['item'], $title['item']) = FeedItem::gets($feedItemId, 'autoUpdate,title');
				$autoUpdate['item'] = Validator::getBool($autoUpdate['item']);

				if (!$autoUpdate['item'] && !Validator::is_empty($title['item']))
					$title['result'] = $title['item'];
			}

			return $title['result'];
		}
开发者ID:ncloud,项目名称:bloglounge,代码行数:22,代码来源:LZ.PHP.Feeder.php

示例12: cacheThumbnail

		function cacheThumbnail($itemId, $item) {
			global $database, $db;
			if (!isset($item) || !is_array($item) || !defined('ROOT') || !isset($itemId) || !Validator::getBool($itemId))
				return false;

			$cacheDir = ROOT. '/cache/thumbnail';
			if (!is_dir($cacheDir)) func::mkpath($cacheDir);
			if (!is_writeable($cacheDir)) return false;

			$division = ord(substr(str_replace("http://","",$item['permalink']), 0, 1));

			requireComponent('LZ.PHP.Media');
			$media = new Media;
			$media->set('outputPath', $cacheDir.'/'.$division);

			$item['id'] = $itemId; // for uniqueId

			list($thumbnailLimit, $thumbnailSize, $thumbnailType) = Settings::gets('thumbnailLimit, thumbnailSize, thumbnailType');
			if($thumbnailLimit == 0) return false;

			if (!$result = $media->get($item, $thumbnailSize, $thumbnailLimit, $thumbnailType))
				return false;

			foreach($result['movies'] as $m_item) {
				$tFilename = $db->escape(str_replace($cacheDir, '', $m_item['filename']['fullpath']));
				$tSource = $db->escape($m_item['source']);

				if(!empty($tFilename)) {
					$width = $m_item['width'];
					$height = $m_item['height'];
					$via = $m_item['via'];					
					$insertId = $media->add($itemId, $tFilename, $tSource, $width, $height, 'movie', $via);
				}
			}

			foreach($result['images'] as $i_item) {
				$tFilename = $db->escape(str_replace($cacheDir, '', $i_item['filename']['fullpath']));
				$tSource = $db->escape($i_item['source']);

				if(!empty($tFilename) && $i_item['width'] > 100 && $i_item['height'] > 100) {
					$width = $i_item['width'];
					$height = $i_item['height'];
					$insertId = $media->add($itemId, $tFilename, $tSource, $width, $height, 'image');
				}
			}
	
			if(isset($insertId)) {
				$db->execute("UPDATE {$database['prefix']}FeedItems SET thumbnailId='$insertId' WHERE id='$itemId'");
			}

			return true;
		}
开发者ID:ncloud,项目名称:bloglounge,代码行数:52,代码来源:Bloglounge.Data.FeedItems.php

示例13: getList

		function getList($id) {
			global $database, $db;

			if (!isset($id) || !Validator::getBool($id))
				return false;

			$result = $db->queryAll("SELECT t.name FROM {$database['prefix']}TagRelations tr LEFT JOIN {$database['prefix']}Tags t ON (t.id = tr.tag) LEFT JOIN {$database['prefix']}FeedItems fi ON (fi.id = tr.item) LEFT JOIN {$database['prefix']}Feeds f ON (f.id = fi.feed) WHERE tr.type = 'group_category' and f.group = $id GROUP BY t.id");

			return $result;
		}
开发者ID:ncloud,项目名称:bloglounge,代码行数:10,代码来源:Bloglounge.Data.Groups.php

示例14: if

<?php
			if($is_admin) {
?>
					<p class="checkbox_wrap">
						<input type="checkbox" name="isFocus" id="isFocus" <?php if (Validator::getBool($readFeedItem['focus'])) { ?>checked="checked"<?php } ?> /> <label for="isFocus"><?php echo _t('이 글을 포커스로 설정합니다.');?></label>
						<div class="help checkbox_help"><?php echo _t('현재 글을 포커스로 사용하시려면 선택하세요.');?></div>
					</p>
<?php
			}
?>
					<p class="checkbox_wrap">
						<input type="checkbox" name="autoUpdate" id="autoUpdate" <?php if (Validator::getBool($readFeedItem['autoUpdate'])) { ?>checked="checked"<?php } ?> /> <label for="autoUpdate"><?php echo _t('피드 정보로부터 제목, 글쓴이 이름을 자동으로 업데이트 합니다.');?></label>
						<div class="help checkbox_help"><?php echo _t('글 제목이나 글쓴이 이름을 고정하고 싶은 경우 이 기능을 해제하세요');?></div>
					</p>
					<p class="checkbox_wrap">
						<input type="checkbox" name="allowRedistribute" id="allowRedistribute" <?php if (Validator::getBool($readFeedItem['allowRedistribute'])) { ?>checked="checked"<?php } ?> /> <label for="allowRedistribute"><?php echo _t('이 글의 RSS 재출력과 외부 검색 노출을 허용합니다.');?></label>
						<div class="help checkbox_help"><?php echo _t('RSS 출력, 외부 검색엔진 수집등의 기능에 이 글의 정보가 포함됩니다');?></div>
					</p>
					
					<br />

					<div class="grayline"></div>

					<p class="button_wrap">
						<span class="normalbutton"><input type="submit" value="<?php echo _t('수정완료');?>" /></span>
						<a href="#" class="normalbutton" onclick="deleteItem(<?php echo $readFeedItem['id'];?>); return false;"><span><?php echo _t('삭제');?></span></a>
					</p>
				</form>
			</div>
		<?php echo drawAdminBoxEnd();?>
	</div>
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:index.php

示例15: array

<?php

/// Copyright (c) 2004-2015, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('POST' => array('confirmativePassword' => array('string', 'mandatory' => false), 'removeAttachments' => array(array('0', '1'), 'dafault' => null)));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
if (empty($_POST['confirmativePassword']) || !User::confirmPassword(User::getBlogOwner(getBlogId()), $_POST['confirmativePassword'])) {
    Respond::ResultPage(1);
}
DataMaintenance::removeAll(Validator::getBool(@$_POST['removeAttachments']));
CacheControl::flushAll();
Respond::ResultPage(0);
开发者ID:Avantians,项目名称:Textcube,代码行数:14,代码来源:index.php


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