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


PHP ents函数代码示例

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


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


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