本文整理汇总了PHP中PoTable::findAll方法的典型用法代码示例。如果您正苦于以下问题:PHP PoTable::findAll方法的具体用法?PHP PoTable::findAll怎么用?PHP PoTable::findAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PoTable
的用法示例。
在下文中一共展示了PoTable::findAll方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switch
?>
</li>
</ul>
<?php
switch ($_GET[act]) {
default:
?>
<div class="block full">
<div class="block-title"><h2><?php
echo $langcomponent1;
?>
</h2></div>
<div class="table-responsive">
<?php
$tablecomponent = new PoTable('component');
$components = $tablecomponent->findAll(id_component, DESC);
echo "<table cellpadding='0' cellspacing='0' border='0' class='table table-vcenter table-condensed table-bordered' id='table-datatable'>\r\n\t\t\t\t<thead><tr>\r\n\t\t\t\t\t<th>Id Data</th>\r\n\t\t\t\t\t<th>{$langcomponent3}</th>\r\n\t\t\t\t\t<th>{$langcomponent4}</th>\r\n\t\t\t\t\t<th>{$langcomponent5}</th>\r\n\t\t\t\t\t<th>{$langcomponent6}</th>\r\n\t\t\t\t</tr></thead><tbody>";
$no = 1;
$tableroleaccess = new PoTable('user_role');
$currentRoleAccess = $tableroleaccess->findByAnd(id_level, $_SESSION['leveluser'], module, 'component');
$currentRoleAccess = $currentRoleAccess->current();
foreach ($components as $component) {
$pecahurl = explode("-", $component->component);
$url = $pecahurl[1];
if ($currentRoleAccess->delete_access == "Y") {
$tbldelete = "<a class='btn btn-xs btn-danger alertdel' id='{$component->id_component}' data-toggle='tooltip' title='{$langaction2}'><i class='fa fa-times'></i></a>";
}
echo "<tr>\r\n\t\t\t\t\t\t<td>{$component->id_component}</td>\r\n\t\t\t\t\t\t<td>{$component->component}</td>\r\n\t\t\t\t\t\t<td>{$component->date}</td>\r\n\t\t\t\t\t\t<td>{$component->table_name}</td>\r\n\t\t\t\t\t\t<td class='text-center'>\r\n\t\t\t\t\t\t\t<div class='btn-group btn-group-xs'>\r\n\t\t\t\t\t\t\t\t<a href='admin.php?mod={$url}' class='btn btn-xs btn-default' data-toggle='tooltip' title='{$langaction3}'><i class='fa fa-pencil-square-o'></i></a>\r\n\t\t\t\t\t\t\t\t<a href='?mod=component&act=importtable&id={$component->id_component}' class='btn btn-xs btn-default' data-toggle='tooltip' title='{$langaction4}'><i class='fa fa-sign-out'></i></a>\r\n\t\t\t\t\t\t\t\t{$tbldelete}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>";
$no++;
}
echo "</tbody></table>";
示例2: PoTable
" href="javascript:void(0);"><?php
echo $currentDetail->nama_lengkap;
?>
</a></h5>
<h6>EDITOR</h6>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row page_margin_top">
<ul class="taxonomies tags left clearfix">
<?php
$tabletag = new PoTable('tag');
$tags = $tabletag->findAll(id_tag, DESC);
$arrtags = explode(',', $currentDetail->tag);
foreach ($tags as $tag) {
$cek = array_search($tag->tag_seo, $arrtags) != false ? '' : 'display:none;';
echo "<li style='{$cek}'><a href='{$website_url}/search-result/{$tag->tag_title}' title='{$tag->tag_title}'>{$tag->tag_title}</a></li>";
}
?>
</ul>
</div>
<?php
$tablerelated = new PoTable('post');
$tablerelateds = $tablerelated->findRelatedPost($currentDetail->tag, $idpost, id_post, "DESC", "5");
if (count($tablerelateds) > 1) {
?>
<div class="row page_margin_top_section">
<h4 class="box_header">Post Terkait</h4>
示例3: elseif
} elseif ($action == 'absen') {
$actionact = $_GET['act'];
$thisabsen = ($actionact == '' or $actionact == 'edit') ? 'active' : '';
$thisabsenaddnew = $actionact == 'addnew' ? 'active' : '';
} elseif ($action == 'report') {
$actionact = $_GET['act'];
$thisreport = ($actionact == '' or $actionact == 'edit') ? 'active' : '';
$thisreortaddnew = $actionact == 'addnew' ? 'active' : '';
} else {
$actionact = $_GET['act'];
$thiscomponent = $actionact == '' ? 'active' : '';
}
echo "<ul class='sidebar-nav'>\n\t\t\t<li>\n\t\t\t\t<a href='admin.php?mod=home' class='{$activehome}'><i class='gi gi-home sidebar-nav-icon'></i>{$langmenu1}</a>\n\t\t\t</li>\n\n\t\t\t<li class='sidebar-header'>\n\t\t\t\t<span class='sidebar-header-title'>{$langmenu80}</span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href='admin.php?mod=absen' class='{$thisabsen}'><i class='gi gi-edit sidebar-nav-icon'></i>{$langmenu81}</a>\n\t\t\t</li>\n\n\t\t\t<li class='sidebar-header'>\n\t\t\t\t<span class='sidebar-header-title'>{$langmenu90}</span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href='admin.php?mod=report' class='{$thisreport}'><i class='gi gi-list sidebar-nav-icon'></i>{$langreport}</a>\n\t\t\t</li>\n\n\t\t\t<li class='sidebar-header'>\n\t\t\t\t<span class='sidebar-header-title'>{$langmenu49}</span>\n\t\t\t</li>\n\t\t\t<li class='{$activesiswa}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='gi gi-user sidebar-nav-icon'></i>{$langmenu50}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=siswa' class='{$thissiswa}'>{$langmenu51}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=siswa&act=addnew' class='{$thissiswaaddnew}'>{$langmenu52}</a></li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\n\t\t\t<li class='{$activeguru}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='gi gi-user sidebar-nav-icon'></i>{$langmenu60}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=guru' class='{$thisguru}'>{$langmenu61}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=guru&act=addnew' class='{$thisguruaddnew}'>{$langmenu62}</a></li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\n\t\t\t<li class='{$activekelas}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='gi gi-building sidebar-nav-icon'></i>{$langmenu70}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=kelas' class='{$thiskelas}'>{$langmenu71}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=kelas&act=addnew' class='{$thiskelasaddnew}'>{$langmenu72}</a></li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\n\t\t\t<li class='sidebar-header'>\n\t\t\t\t<span class='sidebar-header-title'>{$langmenu2}</span>\n\t\t\t</li>\n\t\t\t<li class='{$activepost}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='gi gi-book sidebar-nav-icon'></i>{$langmenu2}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=post' class='{$thispost}'>{$langmenu3}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=post&act=addnew' class='{$thispostaddnew}'>{$langmenu4}</a></li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t\t<li class='{$activecategory}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='hi hi-tasks sidebar-nav-icon'></i>{$langmenu5}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=category' class='{$thiscategory}'>{$langmenu5}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=category&act=addnew' class='{$thiscategoryaddnew}'>{$langmenu4}</a></li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t\t<li class='{$activetags}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='gi gi-tags sidebar-nav-icon'></i>{$langmenu6}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=tag' class='{$thistag}'>{$langmenu6}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=tag&act=addnew' class='{$thistagaddnew}'>{$langmenu4}</a></li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t\t<li class='sidebar-header'>\n\t\t\t\t<span class='sidebar-header-title'>{$langmenu10}</span>\n\t\t\t</li>\n\t\t\t<li class='{$activepages}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='hi hi-file sidebar-nav-icon'></i>{$langmenu10}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=pages' class='{$thispages}'>{$langmenu11}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=pages&act=addnew' class='{$thispagesaddnew}'>{$langmenu12}</a></li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t\t<li class='sidebar-header'>\n\t\t\t\t<span class='sidebar-header-title'>{$langmenu7}</span>\n\t\t\t</li>\n\t\t\t<li class='{$activelibrary}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='fa fa-picture-o sidebar-nav-icon'></i>{$langmenu7}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=library' class='{$thislibrary}'>{$langmenu8}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=library&act=addnew' class='{$thislibraryaddnew}'>{$langmenu9}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=library&act=addnewmultiple' class='{$thislibraryaddnewmulti}'>{$langmenu9} Multiple</a></li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t\t<li class='sidebar-header'>\n\t\t\t\t<span class='sidebar-header-title'>{$langmenu13}</span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href='admin.php?mod=setting' class='{$activesetting}'><i class='gi gi-cogwheels sidebar-nav-icon'></i>{$langmenu14}</a>\n\t\t\t</li>\n\t\t\t<li class='{$activetheme}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='gi gi-imac sidebar-nav-icon'></i>{$langmenu15}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=theme' class='{$thistheme}'>{$langmenu15}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=theme&act=addnew' class='{$thisthemeaddnew}'>{$langmenu18}</a></li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href='admin.php?mod=menumanager' class='{$activemenu}'><i class='fa fa-sitemap sidebar-nav-icon'></i>{$langmenu28}</a>\n\t\t\t</li>\n\t\t\t<li class='sidebar-header'>\n\t\t\t\t<span class='sidebar-header-title'>{$langmenu16}</span>\n\t\t\t</li>\n\t\t\t<li class='{$activecomponent} {$activecogen}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='fa fa-puzzle-piece sidebar-nav-icon'></i>{$langmenu16}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=component' class='{$thiscomponent}'>{$langmenu17}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=component&act=addnew' class='{$thiscomponentaddnew}'>{$langmenu18}</a></li>\n\t <li><a href='admin.php?mod=cogen' class='{$thiscogen}'>CoGen</a></li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href='#' class='sidebar-nav-submenu'><i class='fa fa-angle-left sidebar-nav-indicator'></i>{$langmenu31}</a>\n\t\t\t\t\t\t<ul>";
include_once '../po-library/po-database.php';
$tablecomponentm = new PoTable('component');
$componentmenus = $tablecomponentm->findAll(id_component, DESC);
foreach ($componentmenus as $componentmenu) {
$pecahurl = explode("-", $componentmenu->component);
$url = $pecahurl[1];
echo "<li><a href='admin.php?mod={$url}'>{$componentmenu->component}</a></li>";
}
echo "</ul>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t\t<li class='sidebar-header'>\n\t\t\t\t<span class='sidebar-header-title'>{$langmenu19}</span>\n\t\t\t</li>\n\t\t\t<li class='{$activeuser}'>\n\t\t\t\t<a href='#' class='sidebar-nav-menu'><i class='fa fa-angle-left sidebar-nav-indicator'></i><i class='gi gi-group sidebar-nav-icon'></i>{$langmenu19}</a>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href='admin.php?mod=user' class='{$thisuser}'>{$langmenu20}</a></li>\n\t\t\t\t\t<li><a href='admin.php?mod=user&act=addnew' class='{$thisuseraddnew}'>{$langmenu21}</a></li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t</ul>";
} else {
$action = $_GET['mod'];
$activehome = $action == 'home' ? 'active' : '';
$activepost = $action == 'post' ? 'active' : '';
$activecategory = $action == 'category' ? 'active' : '';
$activetags = $action == 'tag' ? 'active' : '';
$activeuser = $action == 'user' ? 'active' : '';
if ($action == 'post') {
$actionact = $_GET['act'];
示例4: PoTable
$tabledel = new PoTable('user_role');
$tabledel->deleteBy('id_role', $id);
header('location:../../admin.php?mod=' . $mod . '&act=userrole');
} else {
header('location:../../404.php');
}
} elseif ($mod == 'user' and $act == 'input') {
if ($currentRoleAccess->write_access == "Y") {
$username = $val->validasi($_POST['username'], 'xss');
$pass = md5($_POST[password]);
$namalengkap = $val->validasi($_POST['nama_lengkap'], 'xss');
$email = $val->validasi($_POST['email'], 'xss');
$telp = $val->validasi($_POST['no_telp'], 'xss');
$level = $val->validasi($_POST['level'], 'xss');
$tableuser = new PoTable('users');
$users = $tableuser->findAll('id_user', 'ASC');
foreach ($users as $user) {
$user = $user->id_user;
}
$id_user = $user + 1;
$table = new PoTable('users');
$table->save(array('id_user' => $id_user, 'username' => $username, 'password' => $pass, 'nama_lengkap' => $namalengkap, 'email' => $email, 'no_telp' => $telp, 'level' => $level, 'tgl_daftar' => $tgl_sekarang, 'id_session' => $pass));
header('location:../../admin.php?mod=' . $mod);
} else {
header('location:../../404.php');
}
} elseif ($mod == 'user' and $act == 'adduserlevel') {
if ($currentRoleAccess->write_access == "Y") {
$title = $val->validasi($_POST['title'], 'xss');
$table = new PoTable('user_level');
$table->save(array('level' => $title));
示例5: PoTable
<option value="<?php
echo $currentSiswa->jk;
?>
"><?php
echo $currentSiswa->jk;
?>
</option>
<option>-- Pilih --</option>
<option value="L">Laki-laki</option>
<option value="P">Perempuan</option>
</select>
<label>Kelas <span class="text-danger">*</span></label>
<?php
$tablecats = new PoTable("kelas");
$cats = $tablecats->findAll(id_kelas, ASC);
$numcats = $tablecats->numRow();
if ($numcats > 0) {
echo "<select class='select-chosen' name='idk' style='width:280px;'>\n <option value='{$currentSiswa->kelas}'>{$currentSiswa->idk}</option>";
foreach ($cats as $cat) {
echo "<option value='{$cat->id_kelas}'>{$cat->kelas}</option>";
}
echo "</select>";
}
?>
<label>No. Telp <span class="text-danger">*</span></label>
<input class="form-control" type="text" id="tlp" name="tlp" value="<?php
echo $currentSiswa->tlp;
?>
" required>
示例6: GetCheckboxes
function GetCheckboxes($tagging)
{
$tabletag = new PoTable("tag");
$tags = $tabletag->findAll(id_tag, DESC);
$_arrNilai = explode(',', $tagging);
$str = '';
foreach ($tags as $tag) {
$_ck = array_search($tag->tag_seo, $_arrNilai) === false ? '' : 'selected=selected';
$str .= "<option value='{$tag->tag_seo}' {$_ck}>{$tag->tag_title}</option>";
}
return $str;
}
示例7: PoTable
<?php
}
break;
case "album":
?>
<div class="block full">
<div class="block-title">
<h2>Album Management</h2>
<div class="block-options pull-right">
<a href="admin.php?mod=video" class="btn btn-sm btn-default" title="Add New"><i class="fa fa-reply"></i> Back To Video</a>
</div>
</div>
<div class="table-responsive">
<?php
$tablealbum = new PoTable('valbum');
$albums = $tablealbum->findAll(id_album, DESC);
echo "<table cellpadding='0' cellspacing='0' border='0' class='dTableAjax2 table table-vcenter table-condensed table-bordered' id='dynamic'>\n\t\t\t\t\t\t<thead><tr>\n\t\t\t\t\t\t\t<th>No</th>\n\t\t\t\t\t\t\t<th>Id Data</th>\n\t\t\t\t\t\t\t<th>Title</th>\n\t\t\t\t\t\t\t<th>Active</th>\n\t\t\t\t\t\t\t<th>Action</th>\n\t\t\t\t\t\t</tr></thead><tbody>";
$no = 1;
foreach ($albums as $album) {
echo "<tr class='gradeA' id='dela{$album->id_album}'>\n\t\t\t\t\t\t\t<td style='width:80px;'>{$no}</td>\n\t\t\t\t\t\t\t<td style='width:100px;'>{$album->id_album}</td>\n\t\t\t\t\t\t\t<td>{$album->title}</td>\n\t\t\t\t\t\t\t<td style='width:80px;' class='text-center'><span id='activespan{$album->id_album}'>{$album->active}</span></td>\n\t\t\t\t\t\t\t<td style='width:200px;'><div class='text-center'><div class='btn-group btn-group-xs'>\n\t\t\t\t\t\t\t\t\t<a class='btn btn-xs btn-default tblactive' id='{$album->id_album}' data-toggle='tooltip' title='Active'><i class='fa fa-eye'></i></a>\n\t\t\t\t\t\t\t\t\t<a href='#tbledit{$album->id_album}' class='btn btn-xs btn-default' id='{$album->id_album}' data-toggle='modal' title='Edit'><i class='fa fa-pencil'></i></a>\n\t\t\t\t\t\t\t\t\t<a class='btn btn-xs btn-danger alertdela' id='{$album->id_album}' data-toggle='tooltip' title='Delete'><i class='fa fa-times'></i></a>\n\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>";
?>
<div id="tbledit<?php
echo $album->id_album;
?>
" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form id="form-validation" method="post" action="<?php
echo $aksi;
?>
" autocomplete="off">
示例8: switch
?>
</li>
</ul>
<?php
switch ($_GET[act]) {
default:
?>
<div class="block full">
<div class="block-title"><h2><?php
echo $langtheme1;
?>
</h2></div>
<div class="row">
<?php
$tabletheme = new PoTable('theme');
$themes = $tabletheme->findAll(id_theme, DESC);
$jml_kolom = 2;
$cnt = 0;
$tableroleaccess = new PoTable('user_role');
$currentRoleAccess = $tableroleaccess->findByAnd(id_level, $_SESSION['leveluser'], module, 'theme');
$currentRoleAccess = $currentRoleAccess->current();
foreach ($themes as $theme) {
$cnt++;
if ($currentRoleAccess->delete_access == "Y") {
$tbldelete = "<a class='btn btn-sm btn-alt btn-danger alertdel' id='{$theme->id_theme}' data-toggle='tooltip' title='{$langtheme5}'><i class='fa fa-times'></i></a>";
}
echo "<div class='col-sm-4 block-section text-center' id='del{$theme->id_theme}'>\r\n\t\t\t\t\t\t<h4 class='sub-header'>{$theme->title}</h4>\r\n\t\t\t\t\t\t<div class='gallery-image'>\r\n\t\t\t\t\t\t\t<img src='../po-content/{$theme->folder}/preview.jpg' alt='' style='width:100%;'>\r\n\t\t\t\t\t\t\t<div class='gallery-image-options'>\r\n\t\t\t\t\t\t\t\t<form method='post' action='{$aksi}' autocomplete='off'>\r\n\t\t\t\t\t\t\t\t\t<input type='hidden' name='mod' value='theme'>\r\n\t\t\t\t\t\t\t\t\t<input type='hidden' name='act' value='active'>\r\n\t\t\t\t\t\t\t\t\t<input type='hidden' name='id' value='{$theme->id_theme}'>";
if ($theme->active == 'Y') {
echo "<input type='hidden' name='active' value='N'>\r\n\t\t\t\t\t\t\t\t\t\t\t<a href='admin.php?mod=theme&act=edit&id=header.php' class='btn btn-sm btn-alt btn-primary' data-toggle='tooltip' title='Edit'><i class='fa fa-pencil'></i></a> \r\n\t\t\t\t\t\t\t\t\t\t\t<button class='btn btn-sm btn-alt btn-success' type='submit' title='{$langtheme6}'><i class='fa fa-eye-slash'></i></button> ";
} else {
echo "<input type='hidden' name='active' value='Y'>\r\n\t\t\t\t\t\t\t\t\t\t\t<button class='btn btn-sm btn-alt btn-success' type='submit' title='{$langtheme7}'><i class='fa fa-eye'></i></button> ";
示例9: PoTable
<input class="form-control" type="text" id="nama_lengkap" name="nama_lengkap" required>
</div>
<div class="form-group">
<label>Email <span class="text-danger">*</span></label>
<input class="form-control" type="text" id="email" name="email" required>
</div>
<div class="form-group">
<label>Phone Number <span class="text-danger">*</span></label>
<input class="form-control" type="text" id="no_telp" name="no_telp" required>
</div>
<div class="form-group">
<label>Level <span class="text-danger">*</span></label>
<select class="select-chosen-no-search" name="level" style="width:280px;" data-placeholder="Choose Level">
<?php
$tablelevel = new PoTable("user_level");
$levels = $tablelevel->findAll(id_level, ASC);
foreach ($levels as $level) {
echo "<option value='{$level->id_level}'>{$level->level}</option>";
}
?>
</select>
</div>
<div class="form-group form-actions">
<button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-check"></i> Submit</button>
<button type="reset" class="btn btn-sm btn-danger pull-right" onclick="self.history.back()"><i class="fa fa-times"></i> Cancel</button>
</div>
</fieldset>
</form>
</div>
<?php
} else {
示例10: elseif
} elseif ($mod == 'post' and $act == 'subscribe') {
if ($currentRoleAccess->write_access == "Y") {
$idsub = $_POST['id'];
$table = new PoTable('post');
$currentPosts = $table->findBy(id_post, $idsub);
$currentPosts = $currentPosts->current();
$titlesub = $currentPosts->title;
$seotitlesub = $currentPosts->seotitle;
$tableset = new PoTable('setting');
$currentSet = $tableset->findBy(id_setting, '1');
$currentSet = $currentSet->current();
$website_name = $currentSet->website_name;
$website_url = $currentSet->website_url;
$website_email = $currentSet->website_email;
$tablesubs = new PoTable('subscribe');
$subs = $tablesubs->findAll(id_subscribe, ASC);
foreach ($subs as $sub) {
$emailto = $sub->email;
$to = "{$emailto}";
$from = "{$website_name} <{$website_email}>";
$subject = "News Update - {$titlesub}";
$message = "<html>\n\t\t\t\t\t\t<body>\n\t\t\t\t\t\t\tHi {$sub->email}<br />\n\t\t\t\t\t\t\tWe have the latest updates for you!<br />\n\t\t\t\t\t\t\tPlease click on the link below to begin reading :<br />\n\t\t\t\t\t\t\t<a href='{$website_url}/detailpost/{$seotitlesub}'>{$titlesub}</a><br /><br />\n\t\t\t\t\t\t\tThank you for subscribing,<br />\n\t\t\t\t\t\t\t{$website_name}\n\t\t\t\t\t\t</body>\n\t\t\t\t\t</html>";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From: " . $from . "\r\n";
mail($to, $subject, $message, $headers);
}
header('location:../../admin.php?mod=' . $mod);
} else {
header('location:../../404.php');
}
示例11: header
<?php
session_start();
if (empty($_SESSION['namauser']) and empty($_SESSION['passuser'])) {
header('location:404.php');
} else {
include_once '../../../po-library/po-database.php';
include_once '../../../po-library/po-function.php';
$table = new PoTable('event');
$data = $table->findAll(id_event, "ASC");
$json = array();
foreach ($data as $datas) {
$row = array();
$row['id'] = $datas->id_event;
$row['title'] = $datas->title;
$row['start'] = $datas->startevt;
$row['end'] = $datas->endevt;
$row['allDay'] = $datas->allday;
$row['color'] = "#" . $datas->color;
$json[] = $row;
}
echo json_encode($json);
}
示例12: PoTable
</div>
<div class="col-md-6 col-xs-12">
<h5><strong>ARCHIEVE VIDEO</strong></h5>
<ul>
<li>April 2015</li>
<li>April 2015</li>
</ul>
</div>
</div>
</section>
<section class="recent clearfix" id="side-categories">
<h4>CATEGORIES</h4>
<ul>
<?php
$tablesidecat = new PoTable('category');
$sidecats = $tablesidecat->findAll();
foreach ($sidecats as $sidecat) {
?>
<li><a href="<?php
echo $website_url;
?>
/category/<?php
echo $sidecat->seotitle;
?>
" title="<?php
echo $sidecat->title;
?>
"><?php
echo $sidecat->title;
?>
</a></li>