function __construct()
 {
     $this->CI =& get_instance();
     $datajson = optionGet('captcha_data');
     $site = jsonDataDecode($datajson, 'sitekey');
     $secret = jsonDataDecode($datajson, 'secretkey');
     $this->siteKey = $site;
     $this->secretKey = $secret;
 }
Exemple #2
0
 function checkType()
 {
     $type = optionGet('captcha_type');
     if (empty($type)) {
         exit('Please configuration captcha first');
     } else {
         return $type;
     }
 }
Exemple #3
0
 function checkserv()
 {
     $opt = optionGet('service_login_bruceforce');
     if (empty($opt)) {
         return false;
     } else {
         if ($opt == "1") {
             return true;
         } else {
             return false;
         }
     }
 }
Exemple #4
0
 function preview()
 {
     $this->load->library('m_seo');
     $param = $this->m_seo->postPermalink("", "", "", "");
     $d['data'] = $param;
     $title = "";
     if ($param['route'] == "post") {
         $title = $this->m_database->FieldRow('posts', $param['data'], 'post_title');
     } else {
         $title = optionGet('site_title');
     }
     $d['title'] = $title;
     $this->load->view('frontend/templateloader', $d);
 }
Exemple #5
0
 function tag($s1 = '')
 {
     $d['data']['route'] = "tag";
     $d['data']['data'] = $s1;
     $title = "";
     $s = array('term_id' => $s1);
     $tagName = $this->m_database->FieldRow('terms', $s, 'name');
     if (!empty($tagName)) {
         $title = $tagName;
     } else {
         $title = optionGet('site_title');
     }
     $d['title'] = $title;
     $this->load->view('templateloader', $d);
 }
Exemple #6
0
 function generateDo($view = FALSE)
 {
     $datajson = optionGet('captcha_data');
     $savepath = jsonDataDecode($datajson, 'folderci', 'captchafolder');
     $length = jsonDataDecode($datajson, 'lengthci', '5');
     $path = locationUpload('path') . $savepath;
     fileDirCreate($path);
     $this->CI->load->helper('captcha');
     $vals = array('img_path' => $path . '/', 'img_width' => 200, 'img_height' => 60, 'img_url' => locationUpload('url') . $savepath . '/', 'word_length' => $length, 'font_path' => './system/fonts/texb.ttf', 'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 'img_id' => 'cicaptcha', 'font_size' => 16, 'colors' => array('background' => array(255, 255, 255), 'border' => array(135, 5, 0), 'text' => array(0, 0, 0), 'grid' => array(255, 255, 255)));
     $cap = create_captcha($vals);
     $data = array('captcha_time' => $cap['time'], 'ip_address' => $this->CI->input->ip_address(), 'word' => $cap['word']);
     $query = $this->CI->db->insert_string($this->tbl, $data);
     $this->CI->db->query($query);
     $urlCaptcha = locationUpload('path') . $savepath;
     return $urlCaptcha . '/' . $cap['time'] . '.jpg';
 }
Exemple #7
0
 private function setSession()
 {
     $dbrole = optionGet('session_role');
     $dbuser = optionGet('session_user');
     if (empty($dbrole)) {
         optionSet('session_role', 'minang_role_session');
         $this->ses_role = 'minang_role_session';
     } else {
         $this->ses_role = $dbrole;
     }
     if (empty($dbuser)) {
         optionSet('session_user', 'minang_user_session');
         $this->ses_user = '******';
     } else {
         $this->ses_user = $dbuser;
     }
 }
Exemple #8
0
 function userInfo($output)
 {
     $CI =& get_instance();
     $sesuserdb = optionGet('session_user');
     $username = $CI->session->userdata($sesuserdb);
     $s = array('username' => $username, 'status' => 'active');
     if ($CI->m_database->isBOF('userlogin', $s) == TRUE) {
         redirect(base_url(routeGet('logout')), 'refresh');
     } else {
         $item = $CI->m_database->fieldRow('userlogin', $s, $output);
         if (!empty($item)) {
             return $item;
         } else {
             redirect(base_url(routeGet('logout')), 'refresh');
         }
     }
 }
Exemple #9
0
 function getfeed()
 {
     $feedUrl = optionGet('feed_minangcms');
     $feedContent = "";
     $output = "";
     $curl = curl_init();
     curl_setopt($curl, CURLOPT_URL, $feedUrl);
     curl_setopt($curl, CURLOPT_TIMEOUT, 30);
     curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
     curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($curl, CURLOPT_HEADER, false);
     curl_setopt($curl, CURL_HTTP_VERSION_1_1, true);
     curl_setopt($curl, CURLOPT_ENCODING, "gzip, deflate");
     curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3");
     $feedContent = curl_exec($curl);
     curl_close($curl);
     $limit = 10;
     if ($feedContent && !empty($feedContent)) {
         $feedXml = @simplexml_load_string($feedContent);
         if ($feedXml) {
             $output = '';
             $i = 0;
             if ($i <= $limit) {
                 $output .= '<ul>';
                 foreach ($feedXml->channel->item as $item) {
                     $i += 1;
                     $output .= '<li><a href="' . $item->link . '" target="_blank">' . $item->title . '</a></li>';
                 }
                 $output .= '</ul>';
             }
         }
     } else {
         $output .= 'Tidak dapat mengakses berita';
     }
     echo $output;
 }
Exemple #10
0
		},
		success:function(x){
			$("#config").html(x);
			$("#config").show();
			$("#loader").hide();
		},
	});
});

});
</script>
<?php 
$csv = '';
$service = optionGet('captcha_enable');
$optvis = '';
$type = optionGet('captcha_type');
if ($service == "0") {
    $csv = "";
    $optvis = 'display:none;';
} else {
    $csv = "checked";
    $optvis = '';
}
?>
<input type="hidden" name="lasttipe" id="lasttipe" value="<?php 
echo $type;
?>
"/>
<input type="hidden" name="laststate" id="laststate" value="<?php 
echo $service;
?>
Exemple #11
0
        <li><a href="<?php 
echo base_url(roleURIUser() . 'style/logo');
?>
"><i class="fa fa-circle-o"></i> <?php 
echo langGet("menu", "menu_appearance_logo");
?>
</a></li>
        <li><a href="<?php 
echo base_url(roleURIUser() . 'style/templates');
?>
"><i class="fa fa-circle-o"></i> <?php 
echo langGet("menu", "menu_appearance_template");
?>
</a></li>
        <?php 
$themeActive = optionGet('theme_front');
if (themeHasOption($themeActive)) {
    ?>
			<li><a href="<?php 
    echo base_url(roleURIUser() . 'style/templates/konfigurasi');
    ?>
"><i class="fa fa-circle-o"></i> Konfigurasi Tema</a></li>
			<?php 
}
?>
        <li><a href="<?php 
echo base_url(roleURIUser() . 'style/widgets');
?>
"><i class="fa fa-circle-o"></i> <?php 
echo langGet("menu", "menu_appearance_widget");
?>
Exemple #12
0
 function categoryContent($catID, $menuID, $menuTitle)
 {
     $p = '';
     $uriCat = optionGet('permalink_category');
     $slug = categoryInfo($catID, 'slug');
     $title = categoryInfo($catID, 'name');
     $urlPage = base_url() . $uriCat . '/' . $slug;
     $p .= '<i>Navigation Label</i><br>';
     $p .= '<input type="text" class="form-control" id="category_' . $menuID . '" value="' . $menuTitle . '"/>';
     $p .= '<small class="form-control">';
     $p .= '<i>Original</i> : ';
     $p .= '<a href="' . $urlPage . '" target="_blank">' . $title . '</a>';
     $p .= '</small>';
     return $p;
 }
Exemple #13
0
<?php

$b = optionGet('theme_backend');
include locationTheme('path') . 'backend/' . $b . '/footer.php';
Exemple #14
0
 function permalinkCategory($catID)
 {
     $uriCat = optionGet('permalink_category');
     $slugCat = categoryInfo($catID, "slug");
     if (!empty($slugCat)) {
         return base_url() . $uriCat . "/" . $slugCat;
     } else {
         return base_url();
     }
 }
Exemple #15
0
<?php

$logo = optionGet('site_logo');
$favicon = optionGet('site_favicon');
$att = array('class' => 'form-horizontal');
echo form_open(base_url(roleURIUser() . 'style/logo/updateapply'), $att);
?>
<div id="kcfinder_div"></div>
<div class="form-group">
	<label class="col-sm-2 control-label">Logo</label>
	<div class="col-md-3">
		<?php 
if (!empty($logo)) {
    ?>
			<img src="<?php 
    echo $logo;
    ?>
" id="imglogo" class="thumbnail img-responsive" style="height: 120px;"/>
		  	<a href="javascript:;" onclick="openKCFinder('logo')" class="form-control" id="addlogo" style="display: none;">Pilih Gambar</a>
		  	<a href="javascript:;" id="remlogo">Hapus Logo</a>
		  	<input type="hidden" name="logo" id="logo" value="<?php 
    echo $logo;
    ?>
"/>
			<?php 
} else {
    ?>
			<img src="" id="imglogo" class="thumbnail img-responsive" style="height: 120px;display: none;"/>
		  	<a href="javascript:;" onclick="openKCFinder('logo')" class="form-control" id="addlogo">Pilih Gambar</a>
		  	<a href="javascript:;" id="remlogo" style="display: none;">Hapus Logo</a>
		  	<input type="hidden" name="logo" id="logo" value="<?php 
Exemple #16
0
</div></div></div>
        </section>
      </div>

      <footer class="main-footer">
        <div class="pull-right hidden-xs">
          <b>Version</b> <?php 
echo optionGet('app_version');
?>
        </div>
        <strong>Thank you for creating with MinangCMS
      </footer>     
      <aside class="control-sidebar control-sidebar-dark">                        
        <div class="tab-content">          
          <div class="tab-pane" id="control-sidebar-home-tab">                       
          </div>          
        </div>
      </aside>
      <div class='control-sidebar-bg'></div>
    </div>    
    <script src="<?php 
echo locationAsset('url');
?>
plugins/bootstrap/js/bootstrap.js" type="text/javascript"></script>
    <script src="<?php 
echo locationAsset('url');
?>
themes/backend/lte/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
    <script src='<?php 
echo locationAsset('url');
?>
Exemple #17
0
<footer>
<hr style="border: 1px solid #D3D2D5"/>
<?php 
$copy = "";
$foot = mc_themeConfigGet("okto1", "footer");
if (empty($foot) or $foot == 'Copyright &copy; Heru Rahmat') {
    $copy = "Copyright &copy; " . date("Y") . " " . optionGet('site_title');
} else {
    $copy = $foot;
}
echo $copy;
?>
</footer>
</div>
    <script src="<?php 
echo locationTheme();
?>
frontend/okto1/plugins/jquery/jquery-1.11.3.min.js"></script>
    <script src="<?php 
echo locationTheme();
?>
frontend/okto1/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="<?php 
echo locationTheme();
?>
frontend/okto1/dist/js/custom.js"></script>
  </body>
</html>
Exemple #18
0
echo base_url();
?>
"><img src="<?php 
echo mc_logo();
?>
"/></a>
	</div>
	<div class="col-md-6">
		<div class="site-title">
		<?php 
echo optionGet('site_title');
?>
		</div>
		<div class="site-description">
		<?php 
echo optionGet('site_description');
?>
		</div>
	</div>
	<div class="col-md-3">
		<form class="search-box" method="get" action="<?php 
echo base_url();
?>
search">
			<input type="text" name="s" class="form-control" placeholder="cari.."/>
		</form>
	</div>
</div>
</div>
<div class="menu-header">
<nav class="navbar navbar-default" role="navigation">
Exemple #19
0
 function mc_commentPost($postid)
 {
     $CI =& get_instance();
     $opt = optionGet('site_comment');
     if ($opt == "1") {
         $CI->load->library('m_net');
         $param = array('id' => $postid);
         $j = $CI->m_net->curlNet("get", base_url() . 'service/post/comment/generate', $param);
         echo $j;
     } else {
         echo "Comment System Disabled";
     }
 }
Exemple #20
0
  <div class="box-tools pull-right">
    <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
  </div>
</div>
<div class="box-body">
  	<div class="form-group">
		<label for="addkeyword">Keyword Tambahan.<small>Pisahkan dengan koma</small></label>
		<input type="text" class="form-control" name="addkeyword" id="addkeyword" placeholder="keyword1,keyword2,keyword3" value="<?php 
echo set_value('addkeyword');
?>
"/>
	</div>
	<div class="form-group">
		<label for="komen">Komentar</label>
		<?php 
echo inputCheckbox("komen", "komen", optionGet('site_comment'), 'Aktifkan sistem Komentar pada ' . $mod . ' ini.Jika konfigurasi global dinonaktifkan maka komentar tidak terlihat');
?>
	
	</div>
	<div class="form-group">
		<label></label>
		<div class="radio" style="display: none;">
			<label class="radio-inline">
			<input type="radio" name="tampilan" value="sidebar" checked=""/> Dengan Sidebar
			</label>
			<label class="radio-inline">
			<input type="radio" name="tampilan" value="full"/> Tampilan penuh
			</label>			
		</div>
	</div>
</div>
Exemple #21
0
 function reorder2()
 {
     $i = 0;
     $theme = optionGet('theme_front');
     $menu = $this->input->get('menu');
     foreach ($_POST['menuItem'] as $k => $v) {
         $i += 1;
         $index = array_search($k, array_values($_POST['menuItem']));
         if ($v == 'null') {
             $d = array('order_term' => $index, 'term_parent' => '0');
             $s = array('term_id' => $k);
             $d2 = array('order_term' => $index, 'parent' => '0');
             $s2 = array('term_id' => $k, 'term_type' => 'menu_' . $menu . '_' . $theme);
             $this->m_database->editRow('terms', $d, $s);
             $this->m_database->editRow('termstaxonomy', $d2, $s2);
         } else {
             $d = array('term_parent' => $v, 'order_term' => $index);
             $s = array('term_id' => $k);
             $d2 = array('parent' => $v, 'order_term' => $index);
             $s2 = array('term_id' => $k, 'term_type' => 'menu_' . $menu . '_' . $theme);
             $this->m_database->editRow('terms', $d, $s);
             $this->m_database->editRow('termstaxonomy', $d2, $s2);
         }
     }
     echo json_encode('ok');
 }
Exemple #22
0
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body class="skin-black sidebar-mini">
    <div class="wrapper">
      
      <header class="main-header">
        <a href="<?php 
echo base_url(roleURIUser() . 'dashboard');
?>
" class="logo">
          <span class="logo-mini"><b>C</b>MS</span>
          <span class="logo-lg"><b><?php 
echo optionGet('app_name');
?>
</b></span>
        </a>
        <nav class="navbar navbar-static-top" role="navigation">
          <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
              
              <li class="dropdown user user-menu">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
Exemple #23
0
" target="_blank">Website</a> | 
						<a href="herurahmat.my.id/minang-cms-open-source-content-management-system/" target="_blank">Minang CMS</a> | 
						<a href="https://github.com/urangawak/minangcms" target="_blank">Github</a>
						</span>
					</ul>
				</div>
			</div>
		</nav>

        <!-- Top content -->
        <div class="top-content">
        	
            <div class="inner-bg">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-7 text">
                        	<img src="<?php 
echo mc_logo();
?>
"/>
                            <h1><strong><?php 
echo optionGet('company_name');
?>
</strong></h1>
                            <div class="description">
                            	<p>
                            	
                            	</p>
                            </div>                            
                        </div>
                        <div class="col-sm-5 form-box">
Exemple #24
0
 function recoveryDo($email)
 {
     $checkEmail = array('email' => $email);
     if ($this->CI->m_database->isBOF('userlogin', $checkEmail) == TRUE) {
         return false;
     } else {
         $userid = $this->CI->m_database->fieldRow('userlogin', $checkEmail, 'user_id');
         $this->CI->load->helper(array('url', 'string_helper'));
         $hash = stringRandom(40, TRUE);
         taxonomyCreate($userid, 'reset_user', $hash, 3600);
         $link = base_url() . 'recovery?email=' . $email . '&hash=' . $hash;
         $this->CI->load->library('m_net');
         $myMail = optionGet('company_email');
         $myName = optionGet('company_name');
         $subject = optionGet('email_recovery_subject');
         $message = optionGet('email_recovery_message');
         $output = '';
         $output .= $message . '<br/>';
         $output .= '<blockquote><a href="' . $link . '" target="_blank"><b>Reset Password</b></a></blockquote><br/>';
         $output .= '<hr/>';
         $output .= 'Regards,<br/><p>&nbsp;</p>';
         $output .= $myName;
         $this->CI->m_net->SendEmail($myMail, $myName, $email, $subject, $output, '', '');
         return true;
     }
 }
Exemple #25
0
</div>
</div>

<h3 class="heading-a">Optional</h3>
<div class="form-group">
	<label class="col-sm-2 control-label">Base Kategori</label>
	<div class="col-md-6">
		<input type="text" name="catbase" class="form-control" value="<?php 
echo optionGet('permalink_category');
?>
"/>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label">Base Tags</label>
	<div class="col-md-6">
		<input type="text" name="tagbase" class="form-control" value="<?php 
echo optionGet('permalink_tags');
?>
"/>
	</div>
</div>
<hr/>
<div class="form-group">
	<label class="col-sm-2 control-label">&nbsp;</label>
	<div class="col-md-6">
		<button type="submit" class="btn btn-primary btn-flat btn-md">Simpan</button>
	</div>
</div>
<?php 
echo form_close();
Exemple #26
0
<div class="row">
<a href="<?php 
echo base_url(roleURIUser() . 'style/templates/installer');
?>
" class="btn btn-md btn-default">Add New</a>
</div>
<p>&nbsp;</p>
<?php 
$d = getTheme('frontend');
$opt = optionGet('theme_front');
foreach ($d as $r) {
    $themeName = $r['name'];
    $themeImg = $r['thumb'];
    ?>
	
	<div class="col-sm-3 col-md-4">
    <div class="thumbnail" style="height: auto;">
      <img src="<?php 
    echo $themeImg;
    ?>
">
      <div class="caption">
        <h3><?php 
    echo $themeName;
    ?>
</h3>        
        <p>
        <?php 
    if ($opt != $themeName) {
        ?>
			<a href="<?php 
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label">Batas Login</label>
	<div class="col-md-1">
		<input type="number" name="bruceforcelimit" class="form-control" value="<?php 
echo optionGet('service_login_bruceforce_limit');
?>
"/>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label">Arahkan Gagal Login</label>
	<div class="col-md-7">
		<input type="url" name="bruceforcedirect" class="form-control" value="<?php 
echo optionGet('service_login_bruceforce_direct');
?>
"/>
	</div>
</div>
<hr/>
<h3 class="heading-a">Captcha</h3>
<?php 
$this->load->view('config/captchaconfig');
?>

</div>

</div>
<button type="submit" class="btn btn-primary btn-flat btn-md pull-right">Simpan Konfigurasi</button>
<?php 
Exemple #28
0
 function generateFeed($type = "atom", $view)
 {
     //$this->CI->load->library('ext/feed');
     require_once dirname(__FILE__) . '/ext/Feedweb.php';
     $this->CI->load->helper('text');
     $feed = new Feedweb();
     $this->CI->load->library('m_database');
     $maxDate = $this->CI->m_database->maxRow('posts', '', 'post_date');
     $feed->title = optionGet('site_title');
     $feed->description = optionGet('site_description');
     $feed->link = base_url();
     $feed->lang = "id";
     $feed->pubdate = $maxDate;
     $param = array('post_status' => 'publish');
     $dPost = mc_allpost($param, 'post_date DESC', '', 20);
     if ($dPost['jumlah'] > 0) {
         foreach ($dPost['data'] as $rPost) {
             $title = $rPost->post_title;
             $author = "";
             $url = permalinkPost($rPost->post_id);
             $date = $rPost->post_date;
             $desc = word_limiter($rPost->post_content, 50);
             if (!empty($rPost->post_user)) {
                 $author = dbField('userlogin', 'user_id', $rPost->post_user, 'nama');
             } else {
                 $author = "Administrator";
             }
             $feed->add($title, $author, $url, $date, $desc);
         }
     } else {
         $feed->add(optionGet('site_title'), optionGet('site_title'), base_url(), dateNow(TRUE), optionGet('site_description'));
     }
     $feed->render($type, $view);
 }
Exemple #29
0
echo optionGet('bing');
?>
" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Alexa Validate</label>
<div class="col-md-6">
	<input type="text" name="alexa" value="<?php 
echo optionGet('alexa');
?>
" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Facebook OG</label>
<div class="col-md-6">
	<?php 
echo inputCheckbox("ogfacebook", "", optionGet('ogfacebook'), 'Tampilan Thumbnail Facebook saat share');
?>
	<span class="text-info"><a href="http://ogp.me/" target="_blank">Cek lebih lengkap</a></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">&nbsp;</label>
<div class="col-md-6">
	<button type="submit" class="btn btn-primary btn-flat">Simpan Konfigurasi</button>
</div>
</div>
<?php 
echo form_close();
Exemple #30
0
<?php

$data = optionGet('captcha_data');
?>
<div class="form-group">
<label class="col-sm-2 control-label">Site Key</label>
<div class="col-md-6">
	<input type="text" name="json[sitekey]" class="form-control" value="<?php 
echo jsonDataDecode($data, "sitekey");
?>
" required=""/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Secret Key</label>
<div class="col-md-6">
	<input type="text" name="json[secretkey]" class="form-control" value="<?php 
echo jsonDataDecode($data, "secretkey");
?>
" required=""/>
</div>
</div>