├── .gitignore ├── LICENSE ├── README.md ├── core ├── autoload.php ├── controller │ ├── Action.php │ ├── Bootload.php │ ├── Cookie.php │ ├── Core.php │ ├── Database.php │ ├── Executor.php │ ├── Form.php │ ├── Get.php │ ├── Lb.php │ ├── Model.php │ ├── Module.php │ ├── Post.php │ ├── Request.php │ ├── RequestData.php │ ├── Session.php │ ├── View.php │ ├── class.upload.php │ └── forms │ │ ├── lbForm.php │ │ ├── lbInputPassword.php │ │ ├── lbInputText.php │ │ └── lbValidator.php └── modules │ └── index │ ├── action │ ├── _infomenu │ │ └── action-default.php │ ├── _mainmenu │ │ └── action-default.php │ ├── _newstatus │ │ └── action-default.php │ ├── _newteamstatus │ │ └── action-default.php │ ├── _photos │ │ └── action-default.php │ ├── _statuses │ │ └── action-default.php │ ├── _teambadge │ │ └── action-default.php │ ├── _teamstatuses │ │ └── action-default.php │ ├── _userbadge │ │ └── action-default.php │ ├── _usermenu │ │ └── action-default.php │ ├── acceptfriendreq │ │ └── action-default.php │ ├── actiontest │ │ └── action-default.php │ ├── addcomment │ │ └── action-default.php │ ├── addheart │ │ └── action-default.php │ ├── addpost │ │ └── action-default.php │ ├── addteam │ │ └── action-default.php │ ├── loadcomments │ │ └── action-default.php │ ├── processlogin │ │ └── action-default.php │ ├── processlogout │ │ └── action-default.php │ ├── processregister │ │ └── action-default.php │ ├── publish │ │ └── action-default.php │ ├── publishteam │ │ └── action-default.php │ ├── sendfriendreq │ │ └── action-default.php │ ├── sendmsg │ │ └── action-default.php │ ├── updatebasicinfo │ │ └── action-default.php │ ├── updateconfiguration │ │ └── action-default.php │ ├── updateinformation │ │ └── action-default.php │ ├── updatepassword │ │ └── action-default.php │ ├── updatepost │ │ └── action-default.php │ └── updateteaminformation │ │ └── action-default.php │ ├── autoload.php │ ├── init.php │ ├── model.xml │ ├── model │ ├── CommentData.php │ ├── ConversationData.php │ ├── CountryData.php │ ├── FriendData.php │ ├── HeartData.php │ ├── ImageData.php │ ├── LevelData.php │ ├── MessageData.php │ ├── NotificationData.php │ ├── PostData.php │ ├── PostImageData.php │ ├── ProfileData.php │ ├── SentimentalData.php │ ├── TeamData.php │ └── UserData.php │ ├── superboot.php │ └── view │ ├── changelog │ └── widget-default.php │ ├── configuration │ └── widget-default.php │ ├── conversation │ └── widget-default.php │ ├── conversations │ └── widget-default.php │ ├── editbasicinfo │ └── widget-default.php │ ├── editinformation │ └── widget-default.php │ ├── editteam │ └── widget-default.php │ ├── friendreqs │ └── widget-default.php │ ├── friends │ └── widget-default.php │ ├── home │ └── widget-default.php │ ├── index │ └── widget-default.php │ ├── layout.php │ ├── myfriends │ └── widget-default.php │ ├── myphotos │ └── widget-default.php │ ├── notifications │ └── widget-default.php │ ├── photos │ └── widget-default.php │ ├── search │ └── widget-default.php │ ├── sendmsg │ └── widget-default.php │ ├── team │ └── widget-default.php │ ├── teams │ └── widget-default.php │ ├── user │ └── widget-default.php │ └── userinfo │ └── widget-default.php ├── index.php ├── res ├── bootstrap │ ├── css │ │ ├── bootstrap-lumen.min.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ └── bootstrap.min.css │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ └── npm.js ├── css │ └── micss.css ├── font-awesome │ ├── css │ │ ├── font-awesome.css │ │ └── font-awesome.min.css │ └── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── jquery.min.js ├── js │ └── funciones.js ├── main.png └── messages.css └── schema.sql /.gitignore: -------------------------------------------------------------------------------- 1 | storage/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Agustin Ramos Escalante 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SMILE 2 | Red social de proposito general con PHP y MySQL 3 | 4 | ### Descripcion 5 | SMILE es un sistema de red social en el que podemos rellenar nuestro perfil, hacer publicaciones de texto y/o imagenes, buscar amigos, enviar, recibir y aceptar solicitudes de amistad y enviar mensajes a amigos, comentar y/o dar likes a las publicaciones, recibir notificaciones y mucho mas. 6 | 7 | ### Dedicatoria 8 | Este sistema se lo dedico a mis padres(Agustin Ramos de la Cruz y Maria de Lourdes Escalante Mendez) por que desde que empece en el mundo de las computadoras ellos me dieron su apoyo emocional y economico, me compraron computadoras, me pagaron mis estudios universitarios, estoy muy agradecido con ellos, los amo. 9 | 10 | ### Modulos 11 | Defino a grandes rasgos los modulos generales del sistema 12 | 13 | - Usuarios 14 | - Publicaciones 15 | - Perfiles 16 | - Likes 17 | - Comentarios 18 | - Imagenes 19 | - Amigos 20 | - Mensajes 21 | - Notificaciones 22 | 23 | ### Bugs conocidos 24 | Todavia no lo he probado al 100%, pero escribo algunas cosas que no he programado pero las ire haciendo poco a poco. 25 | 26 | - Modulo de super administrador: permitira tener el control total de todo el sistema, no desarrollado. 27 | - Notificaciones por correo: el sistema no envia ninguna notificacion al correo, para nada. 28 | - Privacidad: Otros usuarios pueden ver y comentar aun sin ser amigos. 29 | -------------------------------------------------------------------------------- /core/autoload.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/controller/Action.php: -------------------------------------------------------------------------------- 1 | 404 NOT FOUND Action ".$_GET['action']." folder !!"); 25 | } 26 | 27 | 28 | 29 | } 30 | } 31 | 32 | /** 33 | * @function isValid 34 | * @brief valida la existencia de una vista 35 | **/ 36 | public static function isValid(){ 37 | $valid=false; 38 | if(file_exists($file = "core/modules/".Module::$module."/action/".$_GET['action']."/action-default.php")){ 39 | $valid = true; 40 | } 41 | return $valid; 42 | } 43 | 44 | public static function Error($message){ 45 | print $message; 46 | } 47 | 48 | public static function execute($action,$params){ 49 | $fullpath = "core/modules/".Module::$module."/action/".$action."/action-default.php"; 50 | if(file_exists($fullpath)){ 51 | include $fullpath; 52 | }else{ 53 | assert("wtf"); 54 | } 55 | } 56 | 57 | } 58 | 59 | 60 | 61 | ?> -------------------------------------------------------------------------------- /core/controller/Bootload.php: -------------------------------------------------------------------------------- 1 | 404 NOT FOUND Boot ".$_GET['view']." folder !!"); 25 | } 26 | 27 | } 28 | } 29 | 30 | /** 31 | * @function isValid 32 | * @brief valida la existencia de una vista 33 | **/ 34 | public static function isValid(){ 35 | $valid=false; 36 | if(file_exists($file = "core/modules/".Module::$module."/boot/".$_GET['view']."/boot-default.php")){ 37 | $valid = true; 38 | } 39 | return $valid; 40 | } 41 | 42 | public static function Error($message){ 43 | print $message; 44 | } 45 | 46 | } 47 | 48 | 49 | 50 | 51 | ?> -------------------------------------------------------------------------------- /core/controller/Cookie.php: -------------------------------------------------------------------------------- 1 | exist($value)){ 11 | print "COOKIE ERROR El parametro $value que intentas llamar no existe!"; 12 | die(); 13 | } 14 | return $_COOKIE[$value]; 15 | } 16 | 17 | function exist($value){ 18 | $found = false; 19 | if(isset($_COOKIE[$value])){ 20 | $found=true; 21 | } 22 | return $found; 23 | } 24 | } 25 | 26 | 27 | 28 | ?> -------------------------------------------------------------------------------- /core/controller/Core.php: -------------------------------------------------------------------------------- 1 | "; 19 | 20 | } 21 | } 22 | } 23 | closedir($handle); 24 | } 25 | 26 | } 27 | 28 | public static function redir($url){ 29 | echo ""; 30 | } 31 | 32 | public static function alert($text){ 33 | echo ""; 34 | } 35 | 36 | public static function includeJS(){ 37 | $path = "res/js/"; 38 | $handle=opendir($path); 39 | if($handle){ 40 | while (false !== ($entry = readdir($handle))) { 41 | if($entry!="." && $entry!=".."){ 42 | $fullpath = $path.$entry; 43 | if(!is_dir($fullpath)){ 44 | echo ""; 45 | 46 | } 47 | } 48 | } 49 | closedir($handle); 50 | } 51 | 52 | } 53 | 54 | } 55 | 56 | 57 | 58 | ?> -------------------------------------------------------------------------------- /core/controller/Database.php: -------------------------------------------------------------------------------- 1 | user="root";$this->pass="";$this->host="localhost";$this->ddbb="smile"; 7 | } 8 | 9 | function connect(){ 10 | $con = new mysqli($this->host,$this->user,$this->pass,$this->ddbb); 11 | return $con; 12 | } 13 | 14 | public static function getCon(){ 15 | if(self::$con==null && self::$db==null){ 16 | self::$db = new Database(); 17 | self::$con = self::$db->connect(); 18 | } 19 | return self::$con; 20 | } 21 | 22 | } 23 | ?> 24 | -------------------------------------------------------------------------------- /core/controller/Executor.php: -------------------------------------------------------------------------------- 1 | query($sql),$con->insert_id); 8 | } 9 | } 10 | ?> -------------------------------------------------------------------------------- /core/controller/Form.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/controller/Get.php: -------------------------------------------------------------------------------- 1 | exist($value)){ 11 | print "GET ERROR El parametro $value que intentas llamar no existe!"; 12 | die(); 13 | } 14 | return $_GET[$value]; 15 | } 16 | 17 | function exist($value){ 18 | $found = false; 19 | if(isset($_GET[$value])){ 20 | $found=true; 21 | } 22 | return $found; 23 | } 24 | } 25 | 26 | 27 | 28 | ?> -------------------------------------------------------------------------------- /core/controller/Lb.php: -------------------------------------------------------------------------------- 1 | get = new Get(); 12 | $this->post = new Post(); 13 | $this->request = new Request(); 14 | $this->cookie = new Cookie(); 15 | $this->session = new Session(); 16 | } 17 | 18 | public function loadModule($module){ 19 | if(!isset($_GET['module'])){ 20 | Module::setModule($module); 21 | include "core/modules/".$module."/autoload.php"; 22 | include "core/modules/".$module."/superboot.php"; 23 | include "core/modules/".$module."/init.php"; 24 | }else{ 25 | Module::setModule($_GET['module']); 26 | if(Module::isValid()){ 27 | include "core/modules/".$_GET['module']."/init.php"; 28 | }else { 29 | Module::Error(); 30 | } 31 | } 32 | 33 | } 34 | 35 | } 36 | 37 | ?> -------------------------------------------------------------------------------- /core/controller/Model.php: -------------------------------------------------------------------------------- 1 | fetch_array()){ 28 | $array[$cnt] = new $aclass; 29 | $cnt2=1; 30 | foreach ($r as $key => $v) { 31 | if($cnt2>0 && $cnt2%2==0){ 32 | $array[$cnt]->$key = $v; 33 | } 34 | $cnt2++; 35 | } 36 | $cnt++; 37 | } 38 | return $array; 39 | } 40 | ////////////////////////////////// 41 | public static function one($query,$aclass){ 42 | $cnt = 0; 43 | $found = null; 44 | $data = new $aclass; 45 | while($r = $query->fetch_array()){ 46 | $cnt=1; 47 | foreach ($r as $key => $v) { 48 | if($cnt>0 && $cnt%2==0){ 49 | $data->$key = $v; 50 | } 51 | $cnt++; 52 | } 53 | 54 | $found = $data; 55 | break; 56 | } 57 | return $found; 58 | } 59 | 60 | } 61 | 62 | 63 | 64 | ?> -------------------------------------------------------------------------------- /core/controller/Module.php: -------------------------------------------------------------------------------- 1 | 404 NOT FOUND Module ".Module::$module." folder !!"; } 30 | 31 | 32 | return $valid; 33 | } 34 | 35 | public static function Error(){ 36 | echo self::$message; 37 | die(); 38 | } 39 | 40 | } 41 | 42 | 43 | 44 | ?> -------------------------------------------------------------------------------- /core/controller/Post.php: -------------------------------------------------------------------------------- 1 | exist($value)){ 11 | print "POST ERROR El parametro $value que intentas llamar no existe!"; 12 | die(); 13 | } 14 | return $_POST[$value]; 15 | } 16 | 17 | function exist($value){ 18 | $found = false; 19 | if(isset($_POST[$value])){ 20 | $found=true; 21 | } 22 | return $found; 23 | } 24 | } 25 | 26 | 27 | 28 | ?> -------------------------------------------------------------------------------- /core/controller/Request.php: -------------------------------------------------------------------------------- 1 | exist($value)){ 11 | print "REQUEST ERROR El parametro $value que intentas llamar no existe!"; 12 | die(); 13 | } 14 | return $_REQUEST[$value]; 15 | } 16 | 17 | function exist($value){ 18 | $found = false; 19 | if(isset($_REQUEST[$value])){ 20 | $found=true; 21 | } 22 | return $found; 23 | } 24 | } 25 | 26 | 27 | 28 | ?> -------------------------------------------------------------------------------- /core/controller/RequestData.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/core/controller/RequestData.php -------------------------------------------------------------------------------- /core/controller/Session.php: -------------------------------------------------------------------------------- 1 | $message

"; 34 | unset($_SESSION[$name]); 35 | } 36 | } 37 | 38 | public static function set($key,$value){ 39 | $_SESSION[$key]=$value; 40 | 41 | } 42 | 43 | public static function delete($key){ 44 | unset($_SESSION[$key]); 45 | } 46 | 47 | 48 | public function setFlashMsg($name,$message){ 49 | Session::set("_flash_".$name,$message); 50 | } 51 | 52 | public function getFlashMsgs(){ 53 | $arr = array(); 54 | foreach($_SESSION as $k=>$v){ 55 | $trig = "_flash_"; 56 | //echo $session; 57 | if(strlen($k)>strlen($trig)){ 58 | $fl = substr($k, 0,strlen($trig)); 59 | if($fl==$trig){ 60 | $arr[]=Session::get($k); 61 | Session::delete($k); 62 | } 63 | } 64 | } 65 | return $arr; 66 | } 67 | 68 | 69 | public function deleteFlashMsg($name){ 70 | Session::delete("_flash_".$name); 71 | } 72 | 73 | 74 | public function getFlashMsg($name){ 75 | if(Session::exists("_flash_".$name)){ 76 | print_r($_SESSION[$name]); 77 | $v= Session::get("_flash_".$name); 78 | Session::deleteFlashMsg($name); 79 | return $v; 80 | }else{ 81 | return false; 82 | } 83 | } 84 | 85 | } 86 | 87 | 88 | 89 | ?> -------------------------------------------------------------------------------- /core/controller/View.php: -------------------------------------------------------------------------------- 1 | 404 NOT FOUND View ".$_GET['view']." folder !!"); 24 | } 25 | 26 | 27 | 28 | } 29 | } 30 | 31 | /** 32 | * @function isValid 33 | * @brief valida la existencia de una vista 34 | **/ 35 | public static function isValid(){ 36 | $valid=false; 37 | if(isset($_GET["view"])){ 38 | if(file_exists($file = "core/modules/".Module::$module."/view/".$_GET['view']."/widget-default.php")){ 39 | $valid = true; 40 | } 41 | } 42 | return $valid; 43 | } 44 | 45 | public static function Error($message){ 46 | print $message; 47 | } 48 | 49 | } 50 | 51 | 52 | 53 | ?> -------------------------------------------------------------------------------- /core/controller/forms/lbForm.php: -------------------------------------------------------------------------------- 1 | field = array(); 6 | } 7 | 8 | public function addField($name,$field){ 9 | $this->field[$name] = $field; 10 | } 11 | 12 | public function render($field){ 13 | return $this->getField($field)->render(); 14 | 15 | } 16 | 17 | public function label($field){ 18 | return $this->getField($field)->renderLabel(); 19 | 20 | } 21 | 22 | 23 | public function getField($name){ 24 | $field = $this->field[$name]['type']; 25 | $field->setName($name); 26 | return $field; 27 | } 28 | } 29 | 30 | ?> -------------------------------------------------------------------------------- /core/controller/forms/lbInputPassword.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/controller/forms/lbInputText.php: -------------------------------------------------------------------------------- 1 | config = $config; 6 | 7 | } 8 | public function setName($name){ $this->name = $name;} 9 | public function render(){ return ""; } 10 | public function renderLabel(){ return $this->config['label']; } 11 | } 12 | 13 | ?> -------------------------------------------------------------------------------- /core/controller/forms/lbValidator.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/modules/index/action/_infomenu/action-default.php: -------------------------------------------------------------------------------- 1 |
2 | Informacion Personal 3 | Informacion Basica 4 | 5 |
6 | -------------------------------------------------------------------------------- /core/modules/index/action/_mainmenu/action-default.php: -------------------------------------------------------------------------------- 1 | id); 3 | $images = ImageData::countByUserId(Session::$user->id); 4 | ?> 5 |
6 | Amigos c; ?> 7 | Fotos c; ?> 8 | Mensajes 9 | Grupos 10 | 11 |
12 | -------------------------------------------------------------------------------- /core/modules/index/action/_newstatus/action-default.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 |
9 | Publicar Estado 10 |
11 |
12 |
13 |
14 | 15 | 16 | 17 |
18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | 30 |
31 |
32 | 33 | 34 |
35 | 36 |
37 |
38 |
39 |
40 |
41 |
-------------------------------------------------------------------------------- /core/modules/index/action/_newteamstatus/action-default.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 |
9 | Publicar Estado 10 |
11 |
12 |
13 |
14 | 15 | 16 | "> 17 |
18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | 30 |
31 |
32 | 33 | 34 |
35 | 36 |
37 |
38 |
39 |
40 |
41 |
-------------------------------------------------------------------------------- /core/modules/index/action/_photos/action-default.php: -------------------------------------------------------------------------------- 1 | 8 | id); 14 | ?> 15 | 0):?> 16 |
17 | 18 | getPIS(); 22 | ?> 23 | 24 | 86 | 87 | 88 |
25 |
26 | getUser(); 28 | $pf = ProfileData::getByUserId($authordata->id); 29 | if($pf->image!=""):?> 30 | id."/profile/".$pf->image;?>" class="img-circle" style="width:38px;float:left;"> 31 | 32 |

getFullname();?>

33 |

created_at));?>

34 |
35 |
36 |

title; ?>

37 | getFullpath(); 39 | if(file_exists($fullpath)):?> 40 | 41 | 42 |
43 | 44 |

45 | id,$user->id,2); 49 | } 50 | $c = HeartData::countByRT($p->id,2)->c; 51 | $b = "btn-default"; 52 | if($l!=null){ $b="btn-primary";} 53 | ?> 54 | 55 | 0){ echo $c;}?> 56 | 57 | 0){ echo $c;}?> 58 | 59 |

60 |
61 | 64 | 65 |
66 |
67 | 68 | 69 | 70 |
71 |
72 | 83 | 84 |
85 |
89 |
90 | 91 |
92 |

No hay fotos

93 |
94 | 95 | -------------------------------------------------------------------------------- /core/modules/index/action/_statuses/action-default.php: -------------------------------------------------------------------------------- 1 | 8 | id); 14 | ?> 15 | 0):?> 16 |
17 | 18 | getPIS(); 22 | ?> 23 | 24 | 131 | 132 | 133 |
25 |
26 | getAuthor(); 28 | $pf = ProfileData::getByUserId($authordata->id); 29 | if($pf->image!=""):?> 30 | id."/profile/".$pf->image;?>" class="img-circle" style="width:38px;float:left;"> 31 | 32 |

getFullname();?>

33 |

created_at));?>

34 |
35 |
36 | $0', $p->content); 40 | 41 | ?> 42 |

43 | id); 45 | if(count($pis)==1):?> 46 | 47 | getImage()->getFullpath(); 49 | if(file_exists($fullpath)):?> 50 | 51 | 52 | 53 | 54 | 55 | 84 | 85 | 86 |
87 | 88 | 89 |

90 | id,$user->id,1); 94 | } 95 | $c = HeartData::countByRT($p->id,1)->c; 96 | $b = "btn-default"; 97 | if($l!=null){ $b="btn-primary";} 98 | ?> 99 | 100 | 0){ echo $c;}?> 101 | 102 | 0){ echo $c;}?> 103 | 104 |

105 |
106 | 109 | 110 |
111 |
112 | 113 | 114 | 115 |
116 |
117 | 128 | 129 |
130 |
134 |
135 | 136 |
137 |

No hay publicaciones

138 |
139 | 140 | -------------------------------------------------------------------------------- /core/modules/index/action/_teambadge/action-default.php: -------------------------------------------------------------------------------- 1 | id."/".$team->image; 6 | $gotourl = ""; 7 | $gotourl= "./?view=team&id=".$team->id; 8 | ?> 9 |
10 |
11 |
12 | image!=""):?> 13 | 14 | 15 | [No hay Imagen] 16 | 17 |
18 |
19 |
title; ?>
20 | user_id==Session::$user->id):?> 21 | Editar Informacion 22 | 23 |
24 |
25 |
-------------------------------------------------------------------------------- /core/modules/index/action/_teamstatuses/action-default.php: -------------------------------------------------------------------------------- 1 | 8 | id,$team_id); 14 | ?> 15 | 0):?> 16 |
17 | 18 | getPIS(); 22 | ?> 23 | 24 | 133 | 134 | 135 |
25 |
26 | getAuthor(); 28 | $pf = ProfileData::getByUserId($authordata->id); 29 | if($pf->image!=""):?> 30 | id."/profile/".$pf->image;?>" class="img-circle" style="width:38px;float:left;"> 31 | 32 |

getFullname();?>

33 |

created_at));?>

34 |
35 |
36 | 37 | $0', $p->content); 41 | 42 | ?> 43 |

44 | 45 | 46 | 47 | id); 49 | if(count($pis)==1):?> 50 | 51 | getImage()->getFullpath(); 53 | if(file_exists($fullpath)):?> 54 | 55 | 56 | 57 | 58 | 59 | 88 | 89 | 90 |
91 | 92 | 93 |

94 | id,$user->id,1); 98 | // } 99 | $c = HeartData::countByRT($p->id,1)->c; 100 | $b = "btn-default"; 101 | if($l!=null){ $b="btn-primary";} 102 | ?> 103 | 104 | 0){ echo $c;}?> 105 | 106 | 0){ echo $c;}?> 107 | 108 |

109 |
110 | 113 |
114 |
115 | 116 | 117 | 118 |
119 |
120 | 131 |
132 |
136 |
137 | 138 |
139 |

No hay publicaciones

140 |
141 | 142 | -------------------------------------------------------------------------------- /core/modules/index/action/_userbadge/action-default.php: -------------------------------------------------------------------------------- 1 | id."/profile/".$profile->image; 7 | $gotourl = ""; 8 | if($from=="logged" && $user->id==$_SESSION["user_id"]){ $gotourl = "./?view=home"; } 9 | else{ $gotourl= "./?view=user&id=".$user->id; } 10 | ?> 11 |
12 |
13 |
14 | image!=""):?> 15 | 16 | 17 | [No hay Imagen] 18 | 19 |
20 |
21 |
getFullname(); ?>
22 | 23 | 24 | 25 | id==Session::$user->id):?> 26 | Editar Informacion 27 | id); 29 | ?> 30 | 31 | Solicitud de Amistad 32 | 33 | is_accepted):?> 34 | 35 | 36 | id):?> 37 | 38 | read(); 40 | ?> 41 | Aceptar Solicitud 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |
50 |
51 |
-------------------------------------------------------------------------------- /core/modules/index/action/_usermenu/action-default.php: -------------------------------------------------------------------------------- 1 | 4 |
5 | Informacion 6 | Amigos 7 | Fotos 8 |
-------------------------------------------------------------------------------- /core/modules/index/action/acceptfriendreq/action-default.php: -------------------------------------------------------------------------------- 1 | accept(); 6 | Core::redir("./?view=user&id=".$_GET["recid"]); 7 | } 8 | 9 | 10 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/actiontest/action-default.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/modules/index/action/addcomment/action-default.php: -------------------------------------------------------------------------------- 1 | ref_id = $_POST["r"]; 10 | $h->user_id = $_SESSION["user_id"]; 11 | $h->type_id = $_POST["t"]; 12 | $h->content = $_POST["content"]; 13 | $h->add(); 14 | 15 | $user_id = null; 16 | $author_id = null; 17 | if($_POST["t"]==1){ 18 | $post = PostData::getReceptorId($_POST["r"]); 19 | $user_id = $post->receptor_ref_id; 20 | $author_id = $post->author_ref_id; 21 | } 22 | else if($_POST["t"]==2){ 23 | $post = ImageData::getUserId($_POST["r"]); 24 | $user_id = $post->user_id; 25 | $author_id = $post->user_id; 26 | } 27 | 28 | if($author_id!=$_SESSION["user_id"] && $user_id!=$_SESSION["user_id"]){ // si es el mismo autor del post, entonces no le notificamos 29 | $notification = new NotificationData(); 30 | $notification->not_type_id=2; // comment 31 | $notification->type_id = $_POST["t"]; // al mismo que nos referenciamos en al crear el comentario 32 | $notification->ref_id = $_POST["r"]; // = 33 | $notification->receptor_id = $user_id; // en este caso nos referimos a quien va dirigida la notificacion 34 | $notification->sender_id = $_SESSION["user_id"]; // ahora al usuario implicado 35 | $notification->add(); 36 | } 37 | 38 | 39 | } 40 | } 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /core/modules/index/action/addheart/action-default.php: -------------------------------------------------------------------------------- 1 | ref_id = $_POST["r"]; 12 | $h->user_id = $_SESSION["user_id"]; 13 | $h->type_id = $_POST["t"]; 14 | $h->add(); 15 | echo HeartData::countByRT($_POST["r"],$_POST["t"])->c; 16 | /////////// send notifications 17 | $user_id = null; 18 | $author_id = null; 19 | if($_POST["t"]==1){ 20 | $post = PostData::getReceptorId($_POST["r"]); 21 | $user_id = $post->receptor_ref_id; 22 | $author_id = $post->author_ref_id; 23 | } 24 | else if($_POST["t"]==2){ 25 | $post = ImageData::getUserId($_POST["r"]); 26 | $user_id = $post->user_id; 27 | $author_id = $post->user_id; 28 | } 29 | 30 | if($author_id!=$_SESSION["user_id"] && $user_id!=$_SESSION["user_id"]){ // si es el mismo autor del post, entonces no le notificamos 31 | $notification = new NotificationData(); 32 | $notification->not_type_id=1; // like 33 | $notification->type_id = $_POST["t"]; // al mismo que nos referenciamos en al crear el comentario 34 | $notification->ref_id = $_POST["r"]; // = 35 | $notification->receptor_id = $user_id; // en este caso nos referimos a quien va dirigida la notificacion 36 | $notification->sender_id = $_SESSION["user_id"]; // ahora al usuario implicado 37 | $notification->add(); 38 | } 39 | 40 | /////////// 41 | 42 | 43 | } 44 | } 45 | 46 | ?> 47 | -------------------------------------------------------------------------------- /core/modules/index/action/addpost/action-default.php: -------------------------------------------------------------------------------- 1 | title = $_POST['title']; 5 | $p->content = $_POST['content']; 6 | $public =0; 7 | if(isset($_POST['is_public'])){ $public=1; } 8 | 9 | $p->is_public = $public; 10 | $p->user_id = 1; 11 | $p->add(); 12 | 13 | // setcookie("added",$p->title); 14 | 15 | print ""; 16 | } 17 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/addteam/action-default.php: -------------------------------------------------------------------------------- 1 | title = $_POST["title"]; 6 | $t->user_id = $_SESSION["user_id"]; 7 | $ti = $t->add(); 8 | 9 | Core::redir("./?view=team&id=".$ti[1]); 10 | } 11 | Core::redir("./"); 12 | 13 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/loadcomments/action-default.php: -------------------------------------------------------------------------------- 1 | 4 | 0):?> 5 |
6 |
7 | 18 |
19 | 20 | -------------------------------------------------------------------------------- /core/modules/index/action/processlogin/action-default.php: -------------------------------------------------------------------------------- 1 | is_active){ 11 | Session::set("user_id",$user->id); 12 | Core::redir("./?view=home"); 13 | }else{ 14 | Session::set("user_id",$user->id); 15 | Core::alert("Debes verificar tu correo electronico, tu uso de SMILE estara limitado."); 16 | Core::redir("./?view=home"); 17 | } 18 | }else{ 19 | Core::alert("Datos incorrectos"); 20 | Core::redir("./"); 21 | } 22 | }else{ 23 | Core::alert("Datos vacios"); 24 | Core::redir("./"); 25 | } 26 | } 27 | 28 | 29 | 30 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/processlogout/action-default.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/modules/index/action/processregister/action-default.php: -------------------------------------------------------------------------------- 1 | name = $_POST["name"]; 20 | $user->lastname = $_POST["lastname"]; 21 | $user->email = $_POST["email"]; 22 | $user->password = sha1(md5($_POST["password"])); 23 | $user->code = $code; 24 | $u = $user->add(); 25 | 26 | $p = new ProfileData(); 27 | $p->user_id = $u[1]; 28 | $p->add(); 29 | 30 | 31 | $msg = "

Registro Exitoso

32 |

Ahora debes activar tu cuenta en el siguiente link:

33 |

Activa tu cuenta:

34 |

O tambien puedes usar el siguiente codigo de activacion: ".$code."

35 | "; 36 | 37 | mail($_POST["email"], "Registro Exitoso", $msg); 38 | /* $f = fopen (ROOT."/register.txt","w"); 39 | fwrite($f, $msg); 40 | fclose($f); 41 | */ 42 | Core::alert("Registro Exitoso!, se ha enviado un correo electronico con los datos necesarios para activar su cuenta."); 43 | Core::redir("./"); 44 | }else{ 45 | Core::alert("El email proporcionado ya esta registrado."); 46 | Core::redir("./"); 47 | 48 | } 49 | }else{ 50 | Core::alert("No puede dejar campos vacios"); 51 | Core::redir("./"); 52 | } 53 | } 54 | 55 | // Core::redir("./"); 56 | //View::render($this,"index",array("meta"=>$meta)); 57 | 58 | 59 | 60 | 61 | 62 | 63 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/publish/action-default.php: -------------------------------------------------------------------------------- 1 | uploaded) { 12 | $url="storage/users/$_SESSION[user_id]/images/"; 13 | $handle->Process($url); 14 | // $handle->file_dst_name; 15 | $image=new ImageData(); 16 | $image->src=$handle->file_dst_name; 17 | $image->level_id = $_POST["level_id"]; 18 | $image->user_id = $_SESSION["user_id"]; 19 | $image_id = $image->add(); 20 | } 21 | 22 | $post_id = 0; 23 | if($_POST["content"]!=""){ 24 | $post = new PostData(); 25 | $post->content = $_POST["content"]; 26 | $post->level_id = $_POST["level_id"]; 27 | $post->receptor_type_id = 1; 28 | $post->author_ref_id = $_SESSION["user_id"]; 29 | $post->receptor_ref_id = $_SESSION["user_id"]; 30 | $post_id= $post->add(); 31 | 32 | if($handle->uploaded){ 33 | $pi = new PostImageData(); 34 | $pi->post_id = $post_id[1]; 35 | $pi->image_id = $image_id[1]; 36 | $pi->add(); 37 | } 38 | } 39 | Core::redir("./?view=home"); 40 | } 41 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/publishteam/action-default.php: -------------------------------------------------------------------------------- 1 | uploaded) { 13 | $url="storage/users/$_SESSION[user_id]/images/"; 14 | $handle->Process($url); 15 | // $handle->file_dst_name; 16 | $image=new ImageData(); 17 | $image->src=$handle->file_dst_name; 18 | $image->level_id = $_POST["level_id"]; 19 | $image->user_id = $_SESSION["user_id"]; 20 | $image_id = $image->add(); 21 | } 22 | 23 | $post_id = 0; 24 | if($_POST["content"]!=""){ 25 | $post = new PostData(); 26 | $post->content = $_POST["content"]; 27 | $post->level_id = $_POST["level_id"]; 28 | $post->author_ref_id = $_SESSION["user_id"]; 29 | $post->receptor_type_id = 2; 30 | $post->receptor_ref_id = $_POST["receptor_ref_id"]; 31 | $post_id= $post->add(); 32 | 33 | if($handle->uploaded){ 34 | $pi = new PostImageData(); 35 | $pi->post_id = $post_id[1]; 36 | $pi->image_id = $image_id[1]; 37 | $pi->add(); 38 | } 39 | } 40 | Core::redir("./?view=team&id=$_POST[receptor_ref_id]"); 41 | } 42 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/sendfriendreq/action-default.php: -------------------------------------------------------------------------------- 1 | sender_id = $_SESSION["user_id"]; 8 | $fs->receptor_id = $_GET["recid"]; 9 | $fs->add(); 10 | } 11 | Core::redir("./?view=user&id=".$_GET["recid"]); 12 | } 13 | 14 | 15 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/sendmsg/action-default.php: -------------------------------------------------------------------------------- 1 | sender_id = $_SESSION["user_id"]; 11 | $c->receptor_id = $_POST["receptor_id"]; 12 | $cx=$c->add(); 13 | $convid = $cx[1]; 14 | }else{ 15 | $convid = $conv->id; 16 | } 17 | }else if($_POST["ref"]=="conversation"){ 18 | $convid=$_POST["conversation_id"]; 19 | } 20 | 21 | $msg = new MessageData(); 22 | $msg->user_id = $_SESSION["user_id"]; 23 | $msg->conversation_id = $convid; 24 | $msg->content = $_POST["content"]; 25 | $msg->add(); 26 | } 27 | 28 | if($_POST["ref"]=="new"){ 29 | Core::redir("./?view=conversations"); 30 | }else if($_POST["ref"]=="conversation"){ 31 | Core::redir("./?view=conversation&id=".$convid); 32 | } 33 | 34 | 35 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/updatebasicinfo/action-default.php: -------------------------------------------------------------------------------- 1 | day_of_birth =$_POST["day_of_birth"]; 6 | $profile->gender =$_POST["gender"]; 7 | $profile->country_id =$_POST["country_id"]; 8 | $profile->sentimental_id =$_POST["sentimental_id"]; 9 | 10 | 11 | 12 | 13 | $profile->update_basic(); 14 | Core::redir("./?view=editbasicinfo"); 15 | } 16 | 17 | 18 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/updateconfiguration/action-default.php: -------------------------------------------------------------------------------- 1 | username = $_POST["username"]; 8 | $user->name = $_POST["name"]; 9 | $user->lastname = $_POST["lastname"]; 10 | $user->email = $_POST["email"]; 11 | $user->is_active = $is_active; 12 | $user->update(); 13 | Core::redir("./?view=configuration"); 14 | } 15 | 16 | 17 | 18 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/updateinformation/action-default.php: -------------------------------------------------------------------------------- 1 | title =$_POST["title"]; 6 | $profile->bio =$_POST["bio"]; 7 | $profile->likes =$_POST["likes"]; 8 | $profile->dislikes =$_POST["dislikes"]; 9 | 10 | 11 | $image = new Upload($_FILES["image"]); 12 | if($image->uploaded){ 13 | $image->Process("storage/users/".$_SESSION["user_id"]."/profile/"); 14 | if($image->processed){ 15 | $profile->image = $image->file_dst_name; 16 | }else{ 17 | echo "Error: ".$image->error; 18 | } 19 | } 20 | 21 | $profile->update_info(); 22 | Core::redir("./?view=editinformation"); 23 | } 24 | 25 | 26 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/updatepassword/action-default.php: -------------------------------------------------------------------------------- 1 | password==sha1(md5($_POST["password"])) ){ 10 | if($_POST["new_password"]==$_POST["confirm_password"]){ 11 | 12 | $user->password = sha1(md5($_POST["new_password"])); 13 | $user->update_passwd(); 14 | $_SESSION["password_updated"]=true; 15 | Core::alert("La contrase~a ha sido actualizada exitosamente!"); 16 | Core::redir("./?view=configuration"); 17 | 18 | }else{ 19 | Core::alert("Las contrase~as no coinciden."); 20 | Core::redir("./?view=configuration"); 21 | } 22 | 23 | }else{ 24 | Core::alert("La contrase~a introducida es incorrecta."); 25 | Core::redir("./?view=configuration"); 26 | } 27 | } 28 | 29 | 30 | 31 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/updatepost/action-default.php: -------------------------------------------------------------------------------- 1 | title = $_POST['title']; 5 | $p->content = $_POST['content']; 6 | $public =0; 7 | if($_POST['is_public']){ $public=1; } 8 | 9 | $p->is_public = $public; 10 | // $p->user_id = 1; 11 | $p->update(); 12 | 13 | setcookie("added",$p->title); 14 | 15 | print ""; 16 | } 17 | ?> -------------------------------------------------------------------------------- /core/modules/index/action/updateteaminformation/action-default.php: -------------------------------------------------------------------------------- 1 | title =$_POST["title"]; 6 | $profile->description =$_POST["description"]; 7 | 8 | 9 | $image = new Upload($_FILES["image"]); 10 | if($image->uploaded){ 11 | $image->Process("storage/teams/".$_POST["team_id"]."/"); 12 | if($image->processed){ 13 | $profile->image = $image->file_dst_name; 14 | }else{ 15 | echo "Error: ".$image->error; 16 | } 17 | } 18 | 19 | $profile->update(); 20 | Core::redir("./?view=editteam&id=$_POST[team_id]"); 21 | } 22 | 23 | 24 | ?> -------------------------------------------------------------------------------- /core/modules/index/autoload.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/modules/index/init.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/modules/index/model.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /core/modules/index/model/CommentData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | public function getUser(){ return UserData::getById($this->user_id); } 20 | 21 | public function add(){ 22 | $sql = "insert into ".self::$tablename." (type_id,ref_id,user_id,content,created_at) "; 23 | echo $sql .= "value (\"$this->type_id\",\"$this->ref_id\",\"$this->user_id\",\"$this->content\",NOW())"; 24 | return Executor::doit($sql); 25 | } 26 | 27 | public function del(){ 28 | $sql = "delete from ".self::$tablename." where id=$this->id"; 29 | Executor::doit($sql); 30 | } 31 | 32 | // partiendo de que ya tenemos creado un objecto CommentData previamente utilizamos el contexto 33 | public function update(){ 34 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 35 | Executor::doit($sql); 36 | } 37 | 38 | public static function getById($id){ 39 | $sql = "select * from ".self::$tablename." where id=$id"; 40 | $query = Executor::doit($sql); 41 | return Model::one($query[0],new CommentData()); 42 | } 43 | 44 | public static function getByRUT($ref_id,$user_id,$type_id){ 45 | $sql = "select * from ".self::$tablename." where ref_id=$ref_id and user_id=$user_id and type_id=$type_id"; 46 | $query = Executor::doit($sql); 47 | return Model::one($query[0],new CommentData()); 48 | } 49 | 50 | public static function countByRT($r,$t){ 51 | $sql = "select count(*) as c from ".self::$tablename." where ref_id=$r and type_id=$t"; 52 | $query = Executor::doit($sql); 53 | return Model::one($query[0],new CommentData()); 54 | } 55 | 56 | 57 | public static function getAll(){ 58 | $sql = "select * from ".self::$tablename; 59 | $query = Executor::doit($sql); 60 | return Model::many($query[0],new CommentData()); 61 | } 62 | 63 | public static function getAllByTR($t,$r){ 64 | $sql = "select * from ".self::$tablename." where type_id=$t and ref_id=$r"; 65 | $query = Executor::doit($sql); 66 | return Model::many($query[0],new CommentData()); 67 | } 68 | 69 | 70 | public static function getAllByPostId($id){ 71 | $sql = "select * from ".self::$tablename." where post_id=".$id; 72 | $query = Executor::doit($sql); 73 | return Model::many($query[0],new CommentData()); 74 | } 75 | 76 | 77 | public static function getLike($q){ 78 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 79 | $query = Executor::doit($sql); 80 | return Model::many($query[0],new CommentData()); 81 | } 82 | 83 | 84 | } 85 | 86 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/ConversationData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | public function getSender(){ return UserData::getById($this->sender_id); } 20 | public function getReceptor(){ return UserData::getById($this->receptor_id); } 21 | 22 | 23 | public function add(){ 24 | $sql = "insert into conversation (sender_id,receptor_id,created_at) "; 25 | $sql .= "value (\"$this->sender_id\",\"$this->receptor_id\",$this->created_at)"; 26 | return Executor::doit($sql); 27 | } 28 | 29 | public function del(){ 30 | $sql = "delete from ".self::$tablename." where id=$this->id"; 31 | Executor::doit($sql); 32 | } 33 | 34 | // partiendo de que ya tenemos creado un objecto ConversationData previamente utilizamos el contexto 35 | public function update(){ 36 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 37 | Executor::doit($sql); 38 | } 39 | 40 | public function accept(){ 41 | $sql = "update ".self::$tablename." set is_accepted=1 where id=$this->id"; 42 | Executor::doit($sql); 43 | } 44 | 45 | public function read(){ 46 | $sql = "update ".self::$tablename." set is_readed=1 where id=$this->id"; 47 | Executor::doit($sql); 48 | } 49 | 50 | public static function getById($id){ 51 | $sql = "select * from ".self::$tablename." where id=$id"; 52 | $query = Executor::doit($sql); 53 | return Model::one($query[0],new ConversationData()); 54 | } 55 | 56 | 57 | public static function getAll(){ 58 | $sql = "select * from ".self::$tablename; 59 | $query = Executor::doit($sql); 60 | return Model::many($query[0],new ConversationData()); 61 | } 62 | 63 | public static function getConversations($user_id){ 64 | $sql = "select * from ".self::$tablename." where sender_id=$user_id or receptor_id=$user_id"; 65 | $query = Executor::doit($sql); 66 | return Model::many($query[0],new ConversationData()); 67 | } 68 | 69 | public static function getConversation($user_id,$friend_id){ 70 | $sql = "select * from ".self::$tablename." where (sender_id=$user_id and receptor_id=$friend_id) or (receptor_id=$user_id and sender_id=$friend_id) "; 71 | $query = Executor::doit($sql); 72 | return Model::one($query[0],new FriendData()); 73 | } 74 | 75 | 76 | public static function getUnAccepteds($user_id){ 77 | $sql = "select * from ".self::$tablename." where receptor_id=$user_id and is_accepted=0"; 78 | $query = Executor::doit($sql); 79 | return Model::many($query[0],new ConversationData()); 80 | } 81 | 82 | public static function getLike($q){ 83 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 84 | $query = Executor::doit($sql); 85 | return Model::many($query[0],new ConversationData()); 86 | } 87 | 88 | 89 | } 90 | 91 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/CountryData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | 20 | public function add(){ 21 | $sql = "insert into user (name) "; 22 | $sql .= "value (\"$this->name\")"; 23 | return Executor::doit($sql); 24 | } 25 | 26 | public function del(){ 27 | $sql = "delete from ".self::$tablename." where id=$this->id"; 28 | Executor::doit($sql); 29 | } 30 | 31 | // partiendo de que ya tenemos creado un objecto CountryData previamente utilizamos el contexto 32 | public function update(){ 33 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 34 | Executor::doit($sql); 35 | } 36 | 37 | public static function getById($id){ 38 | $sql = "select * from ".self::$tablename." where id=$id"; 39 | $query = Executor::doit($sql); 40 | return Model::one($query[0],new CountryData()); 41 | } 42 | 43 | 44 | 45 | public static function getAll(){ 46 | $sql = "select * from ".self::$tablename; 47 | $query = Executor::doit($sql); 48 | return Model::many($query[0],new CountryData()); 49 | 50 | } 51 | 52 | public static function getLike($q){ 53 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 54 | $query = Executor::doit($sql); 55 | return Model::many($query[0],new CountryData()); 56 | } 57 | 58 | 59 | } 60 | 61 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/FriendData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | public function getSender(){ return UserData::getById($this->sender_id); } 20 | public function getReceptor(){ return UserData::getById($this->receptor_id); } 21 | 22 | 23 | public function add(){ 24 | $sql = "insert into friend (sender_id,receptor_id,created_at) "; 25 | $sql .= "value (\"$this->sender_id\",\"$this->receptor_id\",$this->created_at)"; 26 | return Executor::doit($sql); 27 | } 28 | 29 | public function del(){ 30 | $sql = "delete from ".self::$tablename." where id=$this->id"; 31 | Executor::doit($sql); 32 | } 33 | 34 | // partiendo de que ya tenemos creado un objecto FriendData previamente utilizamos el contexto 35 | public function update(){ 36 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 37 | Executor::doit($sql); 38 | } 39 | 40 | public function accept(){ 41 | $sql = "update ".self::$tablename." set is_accepted=1 where id=$this->id"; 42 | Executor::doit($sql); 43 | } 44 | 45 | public function read(){ 46 | $sql = "update ".self::$tablename." set is_readed=1 where id=$this->id"; 47 | Executor::doit($sql); 48 | } 49 | 50 | public static function getById($id){ 51 | $sql = "select * from ".self::$tablename." where id=$id"; 52 | $query = Executor::doit($sql); 53 | return Model::one($query[0],new FriendData()); 54 | } 55 | public static function countUnReads($user_id){ 56 | $sql = "select count(*) as c from ".self::$tablename." where receptor_id=$user_id and is_readed=0"; 57 | $query = Executor::doit($sql); 58 | return Model::one($query[0],new FriendData()); 59 | } 60 | 61 | public static function countFriends($user_id){ 62 | $sql = "select count(*) as c from ".self::$tablename." where (sender_id=$user_id or receptor_id=$user_id) and is_accepted=1"; 63 | $query = Executor::doit($sql); 64 | return Model::one($query[0],new FriendData()); 65 | } 66 | 67 | 68 | public static function getFriendship($user_id,$friend_id){ 69 | $sql = "select * from ".self::$tablename." where (sender_id=$user_id and receptor_id=$friend_id) or (receptor_id=$user_id and sender_id=$friend_id) "; 70 | $query = Executor::doit($sql); 71 | return Model::one($query[0],new FriendData()); 72 | } 73 | 74 | 75 | public static function getAll(){ 76 | $sql = "select * from ".self::$tablename; 77 | $query = Executor::doit($sql); 78 | return Model::many($query[0],new FriendData()); 79 | 80 | } 81 | 82 | 83 | public static function getFriends($user_id){ 84 | $sql = "select * from ".self::$tablename." where (sender_id=$user_id or receptor_id=$user_id) and is_accepted=1"; 85 | $query = Executor::doit($sql); 86 | return Model::many($query[0],new FriendData()); 87 | } 88 | 89 | public static function getUnAccepteds($user_id){ 90 | $sql = "select * from ".self::$tablename." where receptor_id=$user_id and is_accepted=0"; 91 | $query = Executor::doit($sql); 92 | return Model::many($query[0],new FriendData()); 93 | } 94 | 95 | public static function getLike($q){ 96 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 97 | $query = Executor::doit($sql); 98 | return Model::many($query[0],new FriendData()); 99 | } 100 | 101 | 102 | } 103 | 104 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/HeartData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | public function getImage(){ return ImageData::getById($this->image_id); } 20 | 21 | public function add(){ 22 | $sql = "insert into ".self::$tablename." (type_id,ref_id,user_id,created_at) "; 23 | $sql .= "value (\"$this->type_id\",\"$this->ref_id\",\"$this->user_id\",NOW())"; 24 | return Executor::doit($sql); 25 | } 26 | 27 | public function del(){ 28 | $sql = "delete from ".self::$tablename." where id=$this->id"; 29 | Executor::doit($sql); 30 | } 31 | 32 | // partiendo de que ya tenemos creado un objecto HeartData previamente utilizamos el contexto 33 | public function update(){ 34 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 35 | Executor::doit($sql); 36 | } 37 | 38 | public static function getById($id){ 39 | $sql = "select * from ".self::$tablename." where id=$id"; 40 | $query = Executor::doit($sql); 41 | return Model::one($query[0],new HeartData()); 42 | } 43 | 44 | public static function getByRUT($ref_id,$user_id,$type_id){ 45 | $sql = "select * from ".self::$tablename." where ref_id=$ref_id and user_id=$user_id and type_id=$type_id"; 46 | $query = Executor::doit($sql); 47 | return Model::one($query[0],new HeartData()); 48 | } 49 | 50 | public static function countByRT($r,$t){ 51 | $sql = "select count(*) as c from ".self::$tablename." where ref_id=$r and type_id=$t"; 52 | $query = Executor::doit($sql); 53 | return Model::one($query[0],new HeartData()); 54 | } 55 | 56 | 57 | public static function getAll(){ 58 | $sql = "select * from ".self::$tablename; 59 | $query = Executor::doit($sql); 60 | return Model::many($query[0],new HeartData()); 61 | } 62 | 63 | public static function getAllByPostId($id){ 64 | $sql = "select * from ".self::$tablename." where post_id=".$id; 65 | $query = Executor::doit($sql); 66 | return Model::many($query[0],new HeartData()); 67 | } 68 | 69 | 70 | public static function getLike($q){ 71 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 72 | $query = Executor::doit($sql); 73 | return Model::many($query[0],new HeartData()); 74 | } 75 | 76 | 77 | } 78 | 79 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/ImageData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | public function getUser(){ return UserData::getByid($this->user_id); } 20 | public function getFullpath(){ return "storage/users/".$this->user_id."/images/".$this->src;} 21 | 22 | public function add(){ 23 | $sql = "insert into ".self::$tablename." (src,level_id,user_id,created_at) "; 24 | $sql .= "value (\"$this->src\",\"$this->level_id\",\"$this->user_id\",$this->created_at)"; 25 | return Executor::doit($sql); 26 | } 27 | 28 | public function del(){ 29 | $sql = "delete from ".self::$tablename." where id=$this->id"; 30 | Executor::doit($sql); 31 | } 32 | 33 | // partiendo de que ya tenemos creado un objecto ImageData previamente utilizamos el contexto 34 | public function update(){ 35 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 36 | Executor::doit($sql); 37 | } 38 | 39 | public static function getById($id){ 40 | $sql = "select * from ".self::$tablename." where id=$id"; 41 | $query = Executor::doit($sql); 42 | return Model::one($query[0],new ImageData()); 43 | } 44 | 45 | public static function getUserId($id){ 46 | $sql = "select user_id from ".self::$tablename." where id=$id"; 47 | $query = Executor::doit($sql); 48 | return Model::one($query[0],new ImageData()); 49 | } 50 | 51 | public static function countByUserId($id){ 52 | $sql = "select count(*) as c from ".self::$tablename." where user_id=$id"; 53 | $query = Executor::doit($sql); 54 | return Model::one($query[0],new ImageData()); 55 | } 56 | 57 | public static function getAll(){ 58 | $sql = "select * from ".self::$tablename; 59 | $query = Executor::doit($sql); 60 | return Model::many($query[0],new ImageData()); 61 | } 62 | 63 | public static function getAllByUserId($id){ 64 | $sql = "select * from ".self::$tablename." where user_id=".$id; 65 | $query = Executor::doit($sql); 66 | return Model::many($query[0],new ImageData()); 67 | } 68 | 69 | 70 | public static function getLike($q){ 71 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 72 | $query = Executor::doit($sql); 73 | return Model::many($query[0],new ImageData()); 74 | } 75 | 76 | 77 | } 78 | 79 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/LevelData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | 20 | public function add(){ 21 | $sql = "insert into user (name,lastname,email,code,password,created_at) "; 22 | $sql .= "value (\"$this->name\",\"$this->lastname\",\"$this->email\",\"$this->code\",\"$this->password\",$this->created_at)"; 23 | return Executor::doit($sql); 24 | } 25 | 26 | public function del(){ 27 | $sql = "delete from ".self::$tablename." where id=$this->id"; 28 | Executor::doit($sql); 29 | } 30 | 31 | // partiendo de que ya tenemos creado un objecto LevelData previamente utilizamos el contexto 32 | public function update(){ 33 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 34 | Executor::doit($sql); 35 | } 36 | 37 | public static function getById($id){ 38 | $sql = "select * from ".self::$tablename." where id=$id"; 39 | $query = Executor::doit($sql); 40 | return Model::one($query[0],new LevelData()); 41 | } 42 | 43 | 44 | 45 | public static function getAll(){ 46 | $sql = "select * from ".self::$tablename; 47 | $query = Executor::doit($sql); 48 | return Model::many($query[0],new LevelData()); 49 | 50 | } 51 | 52 | public static function getLike($q){ 53 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 54 | $query = Executor::doit($sql); 55 | return Model::many($query[0],new LevelData()); 56 | } 57 | 58 | 59 | } 60 | 61 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/MessageData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | public function getUser(){ return UserData::getById($this->user_id); } 20 | 21 | 22 | public function add(){ 23 | $sql = "insert into message (content,user_id,conversation_id,created_at) "; 24 | $sql .= "value (\"$this->content\",\"$this->user_id\",\"$this->conversation_id\",$this->created_at)"; 25 | return Executor::doit($sql); 26 | } 27 | 28 | public function del(){ 29 | $sql = "delete from ".self::$tablename." where id=$this->id"; 30 | Executor::doit($sql); 31 | } 32 | 33 | // partiendo de que ya tenemos creado un objecto MessageData previamente utilizamos el contexto 34 | public function update(){ 35 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 36 | Executor::doit($sql); 37 | } 38 | 39 | public function accept(){ 40 | $sql = "update ".self::$tablename." set is_accepted=1 where id=$this->id"; 41 | Executor::doit($sql); 42 | } 43 | 44 | public function read(){ 45 | $sql = "update ".self::$tablename." set is_readed=1 where id=$this->id"; 46 | Executor::doit($sql); 47 | } 48 | 49 | public static function getById($id){ 50 | $sql = "select * from ".self::$tablename." where id=$id"; 51 | $query = Executor::doit($sql); 52 | return Model::one($query[0],new MessageData()); 53 | } 54 | 55 | public static function countUnReadsByUC($uid,$id){ 56 | $sql = "select count(*) as c from ".self::$tablename." where is_readed=0 and user_id!=$uid and conversation_id=$id"; 57 | $query = Executor::doit($sql); 58 | return Model::one($query[0],new MessageData()); 59 | } 60 | 61 | public static function getAll(){ 62 | $sql = "select * from ".self::$tablename; 63 | $query = Executor::doit($sql); 64 | return Model::many($query[0],new MessageData()); 65 | } 66 | 67 | public static function getAllByConversationId($id){ 68 | $sql = "select * from ".self::$tablename." where conversation_id=".$id; 69 | $query = Executor::doit($sql); 70 | return Model::many($query[0],new MessageData()); 71 | } 72 | 73 | public static function getLike($q){ 74 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 75 | $query = Executor::doit($sql); 76 | return Model::many($query[0],new MessageData()); 77 | } 78 | 79 | 80 | } 81 | 82 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/NotificationData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | public function getSender(){ return UserData::getById($this->sender_id); } 20 | 21 | public function add(){ 22 | $sql = "insert into ".self::$tablename." (not_type_id,type_id,ref_id,sender_id,receptor_id,created_at) "; 23 | $sql .= "value ($this->not_type_id,\"$this->type_id\",\"$this->ref_id\",\"$this->sender_id\",\"$this->receptor_id\",NOW())"; 24 | return Executor::doit($sql); 25 | } 26 | 27 | public function del(){ 28 | $sql = "delete from ".self::$tablename." where id=$this->id"; 29 | Executor::doit($sql); 30 | } 31 | 32 | // partiendo de que ya tenemos creado un objecto NotificationData previamente utilizamos el contexto 33 | public function update(){ 34 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 35 | Executor::doit($sql); 36 | } 37 | 38 | public function read(){ 39 | $sql = "update ".self::$tablename." set is_readed=1 where id=$this->id"; 40 | Executor::doit($sql); 41 | } 42 | 43 | public static function getById($id){ 44 | $sql = "select * from ".self::$tablename." where id=$id"; 45 | $query = Executor::doit($sql); 46 | return Model::one($query[0],new NotificationData()); 47 | } 48 | 49 | public static function countUnReads($id){ 50 | $sql = "select count(*) as c from ".self::$tablename." where is_readed=0 and receptor_id=$id"; 51 | $query = Executor::doit($sql); 52 | return Model::one($query[0],new NotificationData()); 53 | } 54 | 55 | 56 | public static function getByRUT($ref_id,$user_id,$type_id){ 57 | $sql = "select * from ".self::$tablename." where ref_id=$ref_id and user_id=$user_id and type_id=$type_id"; 58 | $query = Executor::doit($sql); 59 | return Model::one($query[0],new NotificationData()); 60 | } 61 | 62 | public static function countByRT($r,$t){ 63 | $sql = "select count(*) as c from ".self::$tablename." where ref_id=$r and type_id=$t"; 64 | $query = Executor::doit($sql); 65 | return Model::one($query[0],new NotificationData()); 66 | } 67 | 68 | 69 | public static function getAll(){ 70 | $sql = "select * from ".self::$tablename; 71 | $query = Executor::doit($sql); 72 | return Model::many($query[0],new NotificationData()); 73 | } 74 | 75 | public static function getLast5($id){ 76 | $sql = "select * from ".self::$tablename." where is_readed=0 and receptor_id=$id limit 5"; 77 | $query = Executor::doit($sql); 78 | return Model::many($query[0],new NotificationData()); 79 | } 80 | 81 | 82 | public static function getAllByUserId($id){ 83 | $sql = "select * from ".self::$tablename." where receptor_id=".$id; 84 | $query = Executor::doit($sql); 85 | return Model::many($query[0],new NotificationData()); 86 | } 87 | 88 | 89 | public static function getLike($q){ 90 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 91 | $query = Executor::doit($sql); 92 | return Model::many($query[0],new NotificationData()); 93 | } 94 | 95 | 96 | } 97 | 98 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/PostData.php: -------------------------------------------------------------------------------- 1 | title = ""; 8 | $this->content = ""; 9 | $this->image = ""; 10 | $this->user_id = ""; 11 | $this->is_public = "0"; 12 | $this->created_at = "NOW()"; 13 | } 14 | 15 | public function getAuthor(){ return UserData::getById($this->author_ref_id); } 16 | public function getReceptor(){ return UserData::getById($this->receptor_ref_id); } 17 | 18 | public function add(){ 19 | $sql = "insert into ".self::$tablename." (content,author_ref_id,receptor_type_id,receptor_ref_id,level_id,created_at) "; 20 | $sql .= "value (\"$this->content\",\"$this->author_ref_id\",$this->receptor_type_id,$this->receptor_ref_id,1,$this->created_at)"; 21 | return Executor::doit($sql); 22 | } 23 | 24 | public static function delById($id){ 25 | $sql = "delete from ".self::$tablename." where id=$id"; 26 | Executor::doit($sql); 27 | } 28 | public function del(){ 29 | $sql = "delete from ".self::$tablename." where id=$this->id"; 30 | Executor::doit($sql); 31 | } 32 | 33 | // partiendo de que ya tenemos creado un objecto PostData previamente utilizamos el contexto 34 | public function update(){ 35 | $sql = "update ".self::$tablename." set title=\"$this->title\",content=\"$this->content\",image=\"$this->image\",is_public=\"$this->is_public\" where id=$this->id"; 36 | Executor::doit($sql); 37 | } 38 | 39 | public static function getById($id){ 40 | $sql = "select * from ".self::$tablename." where id=$id"; 41 | $query = Executor::doit($sql); 42 | return Model::one($query[0],new PostData()); 43 | } 44 | 45 | public static function getReceptorId($id){ 46 | $sql = "select receptor_ref_id,author_ref_id from ".self::$tablename." where id=$id"; 47 | $query = Executor::doit($sql); 48 | return Model::one($query[0],new PostData()); 49 | } 50 | 51 | 52 | public static function getAll(){ 53 | $sql = "select * from ".self::$tablename." order by created_at desc"; 54 | $query = Executor::doit($sql); 55 | return Model::many($query[0],new PostData()); 56 | } 57 | 58 | public static function getAllByUserId($user_id){ 59 | $sql = "select * from ".self::$tablename." where (author_ref_id=$user_id or receptor_ref_id=$user_id) and receptor_type_id=1 order by created_at desc"; 60 | $query = Executor::doit($sql); 61 | return Model::many($query[0],new PostData()); 62 | } 63 | 64 | public static function getAllByUserIdTeamId($user_id,$team_id){ 65 | $sql = "select * from ".self::$tablename." where author_ref_id=$user_id and receptor_ref_id=$team_id and receptor_type_id=2 order by created_at desc"; 66 | $query = Executor::doit($sql); 67 | return Model::many($query[0],new PostData()); 68 | } 69 | 70 | public static function getLike($q){ 71 | $sql = "select * from ".self::$tablename." where title like '%$q%' or content like '%$q%'"; 72 | $query = Executor::doit($sql); 73 | return Model::many($query[0],new PostData()); 74 | } 75 | 76 | 77 | } 78 | 79 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/PostImageData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | public function getImage(){ return ImageData::getById($this->image_id); } 20 | 21 | public function add(){ 22 | $sql = "insert into ".self::$tablename." (post_id,image_id) "; 23 | $sql .= "value (\"$this->post_id\",\"$this->image_id\")"; 24 | return Executor::doit($sql); 25 | } 26 | 27 | public function del(){ 28 | $sql = "delete from ".self::$tablename." where id=$this->id"; 29 | Executor::doit($sql); 30 | } 31 | 32 | // partiendo de que ya tenemos creado un objecto PostImageData previamente utilizamos el contexto 33 | public function update(){ 34 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 35 | Executor::doit($sql); 36 | } 37 | 38 | public static function getById($id){ 39 | $sql = "select * from ".self::$tablename." where id=$id"; 40 | $query = Executor::doit($sql); 41 | return Model::one($query[0],new PostImageData()); 42 | } 43 | 44 | 45 | 46 | public static function getAll(){ 47 | $sql = "select * from ".self::$tablename; 48 | $query = Executor::doit($sql); 49 | return Model::many($query[0],new PostImageData()); 50 | } 51 | 52 | public static function getAllByPostId($id){ 53 | $sql = "select * from ".self::$tablename." where post_id=".$id; 54 | $query = Executor::doit($sql); 55 | return Model::many($query[0],new PostImageData()); 56 | } 57 | 58 | 59 | public static function getLike($q){ 60 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 61 | $query = Executor::doit($sql); 62 | return Model::many($query[0],new PostImageData()); 63 | } 64 | 65 | 66 | } 67 | 68 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/ProfileData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | function getFullname(){ return $this->name." ".$this->lastname; } 20 | 21 | public function add(){ 22 | $sql = "insert into profile (user_id) "; 23 | $sql .= "value (\"$this->user_id\")"; 24 | return Executor::doit($sql); 25 | } 26 | 27 | public static function delete($id){ 28 | $sql = "delete from ".self::$tablename." where id=$id"; 29 | Executor::doit($sql); 30 | } 31 | public function del(){ 32 | $sql = "delete from ".self::$tablename." where id=$this->id"; 33 | Executor::doit($sql); 34 | } 35 | 36 | // partiendo de que ya tenemos creado un objecto ProfileData previamente utilizamos el contexto 37 | public function update(){ 38 | $sql = "update ".self::$tablename." set nick=\"$this->nick\",name=\"$this->name\",mail=\"$this->mail\",image=\"$this->image\",password=\"$this->password\",status_id=".$this->status->id.",usertype_id=".$this->usertype->id.",is_admin=$this->is_admin,is_verified=$this->is_verified,created_at=$this->created_at where id=$this->id"; 39 | Executor::doit($sql); 40 | } 41 | 42 | public function update_info(){ 43 | $sql = "update ".self::$tablename." set title=\"$this->title\",image=\"$this->image\",bio=\"$this->bio\",likes=\"$this->likes\",dislikes=\"$this->dislikes\" where user_id=$this->user_id"; 44 | Executor::doit($sql); 45 | } 46 | 47 | public function update_basic(){ 48 | $sql = "update ".self::$tablename." set day_of_birth=\"$this->day_of_birth\",gender=\"$this->gender\",country_id=\"$this->country_id\",sentimental_id=\"$this->sentimental_id\" where user_id=$this->user_id"; 49 | Executor::doit($sql); 50 | } 51 | 52 | public function update_passwd(){ 53 | $sql = "update ".self::$tablename." set password=\"$this->password\" where id=$this->id"; 54 | Executor::doit($sql); 55 | } 56 | 57 | 58 | public function activate(){ 59 | $sql = "update ".self::$tablename." set is_active=1 where id=$this->id"; 60 | Executor::doit($sql); 61 | } 62 | 63 | public static function getByUserId($id){ 64 | $sql = "select * from ".self::$tablename." where user_id=$id"; 65 | $query = Executor::doit($sql); 66 | return Model::one($query[0],new ProfileData()); 67 | } 68 | 69 | public static function getByEmail($email){ 70 | $sql = "select * from ".self::$tablename." where email=\"$email\""; 71 | $query = Executor::doit($sql); 72 | return Model::one($query[0],new ProfileData()); 73 | } 74 | 75 | 76 | public static function getLogin($email,$password){ 77 | $sql = "select * from ".self::$tablename." where email=\"$email\" and password=\"$password\""; 78 | $query = Executor::doit($sql); 79 | return Model::one($query[0],new ProfileData()); 80 | } 81 | 82 | 83 | public static function getAll(){ 84 | $sql = "select * from ".self::$tablename; 85 | $query = Executor::doit($sql); 86 | return Model::many($query[0],new ProfileData()); 87 | 88 | } 89 | 90 | public static function getInactives(){ 91 | $sql = "select * from ".self::$tablename." where is_active=0"; 92 | $query = Executor::doit($sql); 93 | return Model::many($query[0],new ProfileData()); 94 | } 95 | 96 | public static function getActives(){ 97 | $sql = "select * from ".self::$tablename." where is_active=1"; 98 | $query = Executor::doit($sql); 99 | return Model::many($query[0],new ProfileData()); 100 | } 101 | 102 | public static function getLike($q){ 103 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 104 | $query = Executor::doit($sql); 105 | return Model::many($query[0],new ProfileData()); 106 | } 107 | 108 | 109 | } 110 | 111 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/SentimentalData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | 20 | public function add(){ 21 | $sql = "insert into user (name) "; 22 | $sql .= "value (\"$this->name\")"; 23 | return Executor::doit($sql); 24 | } 25 | 26 | public function del(){ 27 | $sql = "delete from ".self::$tablename." where id=$this->id"; 28 | Executor::doit($sql); 29 | } 30 | 31 | // partiendo de que ya tenemos creado un objecto SentimentalData previamente utilizamos el contexto 32 | public function update(){ 33 | $sql = "update ".self::$tablename." set name=\"$this->name\" where id=$this->id"; 34 | Executor::doit($sql); 35 | } 36 | 37 | public static function getById($id){ 38 | $sql = "select * from ".self::$tablename." where id=$id"; 39 | $query = Executor::doit($sql); 40 | return Model::one($query[0],new SentimentalData()); 41 | } 42 | 43 | 44 | 45 | public static function getAll(){ 46 | $sql = "select * from ".self::$tablename; 47 | $query = Executor::doit($sql); 48 | return Model::many($query[0],new SentimentalData()); 49 | 50 | } 51 | 52 | public static function getLike($q){ 53 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 54 | $query = Executor::doit($sql); 55 | return Model::many($query[0],new SentimentalData()); 56 | } 57 | 58 | 59 | } 60 | 61 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/TeamData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | public function getUser(){ return UserData::getByid($this->user_id); } 20 | 21 | public function add(){ 22 | $sql = "insert into ".self::$tablename." (title,user_id,created_at) "; 23 | $sql .= "value (\"$this->title\",\"$this->user_id\",$this->created_at)"; 24 | return Executor::doit($sql); 25 | } 26 | 27 | public function del(){ 28 | $sql = "delete from ".self::$tablename." where id=$this->id"; 29 | Executor::doit($sql); 30 | } 31 | 32 | // partiendo de que ya tenemos creado un objecto TeamData previamente utilizamos el contexto 33 | public function update(){ 34 | $sql = "update ".self::$tablename." set image=\"$this->image\",title=\"$this->title\",description=\"$this->description\" where id=$this->id"; 35 | Executor::doit($sql); 36 | } 37 | 38 | public static function getById($id){ 39 | $sql = "select * from ".self::$tablename." where id=$id"; 40 | $query = Executor::doit($sql); 41 | return Model::one($query[0],new TeamData()); 42 | } 43 | 44 | public static function getUserId($id){ 45 | $sql = "select user_id from ".self::$tablename." where id=$id"; 46 | $query = Executor::doit($sql); 47 | return Model::one($query[0],new TeamData()); 48 | } 49 | 50 | public static function countByUserId($id){ 51 | $sql = "select count(*) as c from ".self::$tablename." where user_id=$id"; 52 | $query = Executor::doit($sql); 53 | return Model::one($query[0],new TeamData()); 54 | } 55 | 56 | public static function getAll(){ 57 | $sql = "select * from ".self::$tablename; 58 | $query = Executor::doit($sql); 59 | return Model::many($query[0],new TeamData()); 60 | } 61 | 62 | public static function getAllByUserId($id){ 63 | $sql = "select * from ".self::$tablename." where user_id=".$id; 64 | $query = Executor::doit($sql); 65 | return Model::many($query[0],new TeamData()); 66 | } 67 | 68 | 69 | public static function getLike($q){ 70 | $sql = "select * from ".self::$tablename." where name like '%$q%'"; 71 | $query = Executor::doit($sql); 72 | return Model::many($query[0],new TeamData()); 73 | } 74 | 75 | 76 | } 77 | 78 | ?> -------------------------------------------------------------------------------- /core/modules/index/model/UserData.php: -------------------------------------------------------------------------------- 1 | name = ""; 13 | $this->lastname = ""; 14 | $this->email = ""; 15 | $this->password = ""; 16 | $this->created_at = "NOW()"; 17 | } 18 | 19 | function getFullname(){ return $this->name." ".$this->lastname; } 20 | 21 | public function add(){ 22 | $sql = "insert into user (name,lastname,email,code,password,created_at) "; 23 | $sql .= "value (\"$this->name\",\"$this->lastname\",\"$this->email\",\"$this->code\",\"$this->password\",$this->created_at)"; 24 | return Executor::doit($sql); 25 | } 26 | 27 | public static function delete($id){ 28 | $sql = "delete from ".self::$tablename." where id=$id"; 29 | Executor::doit($sql); 30 | } 31 | public function del(){ 32 | $sql = "delete from ".self::$tablename." where id=$this->id"; 33 | Executor::doit($sql); 34 | } 35 | 36 | // partiendo de que ya tenemos creado un objecto UserData previamente utilizamos el contexto 37 | public function update(){ 38 | $sql = "update ".self::$tablename." set username=\"$this->username\",name=\"$this->name\",lastname=\"$this->lastname\",email=\"$this->email\",is_active=\"$this->is_active\" where id=$this->id"; 39 | Executor::doit($sql); 40 | } 41 | 42 | public function update_passwd(){ 43 | $sql = "update ".self::$tablename." set password=\"$this->password\" where id=$this->id"; 44 | Executor::doit($sql); 45 | } 46 | 47 | 48 | public function activate(){ 49 | $sql = "update ".self::$tablename." set is_active=1 where id=$this->id"; 50 | Executor::doit($sql); 51 | } 52 | 53 | public static function getById($id){ 54 | $sql = "select * from ".self::$tablename." where id=$id"; 55 | $query = Executor::doit($sql); 56 | return Model::one($query[0],new UserData()); 57 | } 58 | 59 | public static function getByEmail($email){ 60 | $sql = "select * from ".self::$tablename." where email=\"$email\""; 61 | $query = Executor::doit($sql); 62 | return Model::one($query[0],new UserData()); 63 | } 64 | 65 | 66 | public static function getLogin($email,$password){ 67 | $sql = "select * from ".self::$tablename." where email=\"$email\" and password=\"$password\""; 68 | $query = Executor::doit($sql); 69 | return Model::one($query[0],new UserData()); 70 | } 71 | 72 | 73 | public static function getAll(){ 74 | $sql = "select * from ".self::$tablename; 75 | $query = Executor::doit($sql); 76 | return Model::many($query[0],new UserData()); 77 | 78 | } 79 | 80 | public static function getInactives(){ 81 | $sql = "select * from ".self::$tablename." where is_active=0"; 82 | $query = Executor::doit($sql); 83 | return Model::many($query[0],new UserData()); 84 | } 85 | 86 | public static function getActives(){ 87 | $sql = "select * from ".self::$tablename." where is_active=1"; 88 | $query = Executor::doit($sql); 89 | return Model::many($query[0],new UserData()); 90 | } 91 | 92 | public static function getLike($q){ 93 | $sql = "select * from ".self::$tablename." inner join profile on (user.id=profile.user_id) where name like '%$q%' or lastname like '%$q%' "; 94 | $query = Executor::doit($sql); 95 | return Model::many($query[0],new UserData()); 96 | } 97 | 98 | 99 | } 100 | 101 | ?> -------------------------------------------------------------------------------- /core/modules/index/superboot.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/modules/index/view/changelog/widget-default.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Log de cambios

5 |

En esta pagina puedes ver todos los cambios ejercidos en el proyecto smile.

6 |

v1.0

7 |

Modulos

8 |
    9 |
  • Usuarios
  • 10 |
  • Publicaciones
  • 11 |
  • Perfiles
  • 12 |
  • Likes
  • 13 |
  • Comentarios
  • 14 |
  • Imagenes
  • 15 |
  • Amigos
  • 16 |
  • Mensajes
  • 17 |
  • Notificaciones
  • 18 |
19 | 20 |

Caracteristicas

21 |
    22 |
  • Dar like a estados e imagenes
  • 23 |
  • Escribir comentarios a estados e imagenes
  • 24 |
  • Buscar y ver amigos, solicitud de amistad (enviar y aceptar)
  • 25 |
  • Enviar mensajes a amigos
  • 26 |
27 |

Y muchas cosas mas implicitas.

28 | 29 |
30 |
31 |
32 | -------------------------------------------------------------------------------- /core/modules/index/view/configuration/widget-default.php: -------------------------------------------------------------------------------- 1 | 6 |
7 |
8 |
9 | Session::$user,"profile"=>Session::$profile ,"from"=>"logged"));?> 10 | 11 |
12 |
13 |

Configuracion

14 | 17 |
18 |
19 | 20 | 21 |
22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
31 | 32 | 33 |
34 |
35 | 38 |
39 | 40 |
41 |
42 |

Cambiar Contraseña

43 |
44 |
45 | 46 | 47 |
48 |
49 | 50 | 51 |
52 |
53 | 54 | 55 |
56 | 57 |
58 | 66 |
67 |
68 |
69 |
70 |
71 | 72 | 73 | 74 |




-------------------------------------------------------------------------------- /core/modules/index/view/conversation/widget-default.php: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 |
8 | Session::$user,"profile"=>Session::$profile,"from"=>"logged" ));?> 9 | 10 |
11 |
12 |

Conversacion

13 | 0):?> 14 | 15 | 16 | 17 | 18 | 19 | 29 | 30 | 31 | 32 | 40 | 41 | read(); 43 | endforeach; ?> 44 |
Mensajes
20 |
21 |
22 | 23 |
24 | 25 | 26 | 27 |
28 |
33 | getUser()->getFullname(); 35 | ?> 36 |

content; ?>

37 |

created_at?>

38 | 39 |
45 | 46 |
47 |

No hay Amigos

48 |
49 | 50 |
51 |
52 |
53 |
54 |
55 | 56 | 57 | 58 |




-------------------------------------------------------------------------------- /core/modules/index/view/conversations/widget-default.php: -------------------------------------------------------------------------------- 1 | 2 | 5 |
6 |
7 |
8 | Session::$user,"profile"=>Session::$profile,"from"=>"logged" ));?> 9 | 10 |
11 |
12 |

Conversaciones

13 | 0):?> 14 | 15 | 16 | 17 | 18 | 19 | 20 | 39 | 40 | read(); 42 | endforeach; ?> 43 |
Amigo
21 | 22 | id); 24 | $color = "label-default"; 25 | if($nmsg->c>0){ $color="label-danger"; } 26 | echo "".$nmsg->c.""; 27 | echo ""; 28 | 29 | if($fr->receptor_id==Session::$user->id){ 30 | echo $fr->getSender()->getFullname(); 31 | }else{ 32 | echo $fr->getReceptor()->getFullname(); 33 | } 34 | 35 | echo ""; 36 | ?> 37 | 38 |
44 | 45 |
46 |

No hay Mensajes

47 |
48 | 49 |
50 |
51 |
52 |
53 |
54 | 55 | 56 | 57 |




-------------------------------------------------------------------------------- /core/modules/index/view/editbasicinfo/widget-default.php: -------------------------------------------------------------------------------- 1 | "Hombre","m"=>"Mujer"); 7 | ?> 8 |
9 |
10 |
11 | Session::$user,"profile"=>Session::$profile ,"from"=>"logged"));?> 12 | 13 | 14 |
15 |
16 |

Editar Informacion Basica

17 | 18 |
19 |
20 | 21 | 22 |
23 |
24 | 25 | 31 |
32 |
33 | 34 | 40 |
41 |
42 | 43 | 49 |
50 | 51 |
52 | 53 |
54 |
55 |
56 |
57 |
58 | 59 | 60 | 61 |




-------------------------------------------------------------------------------- /core/modules/index/view/editinformation/widget-default.php: -------------------------------------------------------------------------------- 1 | 6 |
7 |
8 |
9 | Session::$user,"profile"=>Session::$profile ,"from"=>"logged"));?> 10 | 11 | 12 |
13 |
14 |

Editar Informacion

15 | 16 |
17 |
18 | 19 | 20 |
21 |
22 | 23 | 24 |
25 | 26 |
27 | 28 | 29 |
30 |
31 | 32 | 33 |
34 |
35 | 36 | 37 |
38 | 39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 | 47 | 48 | 49 |




-------------------------------------------------------------------------------- /core/modules/index/view/editteam/widget-default.php: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 |
8 | 9 |
10 |
11 | Regresar 12 |

Editar Grupo

13 | 14 |
15 |
16 | 17 | 18 |
19 |
20 | 21 | 22 |
23 | 24 |
25 | 26 | 27 |
28 | 29 | 30 |
31 | 32 |
33 |
34 |
35 |
36 |
37 | 38 | 39 | 40 |




-------------------------------------------------------------------------------- /core/modules/index/view/friendreqs/widget-default.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 | Session::$user,"profile"=>Session::$profile,"from"=>"logged" ));?> 8 | 9 |
10 |
11 |

Solicitudes de Amistad

12 | 0):?> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | read(); 25 | endforeach; ?> 26 |
Persona
getSender()->getFullname();?> Aceptar Solicitud
27 | 28 |
29 |

No hay solicitudes

30 |
31 | 32 |
33 |
34 |
35 |
36 |
37 | 38 | 39 | 40 |




-------------------------------------------------------------------------------- /core/modules/index/view/friends/widget-default.php: -------------------------------------------------------------------------------- 1 | id); 4 | $frs = FriendData::getFriends($_GET["uid"]); 5 | ?> 6 |
7 |
8 |
9 | $user,"profile"=>$profile,"from"=>"logged" ));?> 10 | $user,"from"=>"logged"));?> 11 |
12 |
13 |

Amigos

14 | 0):?> 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 31 | 36 | 37 | read(); 39 | endforeach; ?> 40 |
Amigo
23 | receptor_id==$user->id){ 26 | echo $fr->getSender()->getFullname(); 27 | }else{ 28 | echo $fr->getReceptor()->getFullname(); 29 | } 30 | ?> 32 | 33 | Ver Perfil 34 | 35 |
41 | 42 |
43 |

No hay Amigos

44 |
45 | 46 |
47 |
48 |
49 |
50 |
51 | 52 | 53 | 54 |




-------------------------------------------------------------------------------- /core/modules/index/view/home/widget-default.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | Session::$user,"profile"=>Session::$profile,"from"=>"logged" ));?> 6 | 7 |
8 |
9 | 10 | 11 | Session::$user,"profile"=>Session::$profile,"from"=>"logged"));?> 12 | 13 |
14 |
15 |
16 |
17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /core/modules/index/view/index/widget-default.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

SMILE - Red Social

5 |

SMILE es un sistema de red social de proposito general, codigo abierto y gratis.

6 | 7 |

Descripcion

8 |

SMILE es un sistema de red social en el que puedes rellenar tu perfil, hacer publicaciones de texto y/o imagenes, buscar amigos, enviar, recibir y aceptar solicitudes de amistad, enviar mensajes a amigos, comentar y/o dar likes a las publicaciones, recibir notificaciones y mucho mas.

9 | 10 |

Dedicatoria

11 |

Este sistema se lo dedico a mis padres(Agustin Ramos de la Cruz y Maria de Lourdes Escalante Mendez) por que desde que empece en el mundo de las computadoras ellos me dieron su apoyo emocional y economico, me compraron computadoras, me pagaron mis estudios universitarios, estoy muy agradecido con ellos, los amo.

12 | 13 |

Modulos

14 |

Defino a grandes rasgos los modulos generales del sistema

15 | 16 |
    17 |
  • Usuarios: Se pueden registrar para acceder a sus cuentas y asi empezar la aventura smile.
  • 18 |
  • Publicaciones: Cada usuario puede publicar lo que quiera y lo visualizara en su muro, el cual podran ver tambien sus amigos.
  • 19 |
  • Perfiles: Los usuarios pueden rellenar su perfil, escribir sobre ellos, que les gusta y que no, sus amigos pueden ver esta informacion.
  • 20 |
  • Likes: Los usuarios pueden darle likes a las publicaciones y/o imagenes de sus amigos.
  • 21 |
  • Comentarios: Los usuarios pueden escribir comentarios a las publicaciones y/o imagenes de sus amigos.
  • 22 |
  • Imagenes: Poder subir imagenes, poner imagen de perfil.
  • 23 |
  • Amigos: Puedes buscar personas, enviarles solicitud de amistad, esperar a que te acepten o tu puedes recibir solicitudes y aceptarlas.
  • 24 |
  • Mensajes: Puedes enviar mensajes a tus amigos y tener conversaciones.
  • 25 |
  • Notificaciones: recibe notificaciones cuando tus amigos dan like o comentan tus publicaciones y/o imagenes.
  • 26 |
27 |
28 |
29 | 30 | 31 | 32 |
33 |
34 | Registro Gratis por Siempre! 35 |
36 | 37 |
38 |
39 |
40 | 41 | 42 |
43 |
44 | 45 | 46 |
47 |
48 | 49 | 50 |
51 |
52 | 53 | 54 |
55 |
56 | 57 | 58 |
59 |
60 | 63 |
64 | 65 |
66 |
67 |
68 |
69 |
70 |
71 | -------------------------------------------------------------------------------- /core/modules/index/view/layout.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | SMILE :) | Red Social de Proposito General 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 139 | 140 | 143 | 144 |

145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |

ENLACES

154 | 158 |
159 |
160 |
161 |
162 |

Evilnapsis © 2015. Todos los Derechos Reservados

163 |
164 |
165 |
166 |
167 | 168 | 169 | 170 | -------------------------------------------------------------------------------- /core/modules/index/view/myfriends/widget-default.php: -------------------------------------------------------------------------------- 1 | 2 | 5 |
6 |
7 |
8 | Session::$user,"profile"=>Session::$profile,"from"=>"logged" ));?> 9 | 10 |
11 |
12 |

Mis Amigos

13 | 0):?> 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 30 | 34 | 35 | read(); 37 | endforeach; ?> 38 |
Amigo
22 | receptor_id==Session::$user->id){ 25 | echo $fr->getSender()->getFullname(); 26 | }else{ 27 | echo $fr->getReceptor()->getFullname(); 28 | } 29 | ?> 31 | Ver Perfil 32 | Enviar Mensaje 33 |
39 | 40 |
41 |

No hay Amigos

42 |
43 | 44 |
45 |
46 |
47 |
48 |
49 | 50 | 51 | 52 |




-------------------------------------------------------------------------------- /core/modules/index/view/myphotos/widget-default.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | Session::$user,"profile"=>Session::$profile,"from"=>"logged" ));?> 6 | 7 |
8 |
9 | 10 | Session::$user,"profile"=>Session::$profile,"from"=>"logged"));?> 11 | 12 |
13 |
14 |
15 |
16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /core/modules/index/view/notifications/widget-default.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 | Session::$user,"profile"=>Session::$profile,"from"=>"logged" ));?> 8 | 9 |
10 |
11 |

Notificaciones

12 | 0):?> 13 | 14 | 15 | 16 | 17 | 18 | "> 19 | 30 | 31 | read(); 33 | endforeach; ?> 34 |
Notificacion
20 | not_type_id==1){ echo " Nuevo Like"; } 21 | else if($noti->not_type_id==2){ echo " Nuevo Comentario"; } 22 | ?> 23 | en 24 | type_id==1){ echo "Publicacion"; } 25 | else if($noti->type_id==2){ echo "Imagen"; } 26 | ?> 27 | por 28 | getSender()->getFullname();?> 29 |
35 | 36 |
37 |

No hay notificaciones

38 |
39 | 40 |
41 |
42 |
43 |
44 |
45 | 46 | 47 | 48 |




-------------------------------------------------------------------------------- /core/modules/index/view/photos/widget-default.php: -------------------------------------------------------------------------------- 1 | id); 4 | ?> 5 | 6 |
7 |
8 |
9 | $user,"profile"=>$profile,"from"=>"logged" ));?> 10 | $user));?> 11 |
12 |
13 | 14 | $user,"profile"=>$profile,"from"=>"logged"));?> 15 | 16 |
17 |
18 |
19 |
20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /core/modules/index/view/search/widget-default.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | Session::$user,"profile"=>Session::$profile,"from"=>"logged" ));?> 6 | 7 |
8 |
9 |

Buscar

10 |

Termino:

11 | 15 | 0):?> 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 32 | 33 | 34 |
 Usuario
24 | image!=""):?> 25 | 26 | 27 | 29 |

getFullname(); ?>
title;?>

30 | 31 |
35 | 36 |
37 |

No hay Resultados

38 |
39 | 40 |
41 |
42 |
43 |
44 |
45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /core/modules/index/view/sendmsg/widget-default.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 | Session::$user,"profile"=>Session::$profile,"from"=>"logged" ));?> 8 | 9 |
10 |
11 |

Enviar Mensaje

12 |
13 |
14 | 15 | 16 |
17 |
18 | 19 | 20 |
21 | 22 | 23 | 24 |
25 | 26 |
27 |
28 |
29 |
30 |
31 | 32 | 33 | 34 |




-------------------------------------------------------------------------------- /core/modules/index/view/team/widget-default.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | Session::$user,"team_id"=>$_GET["id"] ));?> 6 | 7 |
8 |
9 | 10 | 11 | Session::$user,"team_id"=>$_GET["id"]));?> 12 | 13 |
14 |
15 |
16 |
17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /core/modules/index/view/teams/widget-default.php: -------------------------------------------------------------------------------- 1 | 2 | 5 |
6 |
7 |
8 | Session::$user,"profile"=>Session::$profile,"from"=>"logged" ));?> 9 | 10 |
11 |
12 |

Grupos

13 | 14 |

Nuevo Grupo

15 |
16 |
17 | 18 | 19 |
20 | 21 |
22 | 23 | 24 | 0):?> 25 |

Grupos creados por mi

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 38 | 41 | 42 | 44 |
Grupo
34 | 35 | 36 | 37 | 39 | title;?> 40 |
45 | 46 |
47 |

No hay Grupos

48 |
49 | 50 |
51 |
52 |
53 |
54 |
55 | 56 | 57 | 58 |




-------------------------------------------------------------------------------- /core/modules/index/view/user/widget-default.php: -------------------------------------------------------------------------------- 1 | 8 |
9 |
10 |
11 | $user,"profile"=>$profile ,"from"=>$from)); 15 | Action::execute("_usermenu",array("user"=>$user,"from"=>$from)); 16 | ?> 17 | 18 | 19 |
20 |
21 | 22 | $user,"profile"=>$profile,"from"=>$from));?> 23 | 24 | 25 | 26 |
27 |
28 |
29 |
30 |
31 | 32 | 33 | 34 | 66 | 67 |
68 |
69 |
70 |
71 |

No se encontro el usuario

72 |
73 |
74 |
75 |
76 | 77 |

78 |

79 |

80 | -------------------------------------------------------------------------------- /core/modules/index/view/userinfo/widget-default.php: -------------------------------------------------------------------------------- 1 | 8 |
9 |
10 |
11 | $user,"profile"=>$profile ,"from"=>$from)); 15 | Action::execute("_usermenu",array("user"=>$user,"from"=>$from)); 16 | ?> 17 | 18 | 19 |
20 |
21 |

Informacion

22 | 23 | 24 | 25 | 26 | 27 | title!=""):?> 28 | 29 | 30 | 31 | 32 | 33 | bio!=""):?> 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | country_id!=null):?> 44 | 45 | 46 | 47 | 48 | 49 | 50 | gender!=""): $genders = array("h"=>"Hombre","m"=>"Mujer")?> 51 | 52 | 53 | 54 | 55 | 56 | day_of_birth!="0000-00-00"):?> 57 | 58 | 59 | 60 | 61 | 62 | sentimental_id!=null):?> 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | likes!=null):?> 72 | 73 | 74 | 75 | 76 | 77 | dislikes!=null):?> 78 | 79 | 80 | 81 | 82 | 83 |
NombregetFullname(); ?>
Ocupaciontitle; ?>
Sobre mibio; ?>
Datos personales
Paiscountry_id)->name; ?>
Sexogender]; ?>
Fecha de nacimientoday_of_birth; ?>
Situacion sentimentalsentimental_id)->name; ?>
Intereses
Me gustalikes; ?>
No Me gustadislikes; ?>
84 | 85 | 86 |
87 |
88 |
89 |
90 |
91 | 92 | 93 | 94 | 95 |
96 |
97 |
98 |
99 |

No se encontro el usuario

100 |
101 |
102 |
103 |
104 | 105 |

106 |

107 |

108 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | loadModule("index"); 14 | 15 | ?> -------------------------------------------------------------------------------- /res/bootstrap/css/bootstrap-theme.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} -------------------------------------------------------------------------------- /res/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /res/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /res/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /res/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /res/bootstrap/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /res/css/micss.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/css/micss.css -------------------------------------------------------------------------------- /res/font-awesome/css/font-awesome.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.4.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.4.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.4.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.4.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.4.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"} 5 | -------------------------------------------------------------------------------- /res/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /res/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /res/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /res/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /res/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /res/js/funciones.js: -------------------------------------------------------------------------------- 1 | // $(function(){ 2 | // alert("alerta de prueba!"); 3 | // }); -------------------------------------------------------------------------------- /res/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilnapsis/smile/f2089bf4e8d9dbdf653c543eddab3eaa577b5c18/res/main.png -------------------------------------------------------------------------------- /res/messages.css: -------------------------------------------------------------------------------- 1 | /* 2 | Author: Start Bootstrap - http://startbootstrap.com 3 | 'SB Admin' HTML Template by Start Bootstrap 4 | 5 | All Start Bootstrap themes are licensed under Apache 2.0. 6 | For more info and more free Bootstrap 3 HTML themes, visit http://startbootstrap.com! 7 | */ 8 | 9 | /* ATTN: This is mobile first CSS - to update 786px and up screen width use the media query near the bottom of the document! */ 10 | 11 | /* Global Styles */ 12 | 13 | 14 | /* Nav Messages */ 15 | 16 | .messages-dropdown .dropdown-menu .message-preview .avatar, 17 | .messages-dropdown .dropdown-menu .message-preview .name, 18 | .messages-dropdown .dropdown-menu .message-preview .message, 19 | .messages-dropdown .dropdown-menu .message-preview .time { 20 | display: block; 21 | } 22 | 23 | .messages-dropdown .dropdown-menu .message-preview .avatar { 24 | float: left; 25 | margin-right: 15px; 26 | } 27 | 28 | .messages-dropdown .dropdown-menu .message-preview .name { 29 | font-weight: bold; 30 | } 31 | 32 | .messages-dropdown .dropdown-menu .message-preview .message { 33 | font-size: 12px; 34 | } 35 | 36 | .messages-dropdown .dropdown-menu .message-preview .time { 37 | font-size: 12px; 38 | } 39 | 40 | 41 | 42 | /* Nav Messages */ 43 | 44 | .messages-dropdown .dropdown-menu { 45 | min-width: 300px; 46 | } 47 | 48 | .messages-dropdown .dropdown-menu li a { 49 | white-space: normal; 50 | } 51 | 52 | .navbar-collapse { 53 | padding-left: 15px !important; 54 | padding-right: 15px !important; 55 | } 56 | 57 | } 58 | 59 | 60 | -------------------------------------------------------------------------------- /schema.sql: -------------------------------------------------------------------------------- 1 | /** 2 | * @author evilnapsis 3 | * @brief Modelo de la base de datos 4 | **/ 5 | create database smile; 6 | use smile; 7 | 8 | create table user( 9 | id int not null auto_increment primary key, 10 | name varchar(50), 11 | lastname varchar(50), 12 | username varchar(50), 13 | email varchar(255), 14 | password varchar(60), 15 | code varchar(20), 16 | is_active boolean default 0, 17 | is_admin boolean default 0, 18 | created_at datetime 19 | ); 20 | 21 | /* insert into user(email,password,is_active,is_admin,created_at) value ("admin",sha1(md5("admin")),1,1,NOW()); */ 22 | 23 | create table recover ( 24 | id int not null auto_increment primary key, 25 | user_id int, 26 | code varchar(20), 27 | is_used boolean default 0, 28 | created_at datetime, 29 | foreign key(user_id) references user(id) 30 | ); 31 | 32 | create table level( 33 | id int not null auto_increment primary key, 34 | name varchar(50) 35 | ); 36 | insert into level (name) values ("Publico"), ("Solo amigos"), ("Amigos de mis amigos"); 37 | 38 | 39 | create table country( 40 | id int not null auto_increment primary key, 41 | name varchar(50), 42 | preffix varchar(50) 43 | ); 44 | 45 | insert into country(name,preffix) values ("Mexico","mx"),("Argentina","ar"),("Espa~a","es"),("Estados Unidos","eu"),("Chile","cl"),("Colombia","co"),("Peru","pe"); 46 | 47 | create table sentimental( 48 | id int not null auto_increment primary key, 49 | name varchar(50) 50 | ); 51 | 52 | insert into sentimental(name) values ("Soltero"),("Casado"); 53 | 54 | create table profile( 55 | day_of_birth date , 56 | gender varchar(1) , 57 | country_id int , 58 | image varchar(255), 59 | image_header varchar(255), 60 | title varchar(255), 61 | bio varchar(255), 62 | likes text, 63 | dislikes text, 64 | address varchar(255) , 65 | phone varchar(255) , 66 | public_email varchar(255) , 67 | user_id int , 68 | level_id int , 69 | sentimental_id int , 70 | foreign key (sentimental_id) references sentimental(id), 71 | foreign key (country_id) references country(id), 72 | foreign key (level_id) references level(id), 73 | foreign key (user_id) references user(id) 74 | ); 75 | 76 | 77 | create table album( 78 | id int not null auto_increment primary key, 79 | title varchar(200), 80 | content varchar(500), 81 | user_id int, 82 | level_id int, 83 | created_at datetime, 84 | foreign key (user_id) references user(id), 85 | foreign key (level_id) references level(id) 86 | ); 87 | 88 | create table image( 89 | id int not null auto_increment primary key, 90 | src varchar(255), 91 | title varchar(200), 92 | content varchar(500), 93 | user_id int, 94 | level_id int, 95 | album_id int, 96 | created_at datetime, 97 | foreign key (album_id) references album(id), 98 | foreign key (user_id) references user(id), 99 | foreign key (level_id) references level(id) 100 | ); 101 | 102 | /** 103 | * post_type_id 104 | * 1.- status 105 | * 2.- event 106 | **/ 107 | create table post( 108 | id int not null auto_increment primary key, 109 | title varchar(500) , 110 | content text, 111 | lat double , 112 | lng double , 113 | start_at datetime, 114 | finish_at datetime, 115 | receptor_type_id int default 1, /* 1.- user, 2.- group **/ 116 | author_ref_id int, 117 | receptor_ref_id int, 118 | level_id int, 119 | post_type_id int default 1, 120 | created_at datetime, 121 | foreign key (level_id) references level(id) 122 | ); 123 | 124 | create table post_image( 125 | post_id int, 126 | image_id int, 127 | foreign key (post_id) references post(id), 128 | foreign key (image_id) references image(id) 129 | ); 130 | 131 | /** 132 | * type_id: 133 | * 1.- post 134 | * 2.- image 135 | **/ 136 | create table heart( 137 | id int not null auto_increment primary key, 138 | type_id int default 1, 139 | ref_id int, 140 | user_id int, 141 | created_at datetime, 142 | foreign key (user_id) references user(id) 143 | ); 144 | 145 | create table comment( 146 | id int not null auto_increment primary key, 147 | type_id int, 148 | ref_id int, 149 | user_id int, 150 | content text, 151 | comment_id int, 152 | created_at datetime, 153 | foreign key (user_id) references user(id), 154 | foreign key (comment_id) references comment(id) 155 | ); 156 | 157 | create table friend( 158 | id int not null auto_increment primary key, 159 | sender_id int, 160 | receptor_id int, 161 | is_accepted boolean default 0, 162 | is_readed boolean default 0, 163 | created_at datetime, 164 | foreign key (sender_id) references user(id), 165 | foreign key (receptor_id) references user(id) 166 | ); 167 | 168 | create table conversation( 169 | id int not null auto_increment primary key, 170 | sender_id int, 171 | receptor_id int, 172 | created_at datetime, 173 | foreign key (sender_id) references user(id), 174 | foreign key (receptor_id) references user(id) 175 | ); 176 | 177 | create table message( 178 | id int not null auto_increment primary key, 179 | content text, 180 | user_id int, 181 | conversation_id int, 182 | created_at datetime, 183 | is_readed boolean default 0, 184 | foreign key (user_id) references user(id), 185 | foreign key (conversation_id) references conversation(id) 186 | ); 187 | 188 | /* 189 | not_type_id: 190 | 1.- like, 2.- comment 191 | type: 192 | 1.- post, 2.- image 193 | */ 194 | create table notification( 195 | id int not null auto_increment primary key, 196 | not_type_id int, 197 | type_id int, 198 | ref_id int, 199 | receptor_id int, 200 | sender_id int, 201 | is_readed boolean default 0, 202 | created_at datetime, 203 | foreign key (sender_id) references user(id), 204 | foreign key (receptor_id) references user(id) 205 | ); 206 | 207 | /* para grupos: no puedo usar la palabra reservada group, entonces uso team */ 208 | create table team ( 209 | id int not null auto_increment primary key, 210 | image varchar(200), 211 | title varchar(200), 212 | description varchar(500) , 213 | user_id int, 214 | status int default 1 /* 1.- open, 2.- closed */, 215 | created_at datetime, 216 | foreign key (user_id) references user(id) 217 | ); 218 | --------------------------------------------------------------------------------