• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP ents函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ents函数的典型用法代码示例。如果您正苦于以下问题:PHP ents函数的具体用法?PHP ents怎么用?PHP ents使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: printView

    function printView()
    {
        ?>
		<form method="post" class="form-horizontal">
			<input type="hidden" name="new_note_submitted" value="1" />
			<input type="hidden" name="familyid" value="<?php 
        echo ents($_REQUEST['familyid']);
        ?>
" />
			<h3><?php 
        echo _('New Note Details');
        ?>
</h3>
			<?php 
        $this->_note->printForm();
        ?>
			<div class="controls">
				<button type="submit" class="btn"><?php 
        _('Add Note to Family');
        ?>
</button>
				<a class="btn" href="<?php 
        echo build_url(array('view' => 'families', 'familyid' => $this->_family->id));
        ?>
">Cancel</a>
		</form>
		<?php 
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:28,代码来源:view_0_add_note_to_family.class.php


示例2: printView

    function printView()
    {
        if ($this->_roster_view) {
            $this->_roster_view->printView(NULL, NULL, FALSE, TRUE);
        } else {
            ?>
			<ul>
			<?php 
            $views = $GLOBALS['system']->getDBObjectData('roster_view', array('is_public' => TRUE), 'AND', 'name');
            foreach ($views as $id => $detail) {
                ?>
				<li><a href="<?php 
                echo build_url(array('roster_view' => $id));
                ?>
"><?php 
                echo ents($detail['name']);
                ?>
</a></li>
				<?php 
            }
            ?>
			</ul>
			<?php 
        }
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:25,代码来源:view_3_rosters.class.php.php


示例3: printView

    function printView()
    {
        $GLOBALS['system']->includeDBClass('person');
        $stats = Person::getStatusStats();
        ?>
		<table class="table table-auto table-striped table-bordered">
		<?php 
        foreach ($stats as $status_name => $count) {
            ?>
			<tr>
				<th><?php 
            echo ents($status_name);
            ?>
</th>
				<td><?php 
            echo (int) $count;
            ?>
</td>
			</tr>
			<?php 
        }
        ?>
		</table>
		<?php 
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:25,代码来源:view_3_persons__4_statistics.class.php


示例4: printView

    function printView()
    {
        if ($this->_roster_view) {
            $end_date = NULL;
            if (!empty($_REQUEST['weeks'])) {
                $end_date = date('Y-m-d', strtotime('+' . ((int) $_REQUEST['weeks'] * 7 + 1) . ' days'));
            }
            $this->_roster_view->printView(NULL, $end_date, FALSE, TRUE);
        } else {
            ?>
			<ul>
			<?php 
            $views = $GLOBALS['system']->getDBObjectData('roster_view', array('is_public' => TRUE), 'AND', 'name');
            foreach ($views as $id => $detail) {
                ?>
				<li><a href="<?php 
                echo build_url(array('roster_view' => $id));
                ?>
"><?php 
                echo ents($detail['name']);
                ?>
</a></li>
				<?php 
            }
            ?>
			</ul>
			<?php 
        }
    }
开发者ID:howardgrigg,项目名称:jethro-pmm,代码行数:29,代码来源:view_2_display_roster.class.php


示例5: run

    function run()
    {
        $results = array();
        if (!empty($_REQUEST['search'])) {
            $name = $_REQUEST['search'];
            $results = $GLOBALS['system']->getDBObjectData('family', array('family_name' => '%' . $_REQUEST['search'] . '%'));
            header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
            // Date in the past
            header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
            // always modified
            header("Cache-Control: no-cache, must-revalidate");
            // HTTP/1.1
            header("Pragma: no-cache");
            // HTTP/1.0
            //header ("Content-Type: application/json");
            echo "{\"results\": [";
            $arr = array();
            $GLOBALS['system']->includeDBClass('family');
            foreach ($results as $i => $details) {
                $arr[] = '
					{
						id: ' . $i . ',
						value: "' . addcslashes(ents($details['family_name']), '"') . '",
						info: "' . addcslashes(ents($details['members']), '"') . '"
					}
				';
            }
            echo implode(", ", $arr);
            echo "]}";
        }
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:31,代码来源:call_find_family_json.class.php


示例6: printView

    function printView()
    {
        ?>
		<form method="post" id="add-family">
			<input type="hidden" name="new_person_submitted" value="1" />
			<input type="hidden" name="familyid" value="<?php 
        echo ents($_REQUEST['familyid']);
        ?>
" />
			<h3>New Person Details</h3>
			<?php 
        $this->_person->printForm();
        if ($chooser = Action_Plan::getMultiChooser('execute_plan', 'add_person')) {
            ?>
				<h3>Action Plans</h3>
				<p>Execute the following action plans for the new person:</p>
				<?php 
            echo $chooser;
            ?>
				<p>Reference date for plans: <?php 
            print_widget('plan_reference_date', array('type' => 'date'), NULL);
            ?>
</p>
				<?php 
        }
        ?>
			<button type="submit" class="btn">Add Family Member</button>
			<a href="<?php 
        echo build_url(array('view' => 'families'));
        ?>
" class="btn">Cancel</a>
		</form>
		<?php 
    }
开发者ID:howardgrigg,项目名称:jethro-pmm,代码行数:34,代码来源:view_0_add_person_to_family.class.php


示例7: printView

    function printView()
    {
        if ($this->_roster_view) {
            $end_date = NULL;
            if (!empty($_REQUEST['weeks'])) {
                $end_date = date('Y-m-d', strtotime('+' . ((int) $_REQUEST['weeks'] * 7 + 1) . ' days'));
            }
            $this->_roster_view->printView(NULL, $end_date, FALSE, TRUE);
        } else {
            if (defined('PUBLIC_ROSTER_SECRET') && strlen(PUBLIC_ROSTER_SECRET) && array_get($_REQUEST, 'secret') != PUBLIC_ROSTER_SECRET) {
                print_message("Please contact your church administrator to get the private URLs for viewing rosters");
                exit;
            } else {
                ?>
			<ul>
			<?php 
                $views = $GLOBALS['system']->getDBObjectData('roster_view', array('is_public' => TRUE), 'AND', 'name');
                foreach ($views as $id => $detail) {
                    ?>
				<li><a href="<?php 
                    echo build_url(array('roster_view' => $id));
                    ?>
"><?php 
                    echo ents($detail['name']);
                    ?>
</a></li>
				<?php 
                }
                ?>
			</ul>
			<?php 
            }
        }
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:34,代码来源:view_2_display_roster.class.php


示例8: _printResults

    function _printResults()
    {
        if (empty($this->_congregations)) {
            return;
        }
        $GLOBALS['system']->includeDBClass('attendance_record_set');
        $stats = Attendance_Record_Set::getCongregationalAttendanceStats($this->_start_date, $this->_end_date, $this->_congregations);
        $GLOBALS['system']->includeDBClass('person');
        $dummy_person = new Person();
        $status_map = $dummy_person->getStatusOptions();
        ?>

		<table class="table table-bordered table-auto-width">

		<?php 
        foreach ($status_map as $k => $v) {
            if (isset($stats[$k])) {
                ?>
				<tr>
					<th><?php 
                echo ents($v);
                ?>
</th>
					<td style="width: 5ex"><?php 
                echo $stats[$k];
                ?>
%</td>
				</tr>
				<?php 
            }
        }
        ?>
		</table>
		<?php 
    }
开发者ID:samrae,项目名称:jethro-pmm,代码行数:35,代码来源:view_6_attendance__3_statistics.class.php


示例9: run

    /**
     * Execute this call
     *
     * @return void
     * @access public
     */
    function run()
    {
        $service = $GLOBALS['system']->getDBObject('service', (int) $_REQUEST['serviceid']);
        ?>
		<html>
			<head>
				<style media="print">
					html body * {
						color: black;
						text-decoration: none;
					}
				</style>
				<style>
					* {
						font-family: sans-serif;
					}
					td, th {
						padding: 5px 10px;
						vertical-align: top;
					}
					th {
						background-color: #555;
						color: white;
					}
					th * {
						color: white !important;
					}
					table {
						border-collapse: collapse;
					}
					h3 {
						text-transform: uppercase;
						text-align: center;
						color: #888;
					}
					small {
						font-style: italic;
					}
					p, small {
						margin: 10px 0;
					}
					h4 {
						margin: 20px 0 10px 0;
					}
				</style>
			</head>
			<body>
				<h1><?php 
        echo ents($service->toString());
        ?>
</h1>
				<?php 
        $service->printServiceContent();
        ?>
			</body>
		</html>
		<?php 
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:64,代码来源:call_service_content.class.php


示例10: _printCategories

    function _printCategories($parent = 0, $indent = 0)
    {
        $this_level = array();
        foreach ($this->_all_categories as $id => $details) {
            if ($details['parent_category'] == $parent) {
                $this_level[$id] = $details;
            }
        }
        if (!empty($this_level)) {
            foreach ($this_level as $id => $details) {
                ?>
				<tr>
					<td style="padding-left: <?php 
                echo 10 + $indent * 30;
                ?>
px"><a href="?view=groups__list_all#cat<?php 
                echo $id;
                ?>
"><?php 
                echo ents($details['name']);
                ?>
</a></td>
					<td class="action-cell narrow">
						<form class="min" style="clear: both" method="post" onsubmit="return confirm('<?php 
                echo _('Are you sure you want to delete this category?');
                ?>
')">
							<a href="?view=_edit_group_category&categoryid=<?php 
                echo (int) $id;
                ?>
"><i class="icon-wrench"></i><?php 
                echo _('Edit');
                ?>
</a>
							<input type="hidden" name="delete_category_id" value="<?php 
                echo $id;
                ?>
" />
							<button type="submit" class="btn-link"><i class="icon-trash"></i><?php 
                echo _('Delete');
                ?>
</button>
						</form>
					</td>
				</tr>
				<?php 
                $this->_printCategories($id, $indent + 1);
            }
        }
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:50,代码来源:view_5_groups__4_manage_categories.class.php


示例11: printView

    function printView()
    {
        if ($this->_role) {
            echo $this->_role->getValue('details');
        } else {
            foreach ($GLOBALS['system']->getDBObjectdata('congregation', array('!meeting_time' => ''), 'AND', 'meeting_time') as $congid => $cong_details) {
                ?>
				<h3><?php 
                echo ents($cong_details['name']);
                ?>
</h3>
				<ul>
				<?php 
                $roles = $GLOBALS['system']->getDBObjectData('roster_role', array('!details' => '', 'congregationid' => $congid), 'AND', 'title');
                foreach ($roles as $id => $detail) {
                    ?>
					<li><a href="<?php 
                    echo build_url(array('role' => $id));
                    ?>
"><?php 
                    echo ents($detail['title']);
                    ?>
</a></li>
					<?php 
                }
                ?>
				</ul>
			<?php 
            }
            ?>
		<h3>Non-Congregational</h3>
                <ul>
                        <?php 
            $roles = $GLOBALS['system']->getDBObjectData('roster_role', array('!details' => '', 'congregationid' => 0), 'AND', 'title');
            foreach ($roles as $id => $detail) {
                ?>
                                <li><a href="<?php 
                echo build_url(array('role' => $id));
                ?>
"><?php 
                echo ents($detail['title']);
                ?>
</a></li>
                                <?php 
            }
            ?>
                </ul>
		<?php 
        }
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:50,代码来源:view_3_display_role_description.class.php


示例12: printView

    function printView()
    {
        ?>
		<div class="container row-fluid margin-bottom">
			<div class="span10">
				<p><i>A roster view is a collection of roster roles, used when setting or displaying roster assignments.<br />You might like to create views such as "morning congregation" or "all preachers".<br />A roster role can belong to several roster views.</i></p>
			</div>
			<div class="span2 align-right">
				<a href="?view=_add_roster_view"><i class="icon-plus-sign"></i>Add View</a>
			</div>
		</div>
		<table class="table">
			<thead>
				<tr>
					<th class="nowrap">View name</th>
					<th>Roles</th>
					<th>&nbsp;</th>
				</tr>
			</thead>
		<?php 
        $views = $GLOBALS['system']->getDBObjectData('roster_view', array(), 'OR', 'name');
        foreach ($views as $id => $details) {
            ?>
			<tr>
				<td class="nowrap"><?php 
            echo ents($details['name']);
            ?>
</td>
				<td><?php 
            echo ents($details['members']);
            ?>
</td>
				<td class="nowrap">
					<a href="?view=_edit_roster_view&roster_viewid=<?php 
            echo $id;
            ?>
"><i class="icon-wrench"></i>Edit</a> &nbsp;
					<a href="<?php 
            echo build_url(array('delete_viewid' => $id));
            ?>
"><i class="icon-trash"></i>Delete</a>
				</td>
			</tr>
			<?php 
        }
        ?>
		</table>
	<?php 
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:49,代码来源:view_7_rosters__4_define_roster_views.class.php


示例13: run

 public function run()
 {
     if (!empty($_REQUEST['call'])) {
         $call_name = str_replace('/', '', $_REQUEST['call']);
         // Try both the Jethro and system_root calls folders
         $filename = dirname(dirname(__FILE__)) . '/calls/call_' . $call_name . '.class.php';
         if (!file_exists($filename)) {
             $filename = $this->_base_dir . '/calls/call_' . $call_name . '.class.php';
         }
         if (file_exists($filename)) {
             include_once dirname(__FILE__) . '/call.class.php';
             include_once $filename;
             $classname = 'Call_' . $call_name;
             $call_obj = new $classname();
             $call_obj->run();
         } else {
             trigger_error('Unknown call ' . ents($_REQUEST['call']), E_USER_WARNING);
         }
     } else {
         $this->initErrorHandler();
         $raw_view_name = array_get($_REQUEST, 'view', 'home');
         $bits = explode('__', $raw_view_name);
         $view_filename = null;
         if (count($bits) > 1) {
             if (!empty($_SESSION['views'][$this->_base_dir][$bits[0]]['children'][$bits[1]])) {
                 $view_filename = $_SESSION['views'][$this->_base_dir][$bits[0]]['children'][$bits[1]]['filename'];
                 $view_classname = 'View_' . $bits[0] . '__' . $bits[1];
             }
         } else {
             if (isset($_SESSION['views'][$this->_base_dir][$bits[0]])) {
                 $view_filename = $_SESSION['views'][$this->_base_dir][$bits[0]]['filename'];
                 $view_classname = 'View_' . $bits[0];
             }
         }
         if (!is_null($view_filename)) {
             require_once $this->_base_dir . '/views/' . $view_filename;
             $view_perm = call_user_func(array($view_classname, 'getMenuPermissionLevel'));
             if (!empty($view_perm) && !$GLOBALS['user_system']->havePerm($view_perm)) {
                 trigger_error("You don't have permission to access this view", E_USER_ERROR);
                 // exits
             }
             $this->_view = new $view_classname();
             $this->_view->processView();
         }
         require $this->_base_dir . '/templates/main.template.php';
         restore_error_handler();
     }
 }
开发者ID:samrae,项目名称:jethro-pmm,代码行数:48,代码来源:system_controller.class.php


示例14: printView

    function printView()
    {
        $GLOBALS['system']->includeDBClass('person');
        $types = Person::getDateTypes();
        if (empty($types)) {
            ?>
			<p><i>No date types have been set up in the system yet.</i></p>
			<?php 
        }
        $types += array('' => '');
        ?>
		<form method="post">
		<table class="expandable valign-middle">
			<thead>
			</thead>
			<tbody>
			<?php 
        $i = 0;
        foreach ($types as $id => $name) {
            ?>
				<tr>
					<td><?php 
            echo $id;
            ?>
</td>
					<td>
						<input name="datetypename[<?php 
            echo $id ? $id : '_new_][';
            ?>
]" value="<?php 
            echo ents($name);
            ?>
" />
					</td>
					<td>
						<i class="icon-trash clickable delete-row"></i>
					</td>
				</tr>
				<?php 
            $i++;
        }
        ?>
			</tbody>
		</table>
		<input type="submit" class="btn" value="Save" />
		</form>
		<?php 
    }
开发者ID:samrae,项目名称:jethro-pmm,代码行数:48,代码来源:view_10_admin__3_date_types.class.php


示例15: run

    function run()
    {
        $GLOBALS['system']->initErrorHandler();
        $template = $GLOBALS['system']->getDBObject('note_template', (int) $_REQUEST['templateid']);
        if ($template) {
            $template->printNoteFieldWidgets();
            ?>
			<script>
				$('input[name=subject]').val("<?php 
            echo ents($template->getValue('subject'));
            ?>
");
			</script>
			<?php 
        }
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:16,代码来源:call_note_template_widgets.class.php


示例16: printView

    function printView()
    {
        $tags = $GLOBALS['system']->getDBObjectData('service_component_tag');
        if (empty($tags)) {
            ?>
			<p><i>No tags have been set up in the system yet.</i></p>
			<?php 
        }
        $tags += array('' => array('tag' => ''));
        ?>
		<form method="post">
		<table class="expandable valign-middle">
			<thead>
			</thead>
			<tbody>
			<?php 
        $i = 0;
        foreach ($tags as $id => $tagdata) {
            ?>
				<tr>
					<td><?php 
            echo $id;
            ?>
</td>
					<td>
						<input name="tagname[<?php 
            echo $id ? $id : '_new_][';
            ?>
]" value="<?php 
            echo ents($tagdata['tag']);
            ?>
" />
					</td>
					<td>
						<i class="icon-trash clickable delete-row"></i>
					</td>
				</tr>
				<?php 
            $i++;
        }
        ?>
			</tbody>
		</table>
		<input type="submit" class="btn" value="Save" />
		</form>
		<?php 
    }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:47,代码来源:view_0_manage_service_component_tags.class.php


示例17: run

    /**
     * Execute this call
     *
     * @return void
     * @access public
     */
    function run()
    {
        $service = $GLOBALS['system']->getDBObject('service', (int) $_REQUEST['serviceid']);
        ?>
		<html>
			<head>
				<style media="print">
					html body * {
						color: black;
						text-decoration: none;
					}
				</style>
				<style>
					* {
						font-family: sans-serif;
					}
					td, th {
						padding: 5px 10px;
						vertical-align: top;
					}
					th {
						background-color: #555;
						color: white;
					}
					th * {
						color: white !important;
					}
					table {
						border-collapse: collapse;
					}
				</style>
			</head>
			<body>
				<h1><?php 
        echo ents($service->toString());
        ?>
</h1>
				<?php 
        $service->printServicePlan();
        ?>
			</body>
		</html>
		<?php 
    }
开发者ID:samrae,项目名称:jethro-pmm,代码行数:50,代码来源:call_service_plan.class.php


示例18: printView

    public function printView()
    {
        $buttons = array('delete' => 'Delete altogether', 'archiveclean' => 'Archive and Clean');
        if ($this->_staff_member) {
            ?>
			<p>This person has a user account and cannot be deleted altogether.</p>
			<p>You can archive and clean this person, which will</p>
			<?php 
            echo self::EXPLANATION;
            unset($buttons['delete']);
        } else {
            if ($this->_person->hasRosterAssignments() || $this->_person->hasAttendance()) {
                ?>
			<p>Deleting this person is not recommended since they have roster assignments and/or attendance records, and deleting them will affect historical statistics.</p>
			<p>It is recommended that you archive and clean the person, which will</p>
			<?php 
                echo self::EXPLANATION;
                $buttons['delete'] = 'Delete anyway';
            }
        }
        ?>
		<form method="post">
			<input type="hidden" name="personid" value="<?php 
        echo (int) $this->_person->id;
        ?>
" />
		<?php 
        foreach ($buttons as $key => $label) {
            ?>
			<input type="button" class="btn" name="confirm_<?php 
            echo $key;
            ?>
" value="<?php 
            echo ents($label);
            ?>
" />
			<?php 
        }
        ?>
		</form>
		<?php 
    }
开发者ID:howardgrigg,项目名称:jethro-pmm,代码行数:42,代码来源:view_0_delete_person.class.php


示例19: printView

    function printView()
    {
        if (!$this->canEdit()) {
            print_message("Sorry, only adults are able to edit this family.", 'error');
            return;
        }
        $ok = $this->family->acquireLock();
        foreach ($this->persons as $p) {
            $ok = $ok && $p->acquireLock();
        }
        if (!$ok) {
            print_message("Your family cannot be edited right now.  Please try later", 'error');
        } else {
            if (defined('MEMBER_REGO_HELP_EMAIL')) {
                ?>
				<p><i>If you need to change names or other details which are not listed in this form, please contact  <a href="mailto:<?php 
                echo ents(MEMBER_REGO_HELP_EMAIL);
                ?>
"><?php 
                echo ents(MEMBER_REGO_HELP_EMAIL);
                ?>
</a>.</i></p>
				<?php 
            }
            ?>
			<form method="post">
			<h3>Family Details</h3>
			<?php 
            $this->family->printForm('family', array('address_street', 'address_suburb', 'address_postcode', 'home_tel'));
            foreach ($this->persons as $person) {
                echo '<h3>' . $person->getValue('first_name') . ' ' . $person->getValue('last_name') . '</h3>';
                $person->printForm('person_' . $person->id, array('gender', 'age_bracket', 'email', 'mobile_tel', 'work_tel'));
            }
            ?>
			<button class="btn" type="submit">Save</button>
			<a class="btn" href="?">Cancel</a>
			</form>
			<?php 
        }
    }
开发者ID:brightmore,项目名称:jethro-pmm,代码行数:40,代码来源:view_0_edit_me.class.php


示例20: _printChooserOptions

    static function _printChooserOptions($all_cats, $value, $parent = 0, $indent = '')
    {
        foreach ($all_cats as $id => $cat) {
            if ($cat['parent_category'] != $parent) {
                continue;
            }
            $sel = $id == $value ? ' selected="selected"' : '';
            ?>
			<option value="<?php 
            echo $id;
            ?>
"<?php 
            echo $sel;
            ?>
><?php 
            echo $indent . ents($cat['name']);
            ?>
</option>
			<?php 
            self::_printChooserOptions($all_cats, $value, $id, $indent . '&nbsp;&nbsp;&nbsp;&nbsp;');
        }
    }
开发者ID:samrae,项目名称:jethro-pmm,代码行数:22,代码来源:person_group_category.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP enum_bug_group函数代码示例发布时间:2022-05-15
下一篇:
PHP entre1y2函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap