本文整理汇总了PHP中PoTable::findBy方法的典型用法代码示例。如果您正苦于以下问题:PHP PoTable::findBy方法的具体用法?PHP PoTable::findBy怎么用?PHP PoTable::findBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PoTable
的用法示例。
在下文中一共展示了PoTable::findBy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PoTable
</form>
</div>
</div>
</div>
</div>
<div class="block full">
<div class="block-title">
<h2>PopojiCMSOAuth - Twitter Connect</h2>
<div class="block-options pull-right"><a class="btn btn-sm btn-default" href="http://iag.me/socialmedia/how-to-create-a-twitter-app-in-8-easy-steps/" target="_blank"><?php
echo $langsetting17;
?>
</a></div>
</div>
<?php
$tableoauthtw = new PoTable('oauth');
$currentOauthtw = $tableoauthtw->findBy(id_oauth, '2');
$currentOauthtw = $currentOauthtw->current();
?>
<div class="table-responsive">
<table class="table table-vcenter" cellpadding="0" cellspacing="0">
<thead><tr><th style="width:20%;"><?php
echo $langsetting3;
?>
</th><th><?php
echo $langsetting4;
?>
</th></tr></thead>
<tbody>
<tr>
<td>Twitter Consumer Key</td>
<td><?php
示例2: Paging
?>
</ul> <!-- **recent-gallery - Ends** -->
<div class="dt-sc-margin10"></div>
<!-- **bx-pager - Starts** -->
<div id="bx-pager">
<?php
$p = new Paging();
$nov = 1;
$batas = 6;
$posisi = $p->cariPosisi($batas);
$tablevid = new PoTable('video');
$videos = $tablevid->findAllLimitBy(id_video, id_album, $idalb, DESC, "{$posisi},{$batas}");
foreach ($videos as $video) {
$idalb = $video->id_album;
$tablecalb = new PoTable('valbum');
$currentCalb = $tablecalb->findBy(id_album, $idalb);
$currentCalb = $currentCalb->current();
if ($currentCalb->active == 'Y') {
?>
<a href="javascript:void(0);" data-slide-index="<?php
echo $nov;
?>
"><img src="<?php
echo $website_url;
?>
/po-content/po-thumbs/<?php
echo $video->picture;
?>
" alt="<?php
echo $video->title;
?>
示例3: PoTable
<?php
include_once 'po-database.php';
$tabletime = new PoTable('setting');
$currentTime = $tabletime->findBy(id_setting, '1');
$currentTime = $currentTime->current();
$timezone_set = $currentTime->timezone;
date_default_timezone_set('' . $timezone_set . '');
示例4: PoTable
$batas = 5;
$posisi = $p->cariPosisi($batas);
$tablesearch = new PoTable('post');
$searchposts = $tablesearch->findSearchPost($kata, "{$posisi},{$batas}");
$numsearchposts = $tablesearch->numRowSearchPost($kata);
if ($numsearchposts > 0) {
?>
<?php
foreach ($searchposts as $searchpost) {
$tabledscom = new PoTable('comment');
$totaldscom = $tabledscom->numRowByAnd(id_post, $searchpost->id_post, active, 'Y');
$tablecatds = new PoTable('category');
$currentCatds = $tablecatds->findBy(id_category, $searchpost->id_category);
$currentCatds = $currentCatds->current();
$tableuser = new PoTable('users');
$currentUser = $tableuser->findBy(id_user, $searchpost->editor);
$currentUser = $currentUser->current();
?>
<div class="item col-sm-4">
<div class="portfolio-item">
<a href="<?php
echo "{$website_url}/detailpost/{$searchpost->seotitle}";
?>
" class="image">
<img src="<?php
echo $website_url;
?>
/po-content/po-upload/medium/medium_<?php
echo $searchpost->picture;
?>
" class="img-rounded" />
示例5: Povalidasi
require_once '../../po-component/po-oauth/twitter/twitteroauth/twitteroauth.php';
$val = new Povalidasi();
$tableoauthtw = new PoTable('oauth');
$currentOauthtw = $tableoauthtw->findBy(id_oauth, '2');
$currentOauthtw = $currentOauthtw->current();
$conkeyOauthtw = $currentOauthtw->oauth_key;
$consecretOauthtw = $currentOauthtw->oauth_secret;
$idOauthtw = $currentOauthtw->oauth_id;
$tokenOauthtw = $currentOauthtw->oauth_token1;
$tokensecretOauthtw = $currentOauthtw->oauth_token2;
$tablesetting = new PoTable('setting');
$currentSetting = $tablesetting->findBy(id_setting, '1');
$currentSetting = $currentSetting->current();
$urlwebsite = $currentSetting->website_url;
$urlwebsitename = $currentSetting->website_name;
define('CONSUMER_KEY', '' . $conkeyOauthtw . '');
define('CONSUMER_SECRET', '' . $consecretOauthtw . '');
define('OAUTH_CALLBACK', '' . $urlwebsite . '/po-adminboard/admin.php?mod=post');
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $tokenOauthtw, $tokensecretOauthtw);
$valid = $val->validasi($_GET['id'], 'sql');
$table = new PoTable('post');
$currentPosts = $table->findBy(id_post, $valid);
$currentPosts = $currentPosts->current();
$params = array("status" => "{$currentPosts->title}, Link : {$urlwebsite}/detailpost/{$currentPosts->seotitle}");
$status = $connection->post('statuses/update', $params);
if (200 == $connection->http_code) {
header('location:../../admin.php?mod=post');
} else {
header('location:../../404.php');
}
}
示例6: PoTable
<div class="block full">
<div class="block-title"><h2>Edit Data</h2></div>
<form id="form-validation" class="form-bordered" method="post" action="<?php
echo $aksi;
?>
" autocomplete="off">
<fieldset>
<input type="hidden" name="mod" value="video">
<input type="hidden" name="act" value="editvideo">
<input type="hidden" name="id" value="<?php
echo $currentVideo->id_video;
?>
">
<?php
$tableselcats = new PoTable('valbum');
$selcats = $tableselcats->findBy(id_album, $currentVideo->id_album);
$selcats = $selcats->current();
$tablealbums = new PoTable('valbum');
$albums = $tablealbums->findNotAll(id_album, $currentVideo->id_album);
$numalbums = $tablealbums->numRow();
if ($numalbums > 0) {
echo "<div class='form-group'>\n\t\t\t\t\t\t<label>Album</label>\n\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t<div class='col-md-6'>\n\t\t\t\t\t\t\t\t<select class='select-chosen' name='id_album' style='width:280px;' data-placeholder='Choose a Album'>\n\t\t\t\t\t\t\t\t<option value='{$selcats->id_album}'>{$selcats->title}</option>";
foreach ($albums as $album) {
echo "<option value='{$album->id_album}'>{$album->title}</option>";
}
echo "</select>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class='col-md-6'>\n\t\t\t\t\t\t\t\t<a href='#tbladdalbum' class='btn btn btn-success' data-toggle='modal'><i class='fa fa-plus-square-o'></i> Or Add New Album</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>";
} else {
echo "<div class='form-group'>\n\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t<div class='col-md-2'>\n\t\t\t\t\t\t\t\t<label>Add New Album</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class='col-md-10'>\n\t\t\t\t\t\t\t\t<a href='#tbladdalbum' class='btn btn btn-success' data-toggle='modal'><i class='fa fa-plus-square-o'></i> Add New Album</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>";
}
?>
<div class="form-group">
示例7: COUNT
$iFilteredTotal = $aResultFilterTotal[0];
$sQuery = "\r\n SELECT COUNT(" . $sIndexColumn . ")\r\n FROM {$sTable}\r\n ";
$rResultTotal = mysqli_query($gaSql['link'], $sQuery) or die(mysqli__connect_error());
$aResultTotal = mysqli_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];
$output = array("sEcho" => intval($_GET['sEcho']), "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iFilteredTotal, "aaData" => array());
$no = 1;
while ($aRow = mysqli_fetch_array($rResult)) {
$row = array();
$tableroleaccess = new PoTable('user_role');
$currentRoleAccess = $tableroleaccess->findByAnd(id_level, $_SESSION['leveluser'], module, 'comment');
$currentRoleAccess = $currentRoleAccess->current();
for ($i = 1; $i < count($aColumns); $i++) {
$valid = $aRow['id_post'];
$tablepost = new PoTable('post');
$currentPost = $tablepost->findBy(id_post, $valid);
$currentPost = $currentPost->current();
$urlcar = addhttp($aRow['url']);
if ($aRow['status'] == "Y") {
$readdata = "<a class='btn btn-xs btn-success'><i class='fa fa-circle-o'></i></a>";
} else {
$readdata = "<a class='btn btn-xs btn-success readdata' id='{$aRow['id_comment']}'><i class='fa fa-circle' id='read{$aRow['id_comment']}'></i></a>";
}
if ($currentRoleAccess->delete_access == "Y") {
$tbldelete = "<a class='btn btn-xs btn-danger alertdel' id='{$aRow['id_comment']}'><i class='fa fa-times'></i></a>";
}
$checkdata = "<div class='text-center'><input type='checkbox' id='titleCheckdel' /><input type='hidden' class='deldata' name='item[{$no}][deldata]' value='{$aRow['id_comment']}' disabled></div>";
$row[] = $checkdata;
$row[] = $aRow['id_comment'];
$row[] = "<a href='../detailpost/{$currentPost->seotitle}' target='_blank'>{$currentPost->title}</a>";
$row[] = $aRow['name'];
示例8: header
header('location:../../404.php');
}
$table = new PoTable('theme');
$table->save(array('title' => $title, 'author' => $author, 'folder' => $folder));
header('location:../../admin.php?mod=' . $mod);
}
}
} else {
header('location:../../404.php');
}
} elseif ($mod == 'theme' and $act == 'active') {
if ($currentRoleAccess->modify_access == "Y") {
$id = $val->validasi($_POST['id'], 'sql');
$active = $val->validasi($_POST['active'], 'xss');
$tableS = new PoTable('theme');
$currentSearch = $tableS->findBy(active, 'Y');
$currentSearch = $currentSearch->current();
$id_theme = $currentSearch->id_theme;
$actives = 'N';
$datas = array('active' => $actives);
$table = new PoTable('theme');
$table->updateBy('id_theme', $id_theme, $datas);
$data = array('active' => $active);
$table = new PoTable('theme');
$table->updateBy('id_theme', $id, $data);
header('location:../../admin.php?mod=' . $mod);
} else {
header('location:../../404.php');
}
} elseif ($mod == 'theme' and $act == 'edit') {
if ($currentRoleAccess->modify_access == "Y") {
示例9: PoTable
<input id="fileInput" name="fupload" type="file" /><br />
<p><i>* Please empty the box if you can create one blank theme.</i></p>
</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>
<p style="width:100%; height:100px;"> </p>
<?php
break;
case "edit":
$table = new PoTable('theme');
$currentTheme = $table->findBy(active, 'Y');
$currentTheme = $currentTheme->current();
$valid = $val->validasi($_GET['id'], 'xss');
$filename = "../po-content/{$currentTheme->folder}/{$valid}";
if (file_exists("{$filename}")) {
$fh = fopen($filename, "r") or die("Could not open file!");
$data = fread($fh, filesize($filename)) or die("Could not read file!");
$data = str_replace("textarea", "textareapopojicms", $data);
fclose($fh);
?>
<style type="text/css">
.CodeMirror { height: 800px; }
.CodeMirror-matchingtag { background: #4d4d4d; }
.breakpoints { width: .8em; }
.breakpoint { color: #3498db; }
</style>
示例10: PoTable
<script type="text/javascript" src="js/app.js"></script>
<?php
$modjs = $_GET['mod'];
if (file_exists("po-component/po-{$modjs}/javascript.js")) {
?>
<script type="text/javascript" src="<?php
echo "po-component/po-{$modjs}/javascript.js";
?>
"></script>
<?php
}
?>
<?php
$tableseteditor = new PoTable('setting');
$currentSetEditor = $tableseteditor->findBy(id_setting, '1');
$currentSetEditor = $currentSetEditor->current();
?>
<script type="text/javascript">
tinymce.init({
selector: "#po-wysiwyg",
skin: "light",
plugins: [
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
"table contextmenu directionality emoticons paste textcolor responsivefilemanager",
"code fullscreen youtube autoresize"
],
menubar : false,
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent table",
toolbar2: "| fontsizeselect | styleselect | link unlink anchor | responsivefilemanager image media youtube | forecolor backcolor | fullscreen ",
示例11: PoTable
<div class="col-md-6">
<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" value="<?php
echo $currentUser->no_telp;
?>
" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Level</label>
<select class="select-chosen-no-search" name="level" style="width:280px;" data-placeholder="Choose Level">
<?php
$tableselevel = new PoTable('user_level');
$sellevels = $tableselevel->findBy(id_level, $currentUser->level);
$sellevels = $sellevels->current();
echo "<option value='{$sellevels->id_level}'>{$sellevels->level}</option>";
$tablelevels = new PoTable('user_level');
$levels = $tablelevels->findNotAll(id_level, $currentUser->level);
foreach ($levels as $level) {
echo "<option value='{$level->id_level}'>{$level->level}</option>";
}
?>
</select>
</div>
</div>
</div>
<div class="form-group">
<label>Bio</label>
<textarea class="form-control" rows="8" cols="" id="bio" name="bio"><?php
示例12: PoTable
<?php
break;
case "addnew":
?>
<div class="block full">
<div class="block-title"><h2><?php
echo $langabsen2;
?>
</h2></div>
<div class="table-responsive">
<?php
$idk = $_SESSION['idk'];
$tablecats = new PoTable("siswa");
$cats = $tablecats->findBy(idk, $idk);
$numcats = $tablecats->numRow();
?>
<form method="post" action="<?php
echo $aksi;
?>
">
<input type="hidden" name="mod" value="absen">
<input type="hidden" name="act" value="input">
<table cellpadding="0" cellspacing="0" border="0" class="table table-vcenter table-condensed table-bordered">
<thead><tr>
<th>No.</th>
<th>NIS</th>
<th>Nama <?php
echo $langmenu51;
示例13: PoTable
</div>
</section>
<section class="portfolio-container">
<div class="container">
<div class="row">
<div class="col-md-12"><h3>Recent Blog</h3></div>
</div>
<div class="row">
<?php
$tablerec = new PoTable('post');
$recs = $tablerec->findAllLimitBy(id_post, active, 'Y', DESC, '3');
foreach ($recs as $rec) {
$validrec = $rec->id_category;
$tablecatrec = new PoTable('category');
$currentCatrec = $tablecatrec->findBy(id_category, $validrec);
$currentCatrec = $currentCatrec->current();
?>
<div class="col-sm-4">
<div class="portfolio-item">
<a href="<?php
echo "{$website_url}/detailpost/{$rec->seotitle}";
?>
" class="image">
<img src="<?php
echo $website_url;
?>
/po-content/po-upload/medium/medium_<?php
echo $rec->picture;
?>
" class="img-rounded" />
示例14: PoTable
?>
<?php
if ($mod == "home" or $mod == "detailpost") {
?>
<h4 class="box_header page_margin_top_section">Post Komentar</h4>
<div class="vertical_carousel_container clearfix">
<ul class="blog small vertical_carousel autoplay-1 scroll-1 navigation-1 easing-easeInOutQuint duration-750">
<?php
$tablecom = new PoTable('comment');
$coms = $tablecom->findAllLimitBy(id_comment, active, 'Y', DESC, '5');
foreach ($coms as $com) {
$validcom = $com->id_post;
$explname = explode(" ", $com->name);
$tablecompo = new PoTable('post');
$currentCompo = $tablecompo->findBy(id_post, $validcom);
$currentCompo = $currentCompo->current();
?>
<li class="post">
<a href="<?php
echo "{$website_url}/detailpost/{$currentCompo->seotitle}";
?>
#comment-list" title="<?php
echo $currentCompo->title;
?>
">
<img src="<?php
echo $website_url;
?>
/po-content/po-thumbs/<?php
echo $currentCompo->picture;
示例15: PoTable
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>No.</th>
<th>NIS</th>
<th>Kelas</th>
<th>Keterangan</th>
<th>Jam</th>
<th>Tanggal</th>
</tr>
</thead>
<tbody>
<?php
$id_siswa = $_SESSION['id_siswa'];
$tablecats = new PoTable("absen");
$cats = $tablecats->findBy(id_siswa, $id_siswa);
$numcats = $tablecats->numRow();
$no = 1;
if ($numcats > 0) {
foreach ($cats as $cat) {
echo "<tr><td>{$no}</td>";
echo "<td> {$cat->id_siswa} </td>";
echo "<td> {$cat->kelas} </td>";
echo "<td> {$cat->ket} </td>";
echo "<td> {$cat->jam} </td>";
echo "<td> {$cat->tgl} </td></tr>";
$no++;
}
}
?>
</tbody>