Exemplo n.º 1
0
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  * 		http://example.com/index.php/welcome
  * 	- or -  
  * 		http://example.com/index.php/welcome/index
  * 	- or -
  * Since this controller is set as the default controller in 
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 public function get($genid = '')
 {
     $id = id_from_genid($genid);
     //Kullanıcı izni var mı?
     check_perm($id);
     $person = $this->db->select('id,name,first_name,last_name,gender,locale')->from('liste')->where('id', $id)->limit('1')->get()->row();
     if (!isset($person->id) || $person->id < 1) {
         show_error("Information Removed or Not Exists", "410", "Sorry for inconvenience");
     }
     $person->picture = site_url('picture/large/' . genid_from_id($person->id));
     //$person->picture = "http://graph.facebook.com/".$person->id."/picture?type=large";
     $data['person'] = $person;
     $data['same_last'] = $this->db->select('id,name')->from('liste')->where('last_name', $person->last_name)->where('id !=', $person->id)->limit('28')->get()->result();
     $data['same_first'] = $this->db->select('id,name')->from('liste')->where('first_name', $person->first_name)->where('id !=', $person->id)->limit('28')->get()->result();
     $data['same_wiki'] = $this->db->select('id,name,short_desc')->from('wiki')->or_where_in('last_name', array($person->first_name, $person->last_name))->limit('28')->get()->result();
     //Stats Ekle -> Viewed
     stats_add($person->id, "viewed");
     //$this->template->set_master_template('template_get');
     $this->template->write('title', convert_accented_characters($person->name));
     $this->template->write('description', 'about ' . convert_accented_characters($person->name));
     $this->template->write('name', convert_accented_characters($person->name));
     $this->template->write('image', site_url('picture/square/' . genid_from_id($person->id)));
     $this->template->write('picture', $person->picture);
     $this->template->write_view('page', 'face/get', $data);
     $this->template->render();
 }
Exemplo n.º 2
0
 public function large($genid = '')
 {
     redirect('http://graph.facebook.com/' . id_from_genid($genid) . '/picture?type=large', 'location', 301);
 }
Exemplo n.º 3
0
<?php

error_reporting(0);
$i = $_GET['id'];
//Sayfa Adresini Cikar
include './ba_cevir.php';
if (strlen($i) < 1) {
    die;
}
$i = id_from_genid($i);
//id kontrol
$i = (int) $i;
if ($i < 1) {
    die;
}
$link = @mysql_connect("127.0.0.1", "ann", "HypAIruV");
if (!$link) {
    //    die("DB Connection Problem");
    $link = @mysql_connect("localhost", "root", "berkant");
    @mysql_select_db("facefinder", $link) or die("DB Selection Problem");
    if (!$link) {
        die("DB Connection Problem");
    }
} else {
    @mysql_select_db("bari", $link) or die("DB Selection Problem");
}
$query = @mysql_query("SELECT * FROM liste WHERE id='{$i}'");
if (!$query) {
    die;
}
$data = @mysql_fetch_object($query);
Exemplo n.º 4
0
 public function facebook($genid = '')
 {
     redirect('http://facebook.com/profile.php?id=' . id_from_genid($genid), 'location', 301);
 }