Skip to content

Instantly share code, notes, and snippets.

View exileed's full-sized avatar
🎵
NP: North Star of Nija (Orbit Culture) (3:25/5:14)

Dmitriy Kuts exileed

🎵
NP: North Star of Nija (Orbit Culture) (3:25/5:14)
View GitHub Profile
<?php
$user_id = $_SESSION['user']['id'];
$STH = $pdo->query ( "SELECT * FROM dialog WHERE recive = $user_id OR send = $user_id ORDER by id DESC" );
$STH->setFetchMode ( PDO::FETCH_OBJ );
$row = $STH->fetch ();
$us_log1 = $row->send;
$us_log2 = $row->recive;
if ($us_log2 == $user_id) ($us_log2 = $us_log1);
<?php
require_once 'database_connection.php';
function authorize_user($groups = NULL) {
// Если не создан cookie-файл, проверять группы не нужно
if ((!isset($_COOKIE['user_id'])) || (!strlen($_COOKIE['user_id']) > 0)) {
header('Location: signin.php?' . 'error_message=Для просмотра этой страницы нужно зарегистрироваться.');
exit;
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
<?php
$sitemap = "sitemap.xml";
$startUrl = "http://php.net";
$extencions = [
".html",
".php",
"/",
];
$scanned = [];
@exileed
exileed / Can.php
Last active May 14, 2018 15:01 — forked from myvitaliy/index.php
index.php
<?php
namespace twelve;
require_once 'CanMove.php';
class Car
{
use CanMove;
<?php
/* connect to gmail */
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
$username = '****@gmail.com';
$password = 'PASSword';
echo "<script>console.log( 'Debug Objects: " . $username . "' ); </script>";
/* try to connect */
$items = array(
@exileed
exileed / index.html
Last active August 29, 2018 13:25 — forked from webstoun/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>uniMail</title>
</head>
<body>
<form action="mail.php" method="POST">
@exileed
exileed / index.php
Last active November 10, 2019 15:26
<?php
// PSR-12
// где phpdoc?
class Database
{
static private $instance = null;
private $connect;
private $config;
<?php
$host = 'loct';
$database = 'o';
$user = 'ro';
$password = 'ro00';
$link = mysqli_connect($host, $user, $password, $database)
or die("Ошибка " . mysqli_error($link));
@exileed
exileed / androidemulator.md
Created April 2, 2021 09:24 — forked from manojkulkarni30/androidemulator.md
Start Android Emulator From Command Line With Hyper V Feature Enabled