Beispiel #1
0
					</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 
        ?>
								</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;
                ?>
Beispiel #3
0
<?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 . '');
Beispiel #4
0
        $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" />
    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');
    }
}
	<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">
Beispiel #7
0
 $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'];
Beispiel #8
0
                     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") {
Beispiel #9
0
					<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;">&nbsp;</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>
Beispiel #10
0
	<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 ",
Beispiel #11
0
                    <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 
Beispiel #12
0
	
<?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;
Beispiel #13
0
             $tabledel->deleteBy('id_media', $id);
         }
         header('location:../../admin.php?mod=' . $mod);
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'library' and $act == 'multidelete') {
     if ($currentRoleAccess->delete_access == "Y") {
         $totaldata = $val->validasi($_POST['totaldata'], 'xss');
         if ($totaldata != "0") {
             $itemdel = $_POST['item'];
             $tabledel = new PoTable('media');
             foreach ($itemdel as $item) {
                 $id = $val->validasi($item['deldata'], 'xss');
                 $tabledel = new PoTable('media');
                 $currentSearch = $tabledel->findBy(id_media, $id);
                 $currentSearch = $currentSearch->current();
                 $picture = $currentSearch->file_name;
                 $pecah = explode(".", $picture);
                 $ekstensi = $pecah[1];
                 if ($ekstensi == 'jpg') {
                     unlink("../../../po-content/po-upload/{$picture}");
                     unlink("../../../po-content/po-upload/medium-{$picture}");
                     $tabledel->deleteBy('id_media', $id);
                 } else {
                     unlink("../../../po-content/po-upload/{$picture}");
                     $tabledel->deleteBy('id_media', $id);
                 }
             }
             header('location:../../admin.php?mod=' . $mod);
         } else {
Beispiel #14
0
			</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" />
Beispiel #15
0
    ?>

                        <?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;
Beispiel #16
0
			<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>
Beispiel #17
0
        $rResult = mysql_query($sQuery, $gaSql['link']) or die(mysql_error());
        $sQuery = "\r\n        SELECT FOUND_ROWS()\r\n    ";
        $rResultFilterTotal = mysql_query($sQuery, $gaSql['link']) or die(mysql_error());
        $aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
        $iFilteredTotal = $aResultFilterTotal[0];
        $sQuery = "\r\n        SELECT COUNT(" . $sIndexColumn . ")\r\n        FROM   {$sTable}\r\n    ";
        $rResultTotal = mysql_query($sQuery, $gaSql['link']) or die(mysql_error());
        $aResultTotal = mysql_fetch_array($rResultTotal);
        $iTotal = $aResultTotal[0];
        $output = array("sEcho" => intval($_GET['sEcho']), "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iFilteredTotal, "aaData" => array());
        $no = 1;
        while ($aRow = mysql_fetch_array($rResult)) {
            $row = array();
            for ($i = 1; $i < count($aColumns); $i++) {
                $valid = $aRow['level'];
                $tablelevel = new PoTable('user_level');
                $currentLevel = $tablelevel->findBy(id_level, $valid);
                $currentLevel = $currentLevel->current();
                $row[] = $aRow['id_user'];
                $row[] = $aRow['username'];
                $row[] = $aRow['nama_lengkap'];
                $row[] = $currentLevel->level;
                $row[] = $aRow['blokir'];
                $row[] = "<div class='text-center'><div class='btn-group btn-group-xs'>\r\n\t\t\t\t\t<a href='admin.php?mod=user&act=edit&id={$aRow['id_session']}' class='btn btn-xs btn-default' id='{$aRow['id_user']}'><i class='fa fa-pencil'></i></a>\r\n\t\t\t\t\t<a class='btn btn-xs btn-danger alertdel' id='{$aRow['id_user']}'><i class='fa fa-times'></i></a>\r\n\t\t\t</div></div>";
            }
            $output['aaData'][] = $row;
            $no++;
        }
        echo json_encode($output);
    }
}
Beispiel #18
0
	<div class="block full">
		<div class="block-title"><h2>Edit Post</h2></div>
		<form id="form-validation" class="form-bordered" method="post" action="<?php 
                echo $aksi;
                ?>
" autocomplete="off">
            <fieldset>
				<input type="hidden" name="mod" value="post">
				<input type="hidden" name="act" value="update">
				<input type="hidden" name="id" value="<?php 
                echo $currentPosts->id_post;
                ?>
">
				<?php 
                $tableselcats = new PoTable('category');
                $selcats = $tableselcats->findBy(id_category, $currentPosts->id_category);
                $selcats = $selcats->current();
                $tablecats = new PoTable('category');
                $cats = $tablecats->findNotAll(id_category, $currentPosts->id_category);
                $numcats = $tablecats->numRow();
                if ($numcats > 0) {
                    echo "<div class='form-group'>\n\t\t\t\t\t\t\t<label>Category</label>\n\t\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t\t<div class='col-md-6' id='selectcatdata'>\n\t\t\t\t\t\t\t\t\t<select class='select-chosen' name='id_category' style='width:280px;' data-placeholder='Choose a Category'>\n\t\t\t\t\t\t\t\t\t<option value='{$selcats->id_category}'>{$selcats->title}</option>";
                    foreach ($cats as $cat) {
                        echo "<option value='{$cat->id_category}'>{$cat->title}</option>";
                    }
                    echo "</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class='col-md-6'>\n\t\t\t\t\t\t\t\t\t<a href='javascript:void(0);' id='tbladdcat' class='btn btn btn-success'><i class='fa fa-plus-square-o'></i> Or Add New Category</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>";
                } else {
                    echo "<div class='form-group'>\n\t\t\t\t\t\t\t<label>Add New Category</label>\n\t\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t\t<div class='col-md-6' id='selectcatdata'>\n\t\t\t\t\t\t\t\t\t<select class='select-chosen' name='id_category' style='width:280px;' data-placeholder='Choose a Category'>\n\t\t\t\t\t\t\t\t\t<option value='{$selcats->id_category}'>{$selcats->title}</option>";
                    foreach ($cats as $cat) {
                        echo "<option value='{$cat->id_category}'>{$cat->title}</option>";
                    }
Beispiel #19
0
 if ($pass == $repass) {
     $currentUser = $table->findBy(username, $username);
     $currentUser = $currentUser->current();
     if ($currentUser > 0) {
         header('location:register.php?errormsg=6');
     } else {
         $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' => $passmd5, 'nama_lengkap' => 'Your Name', 'email' => $email, 'no_telp' => '08xxxxxxxxxx', 'bio' => "No matter how exciting or significant a person''s life is, a poorly written biography will make it seem like a snore. On the other hand, a good biographer can draw insight from an ordinary life-because they recognize that even the most exciting life is an ordinary life! After all, a biography isn''t supposed to be a collection of facts assembled in chronological order; it''s the biographer''s interpretation of how that life was different and important.", 'userpicture' => '', 'level' => '3', 'tgl_daftar' => $tgl_sekarang, 'blokir' => 'Y', 'id_session' => $passmd5));
         $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;
         $to = "{$username} <{$email}>";
         $from = "{$website_name} <{$website_email}>";
         $subject = "Email Account Activation For {$website_name}";
         $message = "<html>\n\t\t\t\t\t\t\t<body>\n\t\t\t\t\t\t\t\tIndonesia :<br />\n\t\t\t\t\t\t\t\t-----------<br />\n\t\t\t\t\t\t\t\tHi {$username},<br />\n\t\t\t\t\t\t\t\tJika anda tidak pernah mendaftarkan akun di {$website_name}, silahkan untuk menghiraukan email ini.<br />\n\t\t\t\t\t\t\t\tTetapi jika benar Anda telah membuat akun di {$website_name}, maka silahkan untuk mengklik tautan (link) di bawah ini untuk mengaktifkan akun Anda :<br /><br />\n\t\t\t\t\t\t\t\t<a href=\"{$website_url}/po-admin/activation.php?activeuser={$username}&key={$passmd5}\" title=\"Account Activation\">{$website_url}/po-admin/activation.php?activeuser={$username}&key={$passmd5}</a><br /><br />\n\t\t\t\t\t\t\t\tSetelah link tersebut diklik maka akun Anda telah diaktifkan dan telah terverifikasi, silahkan login dengan data berikut :<br /><br />\n\t\t\t\t\t\t\t\t--------------------<br />\n\t\t\t\t\t\t\t\tUsername : {$username}<br />\n\t\t\t\t\t\t\t\tPassword : {$pass}<br />\n\t\t\t\t\t\t\t\t--------------------<br /><br />\n\t\t\t\t\t\t\t\tSalam hangat,<br />\n\t\t\t\t\t\t\t\t{$website_name}.<br /><br /><br />\n\t\t\t\t\t\t\t\tEnglish :<br />\n\t\t\t\t\t\t\t\t-----------<br />\n\t\t\t\t\t\t\t\tHi {$username},<br />\n\t\t\t\t\t\t\t\tIf you have never registered account in {$website_name}, please to ignore this email.<br />\n\t\t\t\t\t\t\t\tBut if you really are registered account in {$website_name}, please to click on a link below to activated yout account :<br /><br />\n\t\t\t\t\t\t\t\t<a href=\"{$website_url}/po-admin/activation.php?activeuser={$username}&key={$passmd5}\" title=\"Account Activation\">{$website_url}/po-admin/activation.php?activeuser={$username}&key={$passmd5}</a><br /><br />\n\t\t\t\t\t\t\t\tThen automatically after you click a link above, your account have registered and verificated, please login with data :<br /><br />\n\t\t\t\t\t\t\t\t--------------------<br />\n\t\t\t\t\t\t\t\tUsername : {$username}<br />\n\t\t\t\t\t\t\t\tPassword : {$pass}<br />\n\t\t\t\t\t\t\t\t--------------------<br /><br />\n\t\t\t\t\t\t\t\tWarm regards,<br />\n\t\t\t\t\t\t\t\t{$website_name}.\n\t\t\t\t\t\t\t</body>\n\t\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:200.php');
     }
 } else {
 $output = array("sEcho" => intval($_GET['sEcho']), "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iFilteredTotal, "aaData" => array());
 $no = 1;
 while ($aRow = pg_fetch_array($rResult, null, PGSQL_ASSOC)) {
     $row = array();
     $tableroleaccess = new PoTable('user_role');
     $currentRoleAccess = $tableroleaccess->findByAnd(id_level, $_SESSION['leveluser'], module, 'post');
     $currentRoleAccess = $currentRoleAccess->current();
     for ($i = 1; $i < count($aColumns); $i++) {
         $str = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
         $strlink = preg_replace("/\\/po-adminboard\\/po-component\\/po-post\\/(datatable\\.php\$)/", "", $str);
         $valid = $aRow['id_category'];
         $tablecat = new PoTable('category');
         $currentCat = $tablecat->findBy(id_category, $valid);
         $currentCat = $currentCat->current();
         $tableuser = new PoTable('users');
         $currentUser = $tableuser->findBy(id_user, $aRow['editor']);
         $currentUser = $currentUser->current();
         if ($aRow['active'] == 'Y') {
             $sactive = "<i class='fa fa-eye'></i> Active";
         } else {
             $sactive = "<i class='fa fa-eye-slash'></i> Not Active";
         }
         if ($_SESSION['leveluser'] == '1' or $_SESSION['leveluser'] == '2') {
             if ($currentRoleAccess->modify_access == "Y") {
                 $tblheadline = "<a class='btn btn-xs btn-warning setheadline' id='{$aRow['id_post']}'><i class='fa fa-star'></i></a>";
             }
         }
         if ($aRow['headline'] == 'Y') {
             $headline = "<i class='fa fa-star text-warning'></i> Set Headline";
         } else {
             $headline = "<i class='fa fa-star'></i> Not Set Headline";
Beispiel #21
0
                 $fileimage = "../../../po-content/po-upload/user-{$iduser}.jpg";
                 if (file_exists("{$fileimage}")) {
                     unlink("../../../po-content/po-upload/user-{$iduser}.jpg");
                 }
                 UploadUser($nama_file_unik);
                 $pass = md5($_POST['newpassword']);
                 if ($_SESSION[leveluser] == '1') {
                     $data = array('password' => $pass, 'nama_lengkap' => $namalengkap, 'email' => $email, 'blokir' => $blokir, 'no_telp' => $telp, 'level' => $level, 'userpicture' => $nama_file_unik, 'bio' => $data, 'locktype' => $locktype);
                 } else {
                     $data = array('password' => $pass, 'nama_lengkap' => $namalengkap, 'email' => $email, 'no_telp' => $telp, 'userpicture' => $nama_file_unik, 'bio' => $data, 'locktype' => $locktype);
                 }
                 $table = new PoTable('users');
                 $table->updateBy('id_session', $id, $data);
             }
             $tableuser = new PoTable('users');
             $currentUser = $tableuser->findBy(username, $_SESSION['namauser']);
             $currentUser = $currentUser->current();
             session_start();
             $_SESSION['iduser'] = $currentUser->id_user;
             $_SESSION['namauser'] = $currentUser->username;
             $_SESSION['namalengkap'] = $currentUser->nama_lengkap;
             $_SESSION['passuser'] = $currentUser->password;
             $_SESSION['leveluser'] = $currentUser->level;
             header('location:../../admin.php?mod=' . $mod);
         }
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'user' and $act == 'edituserlevel') {
     if ($currentRoleAccess->modify_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
Beispiel #22
0
 $iFilteredTotal = $aResultFilterTotal[0];
 $sQuery = "\n        SELECT COUNT(" . $sIndexColumn . ")\n        FROM   {$sTable}\n    ";
 $rResultTotal = mysql_query($sQuery, $gaSql['link']) or die(mysql_error());
 $aResultTotal = mysql_fetch_array($rResultTotal);
 $iTotal = $aResultTotal[0];
 $output = array("sEcho" => intval($_GET['sEcho']), "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iFilteredTotal, "aaData" => array());
 $no = 1;
 while ($aRow = mysql_fetch_array($rResult)) {
     $row = array();
     $tableroleaccess = new PoTable('user_role');
     $currentRoleAccess = $tableroleaccess->findByAnd(id_level, $_SESSION['leveluser'], module, 'gallery');
     $currentRoleAccess = $currentRoleAccess->current();
     for ($i = 1; $i < count($aColumns); $i++) {
         $valid = $aRow['id_album'];
         $tablealbum = new PoTable('album');
         $currentAlbum = $tablealbum->findBy(id_album, $valid);
         $currentAlbum = $currentAlbum->current();
         if ($currentRoleAccess->delete_access == "Y") {
             $tbldelete = "<a class='btn btn-xs btn-danger alertdel' id='{$aRow['id_gallery']}'><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_gallery']}' disabled></div>";
         $row[] = $checkdata;
         $row[] = $aRow['id_gallery'];
         $row[] = $currentAlbum->title;
         $row[] = $aRow['title'];
         $row[] = "<a href='../po-content/po-upload/{$aRow['picture']}'>Image</a>";
         $row[] = "<div class='text-center'><div class='btn-group btn-group-xs'>\n\t\t\t\t\t<a href='admin.php?mod=gallery&act=edit&id={$aRow['id_gallery']}' class='btn btn-xs btn-default' id='{$aRow['id_gallery']}'><i class='fa fa-pencil'></i></a>\n\t\t\t\t\t{$tbldelete}\n\t\t\t</div></div>";
     }
     $output['aaData'][] = $row;
     $no++;
 }
Beispiel #23
0
            ?>
</th>
						<th><?php 
            echo $langcategory6;
            ?>
</th>
					</tr></thead>
					<tbody></tbody>
					<tfoot>
						<tr>
							<td style="width:80px;" class="text-center"><input type="checkbox" id="titleCheck" data-toggle="tooltip" title="<?php 
            echo $langaction5;
            ?>
" /></td>
							<td colspan="5">
								<button class="btn btn-sm btn-danger" type="button" data-toggle="modal" data-target="#alertalldel"><i class="fa fa-trash-o"></i> Delete Selected Item</button>
							</td>
						</tr>
					</tfoot>
				</table>
			</form>
		</div>
	</div>
	<div id="alertdel" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<form method="post" action="<?php 
            echo $aksi;
            ?>
" autocomplete="off">
					<div class="modal-header">
Beispiel #24
0
					</div>
				</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;">&nbsp;</p>
<?php 
            break;
        case "edit":
            $valid = $val->validasi($_GET['id'], 'sql');
            $table = new PoTable('pages');
            $currentPages = $table->findBy(id_pages, $valid);
            $currentPages = $currentPages->current();
            if ($currentPages == '0') {
                ?>
	<div class="block block-alt-noborder">
		<h3 class="sub-header">Ooops! <?php 
                echo $langpagenotfound1;
                ?>
</h3>
		<p>&nbsp;</p>
		<p align="center">
			<?php 
                $url = rtrim("http://" . $_SERVER['HTTP_HOST'], "/") . $_SERVER['PHP_SELF'];
                $url2 = preg_replace("/\\/(admin\\.php\$)/", "", $url);
                $siteurl = $url2;
                ?>
Beispiel #25
0
                    &nbsp;
                </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:500px;">&nbsp;</p>
<?php 
            break;
        case "edit":
            $valid = $val->validasi($_GET['id'], 'sql');
            $table = new PoTable('siswa');
            $currentSiswa = $table->findBy(id_siswa, $valid);
            $currentSiswa = $currentSiswa->current();
            if ($currentSiswa == '0') {
                ?>
    <div class="block block-alt-noborder">
        <h3 class="sub-header">Ooops! <?php 
                echo $langpagenotfound1;
                ?>
</h3>
        <p>&nbsp;</p>
        <p align="center">
            <?php 
                $url = rtrim("http://" . $_SERVER['HTTP_HOST'], "/") . $_SERVER['PHP_SELF'];
                $url2 = preg_replace("/\\/(admin\\.php\$)/", "", $url);
                $siteurl = $url2;
                ?>
Beispiel #26
0
 } elseif ($mod == 'comment' and $act == 'approve') {
     if ($currentRoleAccess->modify_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
         $active = $val->validasi($_POST['active'], 'xss');
         $data = array('active' => $active);
         $table = new PoTable('comment');
         $table->updateBy('id_comment', $id, $data);
         echo "{$active}";
     } else {
         echo "404 Not Found Access";
     }
 } elseif ($mod == 'comment' and $act == 'viewdata') {
     if ($currentRoleAccess->read_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
         $tablecomment = new PoTable('comment');
         $currentComment = $tablecomment->findBy('id_comment', $id);
         $currentComment = $currentComment->current();
         echo "{$currentComment->comment}";
     } else {
         echo "404 Not Found Access";
     }
 } elseif ($mod == 'comment' and $act == 'readdata') {
     if ($currentRoleAccess->modify_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
         $status = "Y";
         $data = array('status' => $status);
         $table = new PoTable('comment');
         $table->updateBy('id_comment', $id, $data);
     } else {
         echo "404 Not Found Access";
     }
Beispiel #27
0
******************************************************* 
-->
        <?php 
    $title = $val->validasi($_GET['id'], 'xss');
    $detail = new PoTable();
    $currentDetail = $detail->findManualQuery($tabel = "post,users,category", $field = "", $condition = "WHERE users.id_user = post.editor AND category.id_category = post.id_category AND category.active = 'Y' AND post.active = 'Y' AND post.seotitle = '" . $title . "'");
    $currentDetail = $currentDetail->current();
    $idpost = $currentDetail->id_post;
    if ($currentDetail > 0) {
        $tabledpost = new PoTable('post');
        $currentDpost = $tabledpost->findByPost(id_post, $idpost);
        $currentDpost = $currentDpost->current();
        $contentdet = html_entity_decode($currentDetail->content);
        $biodet = html_entity_decode($currentDetail->bio);
        $tabledcat = new PoTable('category');
        $currentDcat = $tabledcat->findBy(id_category, $currentDetail->id_category);
        $currentDcat = $currentDcat->current();
        $p = new Paging();
        $batas = 5;
        $posisi = $p->cariPosisi($batas);
        $tabledcom = new PoTable('comment');
        $composts = $tabledcom->findAllLimitByAnd(id_comment, id_post, active, "{$idpost}", "Y", "ASC", "{$posisi},{$batas}");
        $totaldcom = $tabledcom->numRowByAnd(id_post, $idpost, active, 'Y');
        mysql_query("UPDATE post SET hits = {$currentDetail->hits}+1 WHERE id_post = '" . $idpost . "'");
        ?>
        <div class="page">
            <div class="row page_margin_top">
				<div class="column column_2_3">
				    <div class="row">
                        <div class="post single">
                            <h1 class="post_title"><?php 
Beispiel #28
0
	<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="gallery">
				<input type="hidden" name="act" value="editgallery">
				<input type="hidden" name="id" value="<?php 
                echo $currentGallery->id_gallery;
                ?>
">
				<?php 
                $tableselcats = new PoTable('album');
                $selcats = $tableselcats->findBy(id_album, $currentGallery->id_album);
                $selcats = $selcats->current();
                $tablealbums = new PoTable('album');
                $albums = $tablealbums->findNotAll(id_album, $currentGallery->id_album);
                $numalbums = $tablealbums->numRow();
                if ($numalbums > 0) {
                    echo "<div class='form-group'>\r\n\t\t\t\t\t\t<label>Album</label>\r\n\t\t\t\t\t\t<div class='row'>\r\n\t\t\t\t\t\t\t<div class='col-md-6'>\r\n\t\t\t\t\t\t\t\t<select class='select-chosen' name='id_album' style='width:280px;' data-placeholder='Choose a Album'>\r\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>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class='col-md-6'>\r\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>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>";
                } else {
                    echo "<div class='form-group'>\r\n\t\t\t\t\t\t<div class='row'>\r\n\t\t\t\t\t\t\t<div class='col-md-2'>\r\n\t\t\t\t\t\t\t\t<label>Add New Album</label>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class='col-md-10'>\r\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>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>";
                }
                ?>
				<div class="form-group">
Beispiel #29
0
        }
        ?>
></li>
			<?php 
    }
    ?>
		</ol>

		<!-- Wrapper for slides -->
		<div class="carousel-inner" role="listbox">
			<?php 
    $sliders = $tableslider->findAllLimitByAnd(id_post, active, headline, 'Y', 'Y', DESC, '3');
    $no = 1;
    foreach ($sliders as $slider) {
        $tablecatsl = new PoTable('category');
        $currentCatsl = $tablecatsl->findBy(id_category, $slider->id_category);
        $currentCatsl = $currentCatsl->current();
        ?>
			<div class="item <?php 
        if ($no == 1) {
            ?>
active<?php 
        }
        ?>
">
				<img width="100%" style="height:487px;" src="<?php 
        echo $website_url;
        ?>
/po-content/po-upload/<?php 
        echo $slider->picture;
        ?>
Beispiel #30
0
} else {
    include_once '../../../po-library/po-database.php';
    include_once '../../../po-library/po-function.php';
    include_once '../../../po-library/po-pclzip.lib.php';
    $val = new Povalidasi();
    $mod = $_POST['mod'];
    $act = $_POST['act'];
    $tableroleaccess = new PoTable('user_role');
    $currentRoleAccess = $tableroleaccess->findByAnd(id_level, $_SESSION['leveluser'], module, $mod);
    $currentRoleAccess = $currentRoleAccess->current();
    // Hapus Component
    if ($mod == 'component' and $act == 'delete') {
        if ($currentRoleAccess->delete_access == "Y") {
            $id = $val->validasi($_POST['id'], 'sql');
            $tabledel = new PoTable('component');
            $currentSearch = $tabledel->findBy(id_component, $id);
            $currentSearch = $currentSearch->current();
            $component = $currentSearch->component;
            $table_name = $currentSearch->table_name;
            $dbhostsql = DATABASE_HOST;
            $dbusersql = DATABASE_USER;
            $dbpasswordsql = DATABASE_PASS;
            $dbnamesql = DATABASE_NAME;
            $connection = mysql_connect($dbhostsql, $dbusersql, $dbpasswordsql) or die(mysql_error());
            mysql_select_db($dbnamesql, $connection) or die(mysql_error());
            $dirPath = "../../po-component/{$component}";
            $deletef = deleteDir($dirPath);
            $queryf = "DROP TABLE IF EXISTS `{$dbnamesql}`.`{$table_name}`";
            $resultf = mysql_query($queryf);
            $tabledel->deleteBy('id_component', $id);
            header('location:../../admin.php?mod=' . $mod);