blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 116 | path stringlengths 2 241 | src_encoding stringclasses 31
values | length_bytes int64 14 3.6M | score float64 2.52 5.13 | int_score int64 3 5 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | text stringlengths 14 3.57M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
e898bd7eee74d8c554b9aacebba3b7f17b6e3c8d | PHP | JoaoMarcosCS/Aulas_PHP | /Aula_1_Variaveis_Constantes.php | UTF-8 | 479 | 3.421875 | 3 | [] | no_license | <?php
//comentario
/*comentario */
echo "<font color= #ff0000>primeira linha</font><br>";
echo "segunda linha";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Primeiro script PHP</ti... | true |
534bf3621e1b6d7752cf97826e34b12f072ec4ac | PHP | maxhohenlohe/invoiceninja | /app/Jobs/ExportReportResults.php | UTF-8 | 4,373 | 2.53125 | 3 | [
"AAL"
] | permissive | <?php
namespace App\Jobs;
use Utils;
use Excel;
use App\Jobs\Job;
class ExportReportResults extends Job
{
public function __construct($user, $format, $reportType, $params)
{
$this->user = $user;
$this->format = strtolower($format);
$this->reportType = $reportType;
$this->param... | true |
058c55916568c93677442da74483632509b57e82 | PHP | china-liweihong/catch-admin | /extend/catcher/library/Http.php | UTF-8 | 1,823 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace catcher\library;
use catcher\CatchAdmin;
use catcher\exceptions\FailedException;
use GuzzleHttp\Client;
use GuzzleHttp\TransferStats;
use Psr\Http\Message\ResponseInterface;
use function GuzzleHttp\Psr7\stream_for;
class Http
{
protected $auth = [];
protected $proxy = [];
/**
* down... | true |
9a37f32a3b2556eced5206d2938fc2e5f04164c4 | PHP | luanpcweb/events | /tests/Unit/Service/UserServiceTest.php | UTF-8 | 3,613 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Tests\Unit\Service;
use App\Entity\User;
use App\Exceptions\ErrorOnCreatingUser;
use App\Repository\UserRepository;
use App\Service\UserService;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
class UserServiceTest extends TestCase
{
... | true |
ba71efb768df1ad4473b4a6a2b203c46b2e2d21e | PHP | jeremyke/PHPBlog | /Swoole/Swoole/swoole-demo/1-create-http-server.php | UTF-8 | 1,291 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
// 创建这个swoole的http服务器的对象
$serv = new swoole_http_server('0.0.0.0', 8000);
// 把这个swoole的worker进程的数量调整为10个
$serv->set([
'daemonize' => true, // 表示swoole在后台运行
'worker_num' => 10,
'task_worker_num' => 10,
]);
// 当有请求过来时
$serv->on('connect', function(swoole_server $serv, int $fd, int $from_id) {
$se... | true |
69069da274fb06a7164a97a7d7ad6fea2b3379c0 | PHP | dalgama/restopresto | /sites/public/classes/Rating.php | UTF-8 | 3,642 | 2.640625 | 3 | [] | no_license | <?php declare(strict_types=1);
/**
* @author Cédric Clément <cclem054@uottawa.ca>
* @version 1.0
* @since 1.0
* (c) Copyright 2018 Cédric Clément.
*/
class Rating extends Model {
const PK1 = 'uid';
const PK2 = 'date_rated';
public function getPK(): array {
return [PK1, PK2];
}
pu... | true |
b91e62aaad515635d958f6d6ede6323a6b2a30e4 | PHP | tsisociesc/ABC-Blumenau | /admin/classes/util/Breadcrump.php | UTF-8 | 875 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | <?php
class Breadcrump
{
private $itens;
public function __construct()
{
$this->add("Início", '/');
}
public function addItens($v){
$this->itens[] = $v;
}
public function getItens() {
return $this->itens;
}
public function add($discricao, $link = '') {
... | true |
b12c8bc85665bb53dd367888d9476d6b2d511490 | PHP | Yipartner/ITEXAM | /app/Tools/ValidationHelper.php | UTF-8 | 1,141 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: mark
* Date: 17/6/29
* Time: 下午11:24
*/
namespace App\Tools;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
/**
* 表单验证辅助类
* Class ValidationHelper
* @package App\Common
*/
class ValidationHelper
{
public static function validateCheck(arra... | true |
9b8dd570a3bf8ae03c7620dc0f828417be4560f0 | PHP | marrufovic/stuffiwouldbuy | /login.php | UTF-8 | 6,898 | 2.578125 | 3 | [] | no_license | <?php
include_once("phpIncludes/check_login_status.php");
// If user is already logged in, header away
//index.php?u=".$_SESSION["username"]
//javascript: "user.php?u="+ajax.responseText;
if($user_ok == true){
header("location: index.php?u=".$_SESSION["username"]);
exit();
}
?>
<?php
// AJAX CALLS THIS L... | true |
5032c5d5b524c23bf6e26cd194e076884c021216 | PHP | andrey-tushev/algorithms | /queens.php | UTF-8 | 2,385 | 3.359375 | 3 | [] | no_license | #!/usr/bin/php
<?php
/*
*/
class Task {
public $size = 8;
public $board = [];
public $count = 0;
private $strikeCol = [];
private $strikeDiag1 = [];
private $strikeDiag2 = [];
public function __construct()
{
for ($r=0; $r<$this->size; $r++) {
for ($c=0; $c<$this->s... | true |
ef5266cc09f8939958d282f6fad375da8517d1f8 | PHP | ilkka-rautiainen/mealbookers | /php/app/DB.php | UTF-8 | 8,100 | 3.203125 | 3 | [] | no_license | <?php
class DB
{
private static $instance = null;
private $connection = null;
private $insertId;
private $lastResult;
private $transactionActive = false;
/**
* Singleton pattern: private constructor
* Connects to PostgreSQL database
*/
private function __construct()
{
... | true |
e9f3f2e5c6bc0e795756297bc26b311b1ee625c9 | PHP | regisbaldo/Biblioteca- | /database/factories/BookFactory.php | UTF-8 | 600 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\Book;
use Faker\Generator as Faker;
$factory->define(Book::class, function (Faker $faker) {
return [
'name' => $faker->name,
'genre' => $faker->word,
'summary' => $faker->text($maxNbChars = 200),
'pages' => $... | true |
53a752d0f0ec55ed43db00a706d574c59aefbdd4 | PHP | KatsuoRyuu/KryuuOccasus | /src/KryuuOccasus/Options.php | UTF-8 | 5,216 | 2.703125 | 3 | [] | no_license | <?php
/*
* @license The Ryuu Technology License
*
* Copyright 2014 Ryuu Technology by
* KatsuoRyuu <anders-github@drake-development.org>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the ... | true |
5995c70889198166f8e2c746f7a6e9e769557804 | PHP | SztifModeL/git_ChatBot_CI_beta_v2.0 | /test_logi_ci.php | UTF-8 | 681 | 2.640625 | 3 | [] | no_license | <?php
echo '<form method="post">
USER: <input type="text" name="question" />
<input type="submit" value="zapytaj">
</form>';
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
echo "USER: ".$_POST['question']."</br>";
$q_user = $_POST['question'];
$kw_logi = "logi";
if(stristr($q_user, $kw_logi)!==False)
{
echo... | true |
5e0a8e8f79f0a1cbe4af311ffa69a037af484ef5 | PHP | laou75/tarot | /pages/32.inc.php | UTF-8 | 1,719 | 2.6875 | 3 | [] | no_license | <?php
$form = new Formulaire();
if (count($_POST)>0)
$form->setValeurs($_POST);
else
{
$form->setValeur("id_tournoi", $_GET["id_tournoi"]);
$form->setValeur("id", $_GET["id_session"]);
$sessions = new Session($this->db);
$row = $sessions->getArraySessionById($_GET["id_tournoi"], $_GET["id_session"]);
$for... | true |
50135b82b46f6dda8cff4afa2e9a8829ae1ef7b6 | PHP | nosorrow/sport-toto | /getdata.php | UTF-8 | 1,373 | 2.96875 | 3 | [] | no_license | <?php
// do not direct access
define('AJAX_REQUEST', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
if(!AJAX_REQUEST) {die('silence');}
include_once "src/TotoChecker.php";
if (isset($_POST)) {
$igra = $_POST['igra'];
$checker = TotoChecker::fac... | true |
f44bf72b814767cd1a0d139fa595e6da13e51a79 | PHP | shagholian/base | /packages/base/libraries/cache/database.php | UTF-8 | 1,534 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace packages\base\cache;
use \Memcached;
use \packages\base\date;
use \packages\base\db;
class database implements Ihandler{
private $options;
private $connection;
public function __construct($options){
$this->options = $options;
if(!isset($this->options['prefix'])){
$this->options['prefix'] = '';... | true |
7c64cbc4d0bdf219086491a353d728cfa657f84b | PHP | ktwbc/XeroBundle | /Model/Accounting/LineItem.php | UTF-8 | 2,164 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by James Robertson
* Date: 6/03/15
* Time: 9:33 AM
*/
namespace Jarobe\XeroBundle\Model\Accounting;
class LineItem {
/**
* @var string
*/
private $description;
/**
* @var string
*/
private $quantity;
/**
* @var integer
* In cents, so amount ... | true |
25812ed339c61f25ddeea72a4aa27ee74f813f19 | PHP | Adarsh555/Web-ChatApplication | /view/password_change.php | UTF-8 | 3,835 | 2.546875 | 3 | [] | no_license | <?php
session_start();
$_SESSION['id'];
$conn = mysqli_connect("localhost", "vismay", "root", "chatapp") or die("Connection Error: " . mysqli_error($conn));
if (count($_POST) > 0) {
$result = mysqli_query($conn, "SELECT *from addcontact WHERE id='" . $_SESSION["id"] . "'");
//print_r($result);
$row = mysqli_fe... | true |
fc70ffbe31043215f3c5c83dae883144367d1de0 | PHP | sijibon/PHP | /string/str_rev_str_shuffle.php | UTF-8 | 126 | 2.828125 | 3 | [] | no_license | <?php
//strrev
$name = "jibon shohidukl";
echo strrev($name);
echo "<br>";
//str_shuffle
$name = "jibon shohidukl";
echo str_shuffle($name); | true |
571003068cbe160080da8e46e2987394e29f3455 | PHP | jskvara/NetCMS | /app/models/entity/TranslationEntity.php | UTF-8 | 827 | 2.875 | 3 | [] | no_license | <?php
class TranslationEntity extends AbstractEntity {
/** @id @generatedValue @column(type="integer") */
private $id;
private $original;
private $translation;
public function __construct($id = null, $original = null, $translation = null) {
if (is_array($id)) {
$this->fromArray($id);
} else {
$th... | true |
f96b02d4c9a4de7bde0ccdf8f8b48d90a9d40d3b | PHP | wisdomcraft/master-worker | /update_patent_chinaindex.php | UTF-8 | 21,731 | 2.5625 | 3 | [] | no_license | <?php
/*
* select application numbers from patent_cn_patentindex, and then insert them into patent_cn_patent
* use this plug by php commond-line
*/
class application_number{
private $model = 'start';
public $previous_patent_order = null;
private $memory_overflow_file = 'memory_overflo... | true |
a57ab01a292f070d9ed2c089836739d7056005c8 | PHP | omgjrswtf/bataanspacecable | /core/classes/user.php | UTF-8 | 1,031 | 2.953125 | 3 | [] | no_license | <?php
class User {
public $userid;
public $username;
public $employee;
public $upcrno;
public $password;
public $active;
public $status;
public $atcreate;
public $atupdate;
public function __construct($data = null)
{
//echo 'The class "', __CLASS__, '" was created.<br />';
}
public ... | true |
822110a082df1b8fb79df824ed33f257a8c57165 | PHP | Rushane/info2180-project3 | /displayjob.php | UTF-8 | 424 | 2.59375 | 3 | [] | no_license | <?php
$host = getenv('IP');
$username = getenv('C9_USER');
$password = '';
$dbname = 'HireMeDB';
try{
$conn = new PDO("mysql:host=$host;dbname=$dbname", $username, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e){
echo $e;
}
$sql = "SELECT * FROM Jobs"; ... | true |
6fe0acc5c2e21960c61275f1bb1dc0c40584bca8 | PHP | SiliconValet/oop_particles | /Step1/Main.php | UTF-8 | 497 | 3.140625 | 3 | [] | no_license | <?php
require_once __DIR__ . '/Electron.php';
require_once __DIR__ . '/Proton.php';
require_once __DIR__ . '/Atom.php';
$electrons = array();
$protons = array();
$neutrons = array();
$electron = new Electron();
$proton = new Proton();
array_push($electrons, $electron);
array_push($protons, $proton);
$hydrogen = ne... | true |
321a431c1cc0f0bec64033c302c1fa618dc30cf9 | PHP | Danack/Blog | /lib/Blog/Form/LoginForm.php | UTF-8 | 2,351 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Blog\Form;
use FCForms\Form\Form;
class LoginForm extends Form
{
public function getDefinition()
{
$definition = array(
'requireHTTPS' => true,
'startElements' => [
[
'type' => 'FCForms\FormElement\Title',
... | true |
9c0d018e20aef6a05bf0794ee7f386236548c947 | PHP | mohiduzzaman/Online-Shomobay-Shomiti---Webtech-Project | /Friends.php | UTF-8 | 3,461 | 2.5625 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php
include_once("navbar.php");
?>
<meta charset="UTF-8">
<title>My Friends</title>
</head>
<body>
<form action = "Friends.php" method="post">
<table cellspacing="0px" border = "1px" height = "700px" width="1000px" align="center" border =... | true |
51594c70b10f5fb2cdbafb54e3115b5d1c005d24 | PHP | aaerofeev/gambossapi | /core/api/game.php | UTF-8 | 966 | 2.75 | 3 | [] | no_license | <?php
/**
* Модель игры
*
* Class Game
*/
class Game {
public $id;
public $rate;
public $name;
public $lead;
public $latin;
public $thumb;
public $picture;
public $created;
public $mask;
public $embed;
public $desc;
public $screen = array();
public $links = arr... | true |
0ed6dc54cc46f86be0df0dcd90d2c54f2cd321d3 | PHP | FranciscoTamele/php_curso | /lesson/beginer/27- Crud (Create Read Update Delete)/php_action/add_cliente.php | UTF-8 | 774 | 2.5625 | 3 | [] | no_license | <?php
// iniciar a sessao
//session_start();
// Adicionar a conexao
include_once "connection.php";
if(isset($_POST['btnDados'])){
$nome=mysqli_escape_string($connection,$_POST['nome']);
$morada=mysqli_escape_string($connection,$_POST['morada']);
$contacto=mysqli_escape_string($connection,$_POST['contac... | true |
34c2ce0cc4ee04cec64fd5f40c196451e403b254 | PHP | neokike/laravel-elasticsearch-query-builder | /src/Queries/Match/MatchPhraseQuery.php | UTF-8 | 1,067 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Neokike\LaravelElasticsearchQueryBuilder\Queries\Match;
use Neokike\LaravelElasticsearchQueryBuilder\Interfaces\QueryInterface;
class MatchPhraseQuery implements QueryInterface
{
protected $field;
protected $value;
/**
* @var null
*/
private $analyzer;
/**
* @var ar... | true |
e0e4e7471a0c7e13136d5e61b54502221dd7d912 | PHP | bytic/mail | /_legacy/LegacyMessageMethods.php | UTF-8 | 504 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Nip\Mail;
trait LegacyMessageMethods
{
/**
* @param $from
*
* @deprecated use addFrom() instead
*
* @return $this
*/
public function setFrom($from): self
{
return $this->addFrom($from);
}
/**
* @param $subject
... | true |
428f5f35977afb9afb631e589ac3d1c6e3c2dda7 | PHP | v-iskan/1031221-doingsdone-9 | /functions.php | UTF-8 | 820 | 3.203125 | 3 | [] | no_license | <?php
function taskCounting($tasks, $projects)
{
$count = 0;
foreach ($tasks as $key => $val)
{
if ($val["name_project"] === $projects)
{
$count++;
}
}
return $count;
};
function esc($var)
{
$text = htmlspecialchars($var);
return $text;
};
function dat... | true |
e5bbaf12a2e87e3c8cf4f2fc15e18d66c57f5cdb | PHP | ResPecTD8/baobab | /classes/log.class.php | UTF-8 | 1,358 | 3.421875 | 3 | [] | no_license | <?php
namespace baobab;
class LogLevel {
const NONE = 0;
const ERROR = 1;
const WARN = 2;
const INFO = 3;
const DEBUG = 4;
const ALL = 100;
public static $enums= array(
self::NONE => "none",
self::ERROR => "error",
self::WARN => "warn",
self::INFO => "info... | true |
896689a19396e0049408d2684578d6b3f41f4bc2 | PHP | yennhi0605/MilkTeaShop | /MilkTea/View/indexUser.php | UTF-8 | 6,132 | 2.515625 | 3 | [] | no_license | <?php
require "../Database/database.php";
require "../Model/Coffee.php";
require "../Model/Juice_Tea.php";
require "../Model/Milktea.php";
require "../Model/Smoothie.php";
session_start();
$sql = "SELECT * from MilkTea";
$result = $db->query($sql)->fetch_all(MYSQLI_ASSOC);
$milkteas = array();
for ($i =... | true |
b238b4bc3ddf555d8fe5caedf2c169989eee21c1 | PHP | IceMaD/LeekTools | /src/Command/ScriptsPushCommand.php | UTF-8 | 1,696 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Command;
use function GuzzleHttp\Promise\unwrap;
use IceMaD\LeekWarsApiBundle\Response\Ai\SaveResponse;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ScriptsPushCommand extends ScriptsCommand
{
protected static $defaultName = '... | true |
71129941e8f266e4b1439f0c951ac090c897c2d1 | PHP | dessydps/praktikum-web | /110533430551/praktikum ke-5/seleksi.php | UTF-8 | 915 | 2.84375 | 3 | [] | no_license | <?php
//File: seleksi.php
//koneksi
require_once './koneksi.php';
//seleksi data
$sql = 'SELECT * FROM mahasiswa';
$res = mysql_query($sql);
if($res) { //jika ya, maka data yang diambil ditampilkan
if(mysql_num_rows($res)) {?>
<!--membuat tabel-->
<table border=1 cellspacing=1 cellpadding=5>
<tr>
<th>#</th> <!--k... | true |
a1e135e53c82569271c18e3a96bfd1d31eebd2d9 | PHP | fschuermeyer/example-php-database-connection | /klassen/index.php | UTF-8 | 785 | 3.109375 | 3 | [] | no_license | <?php
require_once('ConnectionPDO.php');
/* Connection PDO instanz erzeugen um dann auf die Methoden der Klasse "Connection PDO"
erfolreich zugreifen zu können. */
$pdo = new ConnectionPDO([
'host' => '127.0.0.1:3306', // Host IP der Datenbank
'name' => 'Testing', // Name... | true |
5d3724fd77f83d4cecb47f8121dd6124f8795230 | PHP | NikoRoberts/BuzzerBeaterStats | /league.php | UTF-8 | 6,768 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php include("header.php");
$_SESSION['returnPage'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
?>
<div id="xsnazzy">
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
<div class="xboxcontent">
<p> </p>
<?php
if ($_SESSION['loggedin'] == true)
{... | true |
758b23bf8a5b0b399a351c6040fb27b1955b23ab | PHP | iDev1ce/New-PHP | /cms/filiais.php | UTF-8 | 7,087 | 2.828125 | 3 | [] | no_license | <?php
if (!file_exists(include_once('../db/conexao.php')))
include_once('../db/conexao.php');
$button = 'Cadastrar';
$conexao = conexaoMySQL();
// Editar registro no banco
if (isset($_GET['action']) && strtoupper($_GET['action']) === 'EDIT') {
$id = $_GET['id'];
... | true |
2765b16420aaed9cc438a945599fd4c40659fa5d | PHP | PageBoost/hipchat-php-v2 | /src/PageBoost/HipChatV2/Resources/Emoticons.php | UTF-8 | 1,302 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace PageBoost\HipChatV2\Resources;
use PageBoost\HipChatV2\Contracts\RequestInterface;
class Emoticons extends BaseExpand
{
protected $request = null;
protected $id = null;
public function __construct($id_or_shortcode, RequestInterface $request)
{
$this->id = $id_or_shortcode;
... | true |
d48a825b517d75fb1a9e302e2fa3619a7df84898 | PHP | lyjen/crud-restful-api | /database/migrations/2020_02_08_114525_create_payment_options_table.php | UTF-8 | 858 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePaymentOptionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('payment_... | true |
8e40932b7c44b780b42138f589fae211119b22bb | PHP | andreas22/shared-settings | /workbench/ac/sharedsettings/src/repositories/APIFiltersRepositoryInterface.php | UTF-8 | 1,412 | 2.859375 | 3 | [] | no_license | <?php namespace Ac\SharedSettings\Repositories;
interface APIFiltersRepositoryInterface
{
/**
* Check if given coded exists
*
* @param $code
* @return bool
*/
public function validateIfDataCodeExists($code);
/**
* Check if given coded are private
*
* @param $code
... | true |
94c387ed6c5e0594a710cb0c91a0fac25a8051f9 | PHP | ejaymejr/snapps-orion | /lib/model/hr/TkDtrsummaryMealPeer.php | UTF-8 | 1,429 | 2.640625 | 3 | [] | no_license | <?php
/**
* Subclass for performing query and update operations on the 'tk_dtrsummary_meal' table.
*
*
*
* @package lib.model.hr
*/
class TkDtrsummaryMealPeer extends BaseTkDtrsummaryMealPeer
{
public static function GetOptimizedDatabyEmployeeNo($empNo, $fldList)
{
$c = new Criteria();
... | true |
d91618df1cd223a22a77c24d01f147d9d6c64d48 | PHP | JustZack/WebAdvertising | /CMS/ContentLoader.php | UTF-8 | 9,474 | 2.875 | 3 | [] | no_license | <?php
/*
This file is meant to be used where globals.php is present!
*/
/*
Used to track the number of ads.
MUST start at 0!
Ad count is increased before it is printed into an ID for the element.
*/
$Ad_Count = 0;
/*
Function used to load all content that ... | true |
f25b61e3442eca0e48f01e831820b75be5f2a081 | PHP | WesleyXavier99/3DAW | /RemoverCliente.php | UTF-8 | 1,919 | 3 | 3 | [] | no_license | <?php
//REMOVER
if ($_SERVER['REQUEST_METHOD']=='POST') {
//Receber informações do usuario
$id = $_POST["id"];
//validar informações do usuario
if ($id != "") {
$validacão = 1;
}else{
$validacão = 0;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="sty... | true |
262d40d246ccd106c7e992c30dbee93cc099d454 | PHP | tigerk/Beauty-Framework | /src/Database/Connector/MysqlConnector.php | UTF-8 | 3,093 | 2.984375 | 3 | [] | no_license | <?php
namespace Beauty\Database\Connector;
use Beauty\Core\App;
class MysqlConnector
{
CONST QUERY_MASTER_CHANNEL = "master";
CONST QUERY_SLAVE_CHANNEL = "slave";
/**
* The active connection instances.
*
* @var array
*/
static $connections = [];
/**
* The connection c... | true |
69be45c5486e6a34e35e4f4ddd674845b33af5e7 | PHP | Fainke/projet | /src/Controller/HomeController.php | UTF-8 | 3,630 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: stagiaire
* Date: 25/06/2018
* Time: 12:20
*/
namespace App\Controller;
use App\Entity\IdentityUser;
use App\Form\IdentityUserType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Componen... | true |
8727c40d3111381c050e02d05aadee2c3bd9c93d | PHP | Awais-Mumtaz/FYP- | /VenueBookingSystem/change-pass.php | UTF-8 | 3,659 | 2.734375 | 3 | [] | no_license | <?php
if (isset($_POST['user_pass'])) {
$uid = mysqli_real_escape_string($connection, $_POST['user_id']);
$user_pwd = mysqli_real_escape_string($connection, $_POST['user_pwd']);
$user_pass = mysqli_real_escape_string($connection, $_POST['user_pass']);
$user_pass_c = mysqli_real_escape_string($connectio... | true |
2af39454e1795ea85d9e2ee2fbbdcda3ca361f44 | PHP | Stratadox/Clock | /tests/fast_forwarding_the_clock.php | UTF-8 | 1,595 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Stratadox\Clock\Test;
use DateInterval;
use DateTime;
use PHPUnit\Framework\TestCase;
use Stratadox\Clock\RewindableDateTimeClock;
/**
* @testdox fast-forwarding the clock
*/
class fast_forwarding_the_clock extends TestCase
{
/** @test */
function fast_forward_by_te... | true |
67b06600f91121d28d84445dbca004475e09ab1a | PHP | servandserv/school30 | /classes/School/Application/CreatePersonUseCase.php | UTF-8 | 300 | 2.546875 | 3 | [] | no_license | <?php
namespace School\Application;
class CreatePersonUseCase {
public function __construct() {
}
public function execute() {
$app = \App::getInstance();
$em = new \School\Port\Adaptor\Persistence\PDO\PersonEntityManager();
$person = $em->create( $app->REQUEST );
return $person;
}
} | true |
223a4352104a4f2a52fa50dfc2e11c1522421ba5 | PHP | nattana-chira/project-coolcourse | /app/Services/UserService.php | UTF-8 | 2,662 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Repositories\UserRepositoryInterface;
use App\Repositories\StudentRepositoryInterface;
use App\Repositories\InstructorRepositoryInterface;
use Illuminate\Support\Facades\Hash;
class UserService
{
protected $user;
protected $student;
protected $instructor;
public functi... | true |
b63945af5b7b4c02ace868c360fc8f0e4b4e4933 | PHP | deshmukhmanas/Php-Programs | /arraytask3.php | UTF-8 | 1,295 | 3 | 3 | [] | no_license | <?php
function information($t_info){
$final_data=array();
$teainfo=array();
foreach($t_info as $teacher_num => $teachers_data){
echo "<pre>".print_r($teachers_data,true)."</pre>";
foreach($teachers_data as $t_key => $t_value){
if ($t_key == 0){
... | true |
baeeb61c98247800464e0df60b4e887bb0a6779e | PHP | sylvestreee/Projet-BDD-ProgWeb | /modeles/afficher_recette.php | UTF-8 | 1,153 | 3.046875 | 3 | [] | no_license | <?php
// Récupération d'informations sur une recette à partir de son nom
function info_recette($nom_recette)
{
$pdo = PDO2::getInstance();
$requete = $pdo->prepare("SELECT nom_recette, auteur, descriptif, difficulte, prix, nb_personnes
FROM RECETTE
WHERE
nom_recette = :nom_recette");
$requete->bindValue('... | true |
f4976a1d321282c2130129ba4a7a5136fbd17d31 | PHP | yohochen/CMPE272 | /user.php | UTF-8 | 8,477 | 2.734375 | 3 | [] | no_license | <?php
session_start();
$server = 'localhost';
$username = 'root';
$password = 'password';
$db = 'cmpe272';
$conn = new mysqli($server, $username, $password, $db);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$GLOBALS['conn'] = $conn;
$GLOBALS['allUser'] = fetchAll();
$GLOBALS... | true |
d07f0e7de5b12e55792065d61fefad8976d836ef | PHP | Noman253545/Noman253545 | /class8.php | UTF-8 | 363 | 2.75 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>class-8-php</title>
</head>
<body>
<?php
echo @$_GET['abc']."<br>";
echo @$_GET['address']."<br>";
if(isset($_GET['city']))
{
echo $_GET['city']."<br>";
}
?>
<h1>Welcome <?php echo $_SESSIO... | true |
de76d21df6e164aadf0485819ef2a868569675e5 | PHP | eliseoeric/flight_deck | /app/FlightDeck/Representatives/Events/RepUpdated.php | UTF-8 | 419 | 2.71875 | 3 | [] | no_license | <?php namespace FlightDeck\Representatives\Events;
use FlightDeck\Representatives\Representative;
class RepUpdated {
public $rep;
/**
* @param Representative $rep
*
*/
public function __construct(Representative $rep)
{
// This is an event handler, from here we have access to the
// user model, and can... | true |
cd40497ebde3bee0db4c4dc230c8ecd42b84c8a2 | PHP | bhalexx/blog | /core/Session.php | UTF-8 | 687 | 3.109375 | 3 | [] | no_license | <?php
namespace Core;
class Session {
public function __construct() {
session_start();
}
/*
* Sets CSRF token
*/
public function setToken($token) {
$_SESSION['token'] = $token;
}
/*
* Gets CSRF token
*/
public function getToken() {
return $_SESSION['token'];
}
/*
* Sets ... | true |
d9bc6c18fb96ca057b82ab75f88f88cdd0e1dccf | PHP | Crown-Commercial-Service/CCS-Website-Strata-Frontend | /src/Content/Field/AssetField.php | UTF-8 | 5,159 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Strata\Frontend\Content\Field;
use Strata\Frontend\Exception\InvalidMimeTypeException;
/**
* Asset content field
*
* @package Strata\Frontend\Content\Field
*/
class AssetField extends ContentField
{
protected $url;
protected $title = '';
protected $descriptio... | true |
d86106973ee3fc7b2e3358568458f9fcd65a1035 | PHP | linkorb/dnsx | /src/Adapter/TransIPAdapter.php | UTF-8 | 1,643 | 2.8125 | 3 | [] | no_license | <?php
namespace DnsX\Adapter;
use DnsX\Model\DnsRecord;
class TransIPAdapter
{
protected $client;
protected $domainApi;
public function __construct($username, $key)
{
$this->client = new \TransIP\Client($username, $key);
$this->domainApi = $this->client->api('domain');
}
pub... | true |
98962aee8bd75d5cc47d2cbfc5ea1592098fb68d | PHP | Arbitwah/phpFinal | /PHPFinal/Admin/editProduct.php | UTF-8 | 2,141 | 2.53125 | 3 | [] | no_license | <?php if(!isset($_SESSION)){session_start();} ?>
<?php if($_SESSION['valid']!="yes"){
header('Location: ./index.php');
exit();
}?>
<?php include "../view/header.php"; ?>
<form action="home.php" method="POST" enctype="multipart/form-data" class="col-md-4">
<?php $singleProd = getOneProduct($productID); foreach($... | true |
6b3f601a7c4cd543ec666597b81e156c86405768 | PHP | jeffakaufman/musicalhealth | /frameworks/singfit/SingFitAutoDebugTools.php | UTF-8 | 1,290 | 2.8125 | 3 | [] | no_license | <?php
# -*- coding: utf-8 -*-
//
// Copyright (C) 2011 Sonoma Wire Works. All rights reserved.
//
require_once dirname(__FILE__).'/SingFitDatabaseConnection.php';
function __SingFitAutoDebugToolsAnalyzeMemory($obj, $deep = false)
{
if (!is_scalar($obj)) {
$usage = array('Total'=>strlen(serialize($obj)));
while... | true |
526ab151f2f2528408ea3d6d361ece515f28a29b | PHP | frosso/wp_snippets | /percent_complete/models/percent_complete/ITodoItem.php | UTF-8 | 255 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
interface ITodoItem {
/**
* @return sting|null
*/
public function getDescription();
/**
* @return bool
*/
public function isComplete();
/**
* @return string
*/
public function getLink();
} | true |
7d4761257f52c8da52435517fc5b5a70fa449ef8 | PHP | Tingwei-Justin/AI-Discovery-System-Website | /html/login.php | UTF-8 | 2,287 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Justin_Joe
* Date: 5/1/2018
* Time: 2:38 PM
*/
if(isset($_GET["id"]) && $_GET["id"]=="login")
{
session_start();
if(isset($_SESSION["username"]))
{
sleep(1);
echo "Hello, ".$_SESSION["username"];
}
els... | true |
304cef7b1102d5020edfd1f23d2169571e3c04bb | PHP | dms-org/core | /src/Model/IMutableObjectSet.php | UTF-8 | 1,975 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace Dms\Core\Model;
use Dms\Core\Exception;
/**
* The object set interface that is able to identify objects by a integer
* and hence mutate them via their ids.
*
* @author Elliot Levin <elliot@aanet.com.au>
*/
interface IMutableObjectSet extends IIdentifiableObjectSet
{
... | true |
d5b056a3fcfa3cdfd6b5cfdd365fffef47244eca | PHP | AL127/miscellany | /app/Http/Controllers/Auth/AuthController.php | UTF-8 | 3,599 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\User;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Support\Facades\Auth;
use Laravel\Socialite\Facades\Socialite;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class AuthController ext... | true |
ca0b4a20b516222e2625fe1dfc166948c3902e98 | PHP | matheusmauricio/transparencia | /app/Auxiliar.php | UTF-8 | 4,008 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
class Auxiliar
{
public static function linkReplace($url, $valor)
{
$valor = ajusteUrl($valor);
$url = str_replace('nivelAtual', $valor, $url);
return $url;
}
public static function ajusteUrl($valor)... | true |
11a33265d95094a72efa6fc62962cfcb0b6c8db6 | PHP | msalahat88/posting_system | /application/libraries/admin/members_page_render.php | UTF-8 | 2,106 | 2.75 | 3 | [] | no_license | <?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
class members_page_render
{
private $CI ;
private $DATA;
private $__DIRECTORY = 'admin/members/';
private $__FILE_HTML = '__VIEW_HTML';
private $__FILE_CSS = '__VIEW_CSS';
private $__FILE_JS = '__VIEW_JS';
pr... | true |
677065c98b45546415dd6e6e7ad35c0d2bf19835 | PHP | sms-js/laravel_school_managment-_system | /app/Result.php | UTF-8 | 816 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
use App\Student;
use Illuminate\Database\Eloquent\SoftDeletes;
class Result extends Model
{
use SoftDeletes;
protected $fillable = [
'session', 'term', 'class', 'subject', 'roll', 'first_test', 'second_test', 'third_test'... | true |
61d241661ff9f57f98543ed7ef1ca6d95fd7334b | PHP | jkwong69/fictional-octo-succotash | /catalog/show.php | UTF-8 | 2,921 | 2.59375 | 3 | [] | no_license | <?php
session_start();
include 'header.php';
function replaceSpace($string){
return str_replace(" ","%",$string);
}
function getPost($string){
if( array_key_exists($string,$_GET)){
return replaceSpace($_GET[$string]);
}
else{
return "";
}
}
function populateTable(){
require '../Creden... | true |
28e062d7ae9a3b185dec20c73d660401d0f07aa3 | PHP | appcompass/appcompass-php | /src/Builders/MenuBuilder.php | UTF-8 | 9,575 | 2.90625 | 3 | [] | no_license | <?php
namespace AppCompass\Builders;
use Closure;
use Illuminate\Database\Eloquent\Model;
use AppCompass\Interfaces\WebPropertyModelInterface;
use AppCompass\Models\Page;
use AppCompass\Models\Link;
use AppCompass\Models\Menu;
use AppCompass\Models\MenuItem;
use Illuminate\Database\Eloquent\ModelNotFoundException;
c... | true |
12342bd23b34b1d118e8284714b14e897cacb0ba | PHP | qianshou/zabbix | /include/classes/core/CHttpRequest.php | UTF-8 | 3,157 | 2.703125 | 3 | [] | no_license | <?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** Th... | true |
c9ef70e16ffee9c5efffc43081330f48d823315b | PHP | joaoxbatista/phpoo | /classes/Mensagem.php | UTF-8 | 502 | 2.5625 | 3 | [] | no_license | <?php
class Mensagem{
public function sucesso($mensagem){
return "<div class='alert alert-success'>
<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
<strong>Sucesso! </strong>".$mensagem.
"</div>";
}
public function erro($mensagem){
return "<div cl... | true |
fa1b8eca7ea16989da457067cce9020c8065c457 | PHP | bitdreamer/website | /logger5Loop.php | UTF-8 | 2,908 | 2.671875 | 3 | [] | no_license | <?php
// This page is the target of the link from the email we sent
// to the user. It should have in the URL username=whatever
// and confirmationNumber=42 (or whatever their number is).
// They should also do it the same day as when they started
// registration.
session_start();
include("includeInAll.php");... | true |
f3c6b3bad41b4ff3f2118efb3ab76d60d61828d6 | PHP | chandra92kurniawan/kursus | /models/TblGuru.php | UTF-8 | 1,499 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "guru".
*
* @property integer $id_guru
* @property string $nama_guru
* @property string $alamat
* @property string $email
* @property integer $no_hp
* @property string $create_by
* @property string $create_date
* @property string ... | true |
ce00c6815dc93046b5e69a7fc805faa1ef16dae6 | PHP | younes-dev/php-course | /codes/lecture_2/11_built_in_functions.php | UTF-8 | 940 | 3.921875 | 4 | [] | no_license | <?php
// Date & Time functions
echo date("Y-m-d");
echo date("d/m/Y");
echo time();
// ---------------------------------------------------------------------------------------------------------------------
// String manipulation functions
$string = "hello";
echo strlen($string); // 5
echo st... | true |
45a76912609385172f881854486d36afa7d59b38 | PHP | fat84/MusicBrainz | /src/MusicBrainz/Value/ArtistCredit.php | UTF-8 | 1,022 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php
namespace MusicBrainz\Value;
/**
* An artist credit
*/
class ArtistCredit
{
use Property\NameTrait;
use Property\ArtistTrait;
use Property\JoinPhraseTrait;
/**
* Constructs an artist credit.
*
* @param array $artistCredit An array of information about the artist credit
*/
... | true |
ed20428b3e2a264be39902c25525250a442d2815 | PHP | hayzone-chenlin/helloworld | /protected/controllers/ArticleController.php | UTF-8 | 666 | 2.546875 | 3 | [] | no_license | <?php
class ArticleController extends CController{
public function actionIndex(){
$model =new Article();
// $model->title ='hehe';
// $model->content ='daima';
// $model->save();
// $model =Article::model();
// CVarDumper::dump($model->attributes,1,true);
// $a=$model->find();
// var_dump($a);die;
... | true |
15377c4554fac7641236db48a11c6b8ef6b72e81 | PHP | vamogh/Single-Sign-ON | /adduser_submit.php | UTF-8 | 4,071 | 2.890625 | 3 | [] | no_license | <?php
session_start();
/*** first check that both the username, password and form token have been sent ***/
if(!isset( $_POST['sso_username'], $_POST['sso_password'], $_POST['form_token']))
{
$message = 'Please enter a valid username and password';
}
/*** check the form token is valid ***/
elseif( $_POST[... | true |
40dbcee5570b99b85c8f98cade998b043d45ad0f | PHP | RicardoVeronica/php | /07-superglobales/form/form_submit.php | UTF-8 | 231 | 2.71875 | 3 | [] | no_license | <?php
/* echo "<h1>" . $_GET['name'] . "</h1>"; */
/* echo "<h1>" . $_GET['last-name'] . "</h1>"; */
/* var_dump($_GET); */
echo "<h1>" . $_POST['name'] . "</h1>";
echo "<h1>" . $_POST['last-name'] . "</h1>";
var_dump($_POST);
| true |
ab81a8bd71a4d4c77aeded3175f8e34dd06e5a95 | PHP | omnikart/omnikart_dev | /system/engine/loader.php | UTF-8 | 1,832 | 2.828125 | 3 | [] | no_license | <?php
final class Loader {
private $registry;
public function __construct($registry) {
$this->registry = $registry;
}
public function controller($route, $args = array()) {
$action = new Action ( $route, $args );
return $action->execute ( $this->registry );
}
public function model($model) {
$file = DIR_... | true |
b22112e729470aec9b3123bf00f494461a37d5d9 | PHP | michaelradhuber/at_airquality_webinterface | /charts.php | UTF-8 | 4,684 | 2.796875 | 3 | [] | no_license | <?php include_once('header.php');
require_once('config.php');
//Define timespan by POST method.
if(isset($_POST['timespan'])) {
$timespan = $_POST['timespan'];
} else {
$timespan = 7;
}
?>
<h4>Luftgüte Protokoll</h4>
<br><br>
<h5 align= center>Darzustellenden Zeitraum in Tagen auswählen: <span id="range"><?php ... | true |
05a833bb85627fc15eead63f2e4836b994cfc2ae | PHP | KamDziok/Projekt-WM | /biznes/model/Bilet.php | UTF-8 | 1,385 | 2.890625 | 3 | [] | no_license | <?php
include_once 'GenerujBilet.php';
class Bilet extends Rezerwacje{
var $bilet;
public function __construct($repertuar,$imie, $nazwisko, $miejsca, $idRepertuar, $idUzytkownika){ //konstruktor uzywany jesli kupujemy
parent::__construct($repertuar,$imie, $nazwisko, $miejsca, $idRepertuar, $idUzytko... | true |
b4fc767f1a231b59aeef5f3bf77c395da4f953e1 | PHP | ken678/yzncms | /vendor/khanamiryan/qrcode-detector-decoder/lib/qrcode/decoder/Mode.php | UTF-8 | 3,905 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | true |
877133b367e2d1fbd688e401e8aae793061c1c90 | PHP | artgressick/PHP_Rhythm | /trunk/quotes/editquote.php | UTF-8 | 9,535 | 2.546875 | 3 | [] | no_license | <?php
$BF = "../"; #This is the BASE FOLDER.
$AT = "site"; #This is the AUTH TYPE. This sets which component of the site you are using. Check the _lib for valid options.
require($BF. '_lib.php');
if(!isset($_REQUEST['key'])) {
errorPage('Invalid Quote');
}
# Getting all original data from this record
$inf... | true |
9014b1cc208a3eeb587c6ef0d7fc5e294a0fe4fc | PHP | docandteedev/DT-Base-Theme | /lib/social-widget.php | UTF-8 | 2,571 | 2.96875 | 3 | [] | no_license | <?php
/*
Plugin Name: Social Widget
Description: A widget that outputs the icon links of the social networks you have give set in the Social Network options page.
Author: Nathan Horrigan <Nathan_Horrigan@icloud.com>
Version: 1.0
*/
// Block direct requests
if (!defined('ABSPATH')) {
die('-1'); }
add_action('widg... | true |
381b2ffb9cb6d1adb9e77a48e490baf1fc20f6e3 | PHP | heidelpay/magento2-merchant-gateway | /Api/Data/Address.php | UTF-8 | 2,598 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Heidelpay\MGW\Api\Data;
/**
* Checkout API Address DTO.
*
* Copyright (C) 2019 heidelpay GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.... | true |
8dfa6843141f5bcf153ebc2412d4dbe62869ae66 | PHP | ivkenio/TheMallCup | /admin/view/team_select.php | UTF-8 | 286 | 2.5625 | 3 | [] | no_license | <select name="<?=$name?>" class="team-name form-control">
<?php if(isset($teams) && !empty($teams)): ?>
<?php foreach($teams as $team): ?>
<option value="<?=$team['id']?>"><?=$team['name']?></option>
<?php endforeach; ?>
<?php endif; ?>
</select> | true |
b9d568275f0541810b4fca2e38301bcddd0ecb41 | PHP | troopyq/nastavnik | /server/server.php | UTF-8 | 1,258 | 2.796875 | 3 | [] | no_license | <?php
use Workerman\Worker;
require_once __DIR__ . '/../vendor/autoload.php';
$wsWorker = new Worker('websocket://0.0.0.0:2346');
$wsWorker->count = 4;
$user = 'root';
$pass = 'root';
$dbname = 'quiz';
$dbh = new PDO('mysql:host=localhost;dbname=quiz', $user, $pass);
foreach($dbh->query('SELECT * from room') as $... | true |
5aa4930663cd060e5d548c89f4f4e5b3711e885b | PHP | Kinetical/Kinesis | /modules/DBAL/Data/Entity.php | UTF-8 | 2,148 | 2.625 | 3 | [] | no_license | <?php
namespace DBAL\Data;
use \Util\Interfaces as I;
class Entity extends Model
{
public $Relations;
public $Behaviors = array();
protected $alias;
private $_key;
function __construct( $name = null, array $attributes = array() )
{
$this->Relations = new Entity\Rel... | true |
55078367de63666eb95ebb5bf282b8824910f623 | PHP | odiaseo/Rhemasys | /thirdparty/WURFL/Request/UserAgentNormalizer.php | UTF-8 | 1,276 | 2.71875 | 3 | [] | no_license | <?php
/**
* WURFL API
*
* LICENSE
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 2008-2009, WURFL-Pro S.r.l., Rome, Italy
*
*
*
* @category WURFL
* @package WURFL_Request
* @copyright WURFL-PRO SRL, Rome... | true |
c79a0de17697eaedfa12b16e8beb3ad503a77c5e | PHP | taurthil/blackflag | /php/tests/Rpg/Reference/I18nTest.php | UTF-8 | 662 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Tests\Rpg\Reference;
use DomainException;
use Rpg\Reference\Book;
use PHPUnit\Framework\TestCase;
use Rpg\Reference\Term;
class I18nTest extends TestCase
{
public function testSupportsOnlyFrench(): void
{
$this->expectException(DomainException::class);
... | true |
3ed9906948fbabd6d61d9fe5d118defc4c7712ff | PHP | marekr/siggy | /siggy/Console/Commands/CorporationsUpdateCommand.php | UTF-8 | 1,024 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Siggy\Console\Commands;
use Illuminate\Console\Command;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use \Corporation;
class CorporationsUpdateCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'corps:update';
... | true |
add762b46c05f53bf9349762b438a5d6bcfd207b | PHP | sanarva/Gestion_reservas_rocodromo | /php/sendEmail.php | UTF-8 | 2,472 | 2.59375 | 3 | [] | no_license | <?php
//PHPMailer
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer/Exception.php';
require 'PHPMailer/PHPMailer.php';
require 'PHPMailer/SMTP.php';
//Create an instance; passing `true` enables exceptions
$mail = new PHPMailer(true);
try {
//Server settings
$mail->SMTP... | true |
e9b41e19019a1deed857d4d90a1a3b8aac6df220 | PHP | marcelomachado/FSLSM | /includes/functions.inc.php | UTF-8 | 8,303 | 2.78125 | 3 | [] | no_license | <?php
function sec_session_start() {
$session_name = 'sec_session_id'; // Estabeleça um nome personalizado para a sessão
$secure = SECURE;
// Isso impede que o JavaScript possa acessar a identificação da sessão.
$httponly = true;
// Força a sessão a usar apenas cookies.
if (ini_set('... | true |
91a95efc641a1d192b2075597734615c3362e719 | PHP | webiik/components | /src/Webiik/Csrf/Csrf.php | UTF-8 | 3,047 | 3.25 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Webiik\Csrf;
use Webiik\Session\Session;
use Webiik\Token\Token;
class Csrf
{
/**
* @var Token
*/
private $token;
/**
* @var Session
*/
private $session;
/**
* CSRF token name
* @var string
*/
private $name = 'csrf-... | true |
8cce71ef735ab3685b64c36e1fa6e65156990646 | PHP | sanyaade-mobiledev/web-base-template | /wordpress/wp-content/plugins/jquery-slugs.php | UTF-8 | 1,531 | 2.84375 | 3 | [] | no_license | <?php
/*
Plugin Name: jQuery Slugs
Plugin URI: http://www.learningjquery.com/
Description: Keep uppercase characters and dots (".")
Author: Karl Swedberg
Version: 0.1
Author URI: http://www.learningjquery.com/
*/
// Based on sanitize_title_with_dashes method (wp-includes/formatting.php)
function custom_sanitize_title_... | true |
42c95a8cc19d86eb78d162ac82a6716ed5e541cb | PHP | yuriscom/TRPWeb | /app/lib/Seo/Parser/Property.php | UTF-8 | 1,033 | 2.59375 | 3 | [] | no_license | <?php
namespace Seo\Parser;
class Property extends ParserAbstract {
public function getSeo() {
$listing = $this->controller->listing;
if (isset($listing['addr_province'])) {
$seoParams['province'] = $listing['addr_province'];
}
... | true |
340ecab641afb7423eff010959657d5e3b5edd3d | PHP | andersonmichel/phpsample | /4/index.php | UTF-8 | 6,124 | 2.53125 | 3 | [] | no_license | <?php
require_once "helper.php";
require_once "User.php";
require_once "Validator.php";
$user = new User();
$validator = new Validator();
if ( isset( $_POST ) && ! empty( $_POST ) ) {
$validator->validate( $user->rules, $_POST, $user->fields );
if ( $validator->is_valid() ) {
if ( $user->add( $_POST... | true |
6bd8269697877e521d6e693124ede82751a991d0 | PHP | wisntonromero/inventariohs | /red-php_enviar_sql_a_pantalla.php | UTF-8 | 2,028 | 2.796875 | 3 | [] | no_license | <?php
include_once("config.php");
?>
<?php
// ** Campos con lo que voy a realizar la consulta, los del formulario.
$nro_cc = $_POST['nro_cc'];
$letra_pp = $_POST['letra_pp'];
$nro_cc_letra_pp = $nro_cc . $letra_pp;
echo "<p>Consulta por: Nro de Centro de Cableado : $nro_cc Letra Patch Panel : $letra_pp </... | true |
aff032b6112307d2cdff6286a92530317e08eff7 | PHP | falmp/slashquery | /html/slashquery/core/classes/class.sqSSL.php | UTF-8 | 1,765 | 2.859375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
/**
* sqSSL - /slashquery/core/classes/class.sqSSL.php
* wrapper to openssl
*
* @author Nicolas Embriz <nbari@slashquery.com>
* @package SlashQuery
* @license BSD, see LICENSE file
* @version 1.0
*/
class sqSSL {
private static $Cipher = '-aes-256-cbc';
/**
* decrypt
*
* @param string $pass... | true |