This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$folder = 'img/'; | |
$images = glob($folder . "*"); | |
$i = 1; | |
foreach($images as $img) { | |
// echo $img . '<br>'; | |
rename($img, $folder . $i . '.jpg'); | |
$i++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php die("Access denied!"); | |
/** | |
* ---------------- DO NOT UPLOAD THIS FILE TO LIVE SERVER ------------------------ | |
* Laravel IDE Helper <http://LaravelBook.com> | |
* Implements code completion for Laravel 4 in JetBrains PhpStorm and SublimeText 2 | |
* -------------------------------------------------------------------------------- | |
*/ | |
/** | |
* @method static bool check() Determine if the current user is authenticated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
* statuses: | |
* 0 - banned | |
* 1 - member | |
* 2 - moderator | |
* 3 - admin | |
* | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bootstrap 101 Template</title> | |
<!-- Bootstrap --> | |
<link href="<?=base_url('theme/css/bootstrap.min.css')?>" rel="stylesheet" media="screen"> | |
<link href="<?=base_url('theme/css/site.css')?>" rel="stylesheet" media="screen"> | |
</head> | |
<body> | |
<div id="wrap"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function get_posts($start=0) | |
{ | |
$num = $this->get_value('numnews'); | |
if($num->numnews == FALSE){ | |
$num->numnews = 10; | |
} | |
return $this->db->select('post.*, GROUP_CONCAT(DISTINCT category.cat_name SEPARATOR ", ") AS categories', FALSE) | |
->join('postcat', 'post.id = postcat.postID', 'left') | |
->join('category', 'postcat.catID = category.categID', 'left') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function translit($string) { | |
$zamena = array( | |
"А" => "A", "а" => "a", "," => "", | |
"Б" => "B", "б" => "b", "(" => "", | |
"В" => "V", "в" => "v", ")" => "", | |
"Г" => "G", "г" => "g", "#" => "", | |
"Д" => "D", "д" => "d", "@" => "", | |
"Е" => "E", "е" => "e", "%" => "", | |
"Ё" => "YO", "ё" => "yo", "&" => "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->ci->load->config('users/ion_auth', TRUE); | |
$this->ci->load->library('email'); | |
$this->ci->load->library('session'); | |
$this->ci->lang->load('users/ion_auth'); | |
$this->ci->load->model('users/ion_auth_model'); |