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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5c42f68e16ef28fff0688e8fd1eb1d4d1346e44a | PHP | lazarow/roulette | /src/bets/KaputEven.php | UTF-8 | 210 | 3.28125 | 3 | [] | no_license | <?php
namespace bets;
/**
* Bet on whether the winning number will be even
*/
class KaputEven extends Even
{
public function validate($number): bool
{
return (int) $number % 2 === 0;
}
}
| true |
b98a84e2f69911fbbf5d49c0827f9fd02fcf51b4 | PHP | rohanb10/vakilsdev | /premedia/edetailers/submit.php | UTF-8 | 867 | 2.5625 | 3 | [] | no_license | <?php
if(!isset($_POST['name'], $_POST['email'], $_POST['message'])) return;
$name = htmlspecialchars($_POST['name'], ENT_DISALLOWED, 'UTF-8' );
$email = htmlspecialchars($_POST['email'], ENT_DISALLOWED, 'UTF-8' );
$phone = htmlspecialchars($_POST['phone'], ENT_DISALLOWED, 'UTF-8' );
$company = htmlspecialchars($... | true |
7d1d2c729233e5e5f0b5899ce323526dea9a7ffd | PHP | polodev/php-crud | /show.php | UTF-8 | 1,101 | 2.734375 | 3 | [] | no_license | <?php
require 'db.php';
$sql = 'SELECT * FROM people ORDER BY id DESC';
$dbpeople = $connection->query($sql);
$results = $dbpeople->fetchAll(PDO::FETCH_OBJ);
?>
<?php require 'header.php'; ?>
<div class="container mt-5">
<a href="/" class="btn btn-link">Home page</a>
<?php if (count($results)) : ?>
<table class... | true |
0f4dda05ccb3cfe7a675840484c10c3b25f22bd4 | PHP | blitz-php/schild | /src/Authentication/Actions/ActionInterface.php | UTF-8 | 1,822 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of Blitz PHP framework - Schild.
*
* (c) 2023 Dimitri Sitchet Tomkeu <devcode.dst@gmail.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace BlitzPHP\Schild\Authentication\Actions;
use Bli... | true |
47c1c06b950ac715bf32ad0aa4cc19a8b82652bc | PHP | DanielMaldonadoNic/Mantenimiento | /control.php | ISO-8859-1 | 2,676 | 2.53125 | 3 | [] | no_license | <?php
$usuario = $_POST["usuario_txt"];
$password = $_POST["password_txt"];
include("staff/php/conexion.php");
$consulta = "SELECT * FROM usuarios WHERE usuario='$usuario' && password='$password'";
$ejecutar_consulta = $conexion->query($consulta);
$num_regs_usuarios = $ejecutar_consulta->num_rows;
//Si $num_reg... | true |
1079a36717a80a3c471fc40e65d24fb883281cae | PHP | brydzu/composer-unused | /src/Loader/ResultInterface.php | UTF-8 | 661 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Icanhazstring\Composer\Unused\Loader;
use Composer\Package\PackageInterface;
use Icanhazstring\Composer\Unused\Subject\UsageInterface;
interface ResultInterface
{
/**
* @var UsageInterface|PackageInterface $item
* @return static
*/
public function addI... | true |
f7dbc8f27b2266bff16e5eec5e851f548e29629a | PHP | shanein/Workshop2020 | /Dev web trendys.fr/Dev/Version 1 (données actuelles)/index2.php | UTF-8 | 1,559 | 2.671875 | 3 | [] | no_license | <?php
$title = "BDD";
include("base.php");
?>
<p>
<?php
$id = 500;
//on cherche le nombre d'influenceur total
$max = file_get_contents('https://influence.beta.krugazor.eu/api/influencers');
$max = substr($max,9,strlen($max)-10);
// //on supprime les données de la table
// $delete = "TRUNCAT... | true |
3af31f67ffdcaae8f34cedb89fd0ba3c4602d086 | PHP | Goby026/Panamericanos | /controller/login.controller.php | UTF-8 | 1,963 | 2.53125 | 3 | [] | no_license | <?php
require_once 'model/usuarios.php';
class LoginController{
private $model;
public function __CONSTRUCT(){
$this->model = new Usuarios();
}
public function Index(){
require_once 'view/header.php';
require_once 'view/login/login.php';
require_once 'view/footer.php'... | true |
acb4386b5ca2fd98553203bd4889b7d898847937 | PHP | plugowski/currency_converter | /src/Exchange/Repository/NBPRatesRepository.php | UTF-8 | 2,418 | 2.921875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace CurrencyConverter\Exchange\Repository;
use CurrencyConverter\Currency\Currency;
use CurrencyConverter\Exchange\Rate;
use CurrencyConverter\Exchange\RateCollection;
use CurrencyConverter\Exchange\Repository;
/**
* Narodowy Bank Polski
*
* Class NBPExchangeRepository
* @package CurrencyConverter\Exc... | true |
0a31ceabc821672948f85b0e8309b2dc7dc93628 | PHP | guillaumeseateun/myFramework | /src/Services/Form/Input.php | UTF-8 | 578 | 2.796875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Input
*
* @author antoine
*/
class Input implements HtmlElement {
protected $name;
public func... | true |
4b289b30d9e26cedcba75803347391802467dee7 | PHP | yulia633/slim-api-example | /app/User/Storage/UserStorageInterface.php | UTF-8 | 322 | 2.71875 | 3 | [] | no_license | <?php
namespace App\User\Storage;
use App\User\Model\User;
interface UserStorageInterface
{
public function all(): array;
public function getById(string $id): User;
public function create(array $data): void;
public function update(array $data): void;
public function delete(string $id): void;
... | true |
c64c5d8aa65f428783302787ed71b191c6b27ed9 | PHP | sutterlaird/cst336-final-project | /api.php | UTF-8 | 11,489 | 2.78125 | 3 | [] | no_license | <?php
session_start();
$httpMethod = strtoupper($_SERVER['REQUEST_METHOD']);
switch($httpMethod) {
case "OPTIONS":
// Allows anyone to hit your API, not just this c9 domain
header("Access-Control-Allow-Headers: X-ACCESS_TOKEN, Access-Control-Allow-Origin, Authorization, Origin, X-Requested-With, Content-Type... | true |
af9e558f6f0c74387b06f41affc3b1ac2fddb4b2 | PHP | ianSurii/happyfarmer | /choice.php | UTF-8 | 1,954 | 2.5625 | 3 | [] | no_license | <?php
require_once('classes/DbFunctions.php');
$execute = new dbFunction();
switch ($_GET['tag']) {
case 'const':
extract($_GET);
$data = $execute->select("farm_calendars","where crop='".$_GET['id']."'");
// echo '<option value="0">Select Crop ---</option>';
if (count($data) == ... | true |
bc5df8d5b8fdecc828900e2484b1475765a7aa11 | PHP | Panda3D-public-projects-archive/sfsu-multiplayer-game-dev-2011 | /trunk/launchTeamUpdate/aboutLeftContent.php | UTF-8 | 1,314 | 2.515625 | 3 | [] | no_license | <!-- Filename : guideLeftContent.php
Description: This file manages the left vertical menu on 'GUIDE' section.
It uses php function to call the correct css classes in order
to create simple animation on the menu.
-->
<html>
<body>
<?php
$filename_about = basename($_SERVER['SCRIPT_FILENAME']);
?>
... | true |
298f23116d4866dbf4efeb715e03435e9757cab9 | PHP | amaurygirard/QuizzManager | /src/app/DB.php | UTF-8 | 3,931 | 3.703125 | 4 | [] | no_license | <?php
class DB {
// Used for DB Connexion
const DB_SERVERNAME = "localhost";
const DB_USERNAME = "root";
const DB_PASSWD = "root";
const DB_NAME = "quizzes";
/* Méthode pour solliciter la base de données */
public function db_select($sql) {
// Connexion
$connexion = new ... | true |
30ba4b0245d4c1101101de8624d4542ae8fe3055 | PHP | arturpuck/guess_game | /database/migrations/2021_01_25_140138_create_games_table.php | UTF-8 | 1,109 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGamesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('games', function ... | true |
7b068b05146a73d9ba8c3cd0b1e11aea984a96ea | PHP | budostylz/notes | /examples/_php/background-changer/logic.php | UTF-8 | 556 | 2.84375 | 3 | [] | no_license | <? require_once($_SERVER['DOCUMENT_ROOT'].'/view-source/ok-to-show.php'); ?>
<?php
# Set the timezone
date_default_timezone_set('America/New_York');
# Use PHP's date function to get the hour in military format.
$hour = date("G");
# When testing our code we can manually set the hour. When not using this, we just leave... | true |
6a2940af2134e40cacf67728438af68fdfcacdb9 | PHP | j-velasco/php-circuit-breaker | /src/CircuitBreakerTest.php | UTF-8 | 3,256 | 2.53125 | 3 | [] | no_license | <?php
namespace JVelasco\CircuitBreaker;
use Exception;
use PHPUnit\Framework\TestCase;
class CircuitBreakerTest extends TestCase
{
/** @test */
public function it_delegates_to_strategy_for_availability()
{
$strategy = $this->prophesize(AvailabilityStrategy::class);
$anAvailableService = ... | true |
5a1de6966dd04b0f9694468b255743eb87d43efe | PHP | ektagithub/Social-Media-Network | /MyFriends.php | UTF-8 | 6,203 | 2.625 | 3 | [] | no_license | <?php
require(dirname(__FILE__) . "/Common/ClassesAndFunctions.php");
// Start Session
session_start();
// User
$user = $_SESSION['user'];
if (!isset($user)) {
$_SESSION["from"] = "MyFriends.php";
header("Location: Login.php");
}
// Defriend Selected
if (isset($_POST["defriendSelected"])) {
$defriends =... | true |
96fd8b739976dc4bbe93542d0ff5f0e198c2178d | PHP | tokushima/rhaco3 | /test/lib/org/rhaco/lang/Text/plain.php | UTF-8 | 258 | 2.515625 | 3 | [] | no_license | <?php
$text = \org\rhaco\lang\Text::plain('
aaa
bbb
');
eq("aaa\nbbb",$text);
$text = \org\rhaco\lang\Text::plain("hoge\nhoge");
eq("hoge\nhoge",$text);
$text = \org\rhaco\lang\Text::plain("hoge\nhoge\nhoge\nhoge");
eq("hoge\nhoge\nhoge\nhoge",$text);
| true |
21d06ea427fe751d92823e2120c392934c992bad | PHP | 4yop/miscellaneous | /leetcode/easy/linked-list/44.合并两个有序链表.php | UTF-8 | 2,202 | 3.65625 | 4 | [] | no_license | <?php
/**
* Definition for a singly-linked list.
* class ListNode {
* public $val = 0;
* public $next = null;
* function __construct($val) { $this->val = $val; }
* }
*/
class ListNode {
public $val = 0;
public $next = null;
function __construct($val) { $this->val = $val; }
... | true |
c7ccfd08054e1c1db85919d16f2500fe24c0e8b4 | PHP | kompo/kompo | /src/Exceptions/NotAKompoBaseElementException.php | UTF-8 | 384 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Kompo\Exceptions;
use LogicException;
class NotAKompoBaseElementException extends LogicException
{
public function __construct($element)
{
$elementDescription = is_array($element) ? json_encode($element) : $element;
parent::__construct("An attempt to render a non-kompo elemen... | true |
c6b60402657cb29f3c8b6efd19eba3c8c7a07196 | PHP | xiaolizilg/laravel | /laravel/app/Repositories/admin/MenuRepository.php | UTF-8 | 1,911 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\admin;
use App\Models\admin\Menu;
use App\Repositories\admin\BsseRepository;
Class MenuRepository extends BaseRepository{
const MODEL = Menu::class;
/**
* 创建数据
*/
public function create($data){
//dd($data);
/* "_token" => "SrGnyjkYIeArYv8WFUMdXoXIsLXs49fVNTdIoslU"
... | true |
8ebbd8fed8e2d019b659eca92748c74aabd09fe1 | PHP | matthieu88160/CSR4 | /src/CSDT/CSR4/Mapper/Manager/ObjectMappingFactoryInterface.php | UTF-8 | 1,727 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of CSR4-ObjectMappedDTO.
*
* As each files provides by vallance, this file is licensed
* under the MIT license.
*
* PHP version 7.0
*
* @category Mapper
* @package CSR4-ObjectMappedDTO
* @author matthieu vallance <matthieu.vallance@cscfa.fr>
* @license MIT <https://opensourc... | true |
104f6a00f62db11b6b41564c1d145be14fcd350f | PHP | tram421/MyMVC | /App/Core/Auth.php | UTF-8 | 900 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Core;
use App\Models\User;
use Core\Helper;
use Core\Controller;
class Auth extends Controller
{
public $user = NULL;
public function __construct()
{
if (isset($_COOKIE['username'])) {
$model = new User();
$this->user = $model->get($_COOKIE['username']... | true |
ba5b50cea44b233fb620c6eb4659118f96028870 | PHP | MatthiasWinkelmann/geographic-places-database | /Source/export.php | UTF-8 | 3,662 | 2.578125 | 3 | [
"CC-BY-4.0",
"LicenseRef-scancode-public-domain"
] | permissive | <?php
/*
* Copyright (c) delight.im <info@delight.im>
*
* 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 appl... | true |
f7768444a3015ed31613fde7a2b995c8c26ce45d | PHP | weskiller/getui-push | /src/Utils/Json.php | UTF-8 | 536 | 2.78125 | 3 | [] | no_license | <?php
namespace Weskiller\GeTuiPush\Utils;
class Json
{
/**
* @param $input
* @return false|string
* @throws \JsonException
*/
static function encode($input)
{
return json_encode($input, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
}
/**
... | true |
3cc3ff8f6a29c314f03d2d6afc949a6bdebd0548 | PHP | anildadhich0024/maid_management | /app/Http/Controllers/AddressController.php | UTF-8 | 3,616 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use App\Models\OfficeAddress;
class AddressController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
... | true |
698d512f8ea8af97f3f7371785db1e747fd6fb1c | PHP | PaLabs/DatagridBundle | /src/Field/Type/String/StringField.php | UTF-8 | 1,299 | 2.796875 | 3 | [] | no_license | <?php
namespace PaLabs\DatagridBundle\Field\Type\String;
use PaLabs\DatagridBundle\Field\FieldData;
use PaLabs\DatagridBundle\Field\Type\HtmlOrTextField;
use PaLabs\DatagridBundle\Field\Type\InvalidDataTypeException;
class StringField extends HtmlOrTextField
{
public static function field(string $value = null, ... | true |
bbacf9551c740cdf8c40061a2527774088f5d932 | PHP | henrivajak/php-ruhmatoo-projekt | /page/insert_animal.php | WINDOWS-1252 | 3,602 | 2.578125 | 3 | [] | no_license | <?php
require("../functions.php");
//kas on sisseloginud, kui ei ole siis
//suunata login lehele
if (!isset ($_SESSION["userId"])) {
//header("Location: login.php");
}
//kas ?loguout on aadressireal
if (isset($_GET["logout"])) {
session_destroy();
... | true |
ff48f50f69cd525b5a2ea5525a36001969a1a6f8 | PHP | NeuralNoise/animurecs | /achievements/import_mal_achievement.php | UTF-8 | 857 | 2.625 | 3 | [] | no_license | <?php
class ImportMALAchievement extends BaseAchievement {
public $id=3;
public $name="Moving In";
public $points=25;
public $description="Imported your MAL.";
public $imagePath="img/achievements/3/3.png";
public $events=['User.importMAL'];
public $dependencies=[];
public function validateUser($event, ... | true |
bc1b1361ba4a17ee7fb91d27768b61f23e2b4657 | PHP | abdallahbarqawi/craftman | /php/craftman/getUser.php | UTF-8 | 674 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
require_once 'connect2.php';
$sSQL= 'SET CHARACTER SET utf8';
mysqli_query($con, $sSQL);
$sql = "SELECT u.id, u.name, u.email,u.state,u.phone, a.name
from user u, address a
where u.Address_id =a.id and u.type = 1";
$stmt = $con->prepare($sql);
$stmt->execute();
$stmt->bind_result($id... | true |
fded3f523a0b0fdcb314c2fb8fa96ce80882cd5d | PHP | DamianMartinezzz/phpgod | /base de datos/ejerciciosdomicilio/basealturaper.php | UTF-8 | 238 | 2.6875 | 3 | [] | no_license | <?php
echo "Base: " . $_GET['Base'];
echo "<br>";
echo "Altura: " . $_GET['Altura'];
echo "<hr>";
echo "Perimetro: " . ((2 * $_GET['Base']) + (2 * $_GET['Altura']));
echo "<br>";
echo "Superficie: " . $_GET['Base'] * $_GET['Altura'];
?> | true |
8ca224da1103434c4613c18300da9855c06792f5 | PHP | tomaszrak/przepisy-tr | /zarejestruj.php | UTF-8 | 1,984 | 2.75 | 3 | [] | no_license | <?php
session_start();
require_once "connect.php";
$polaczenie = @new mysqli($host, $dbuser, $dbpass, $dbname);
if ($polaczenie->connect_errno!=0)
{
echo "Error: ".$polaczenie->connect_errno;
}
else
{
$login = $_POST['login'];
$haslo = md5($_POST['haslo']);
$email = $_POST['email'];
$haslo2 =... | true |
308485b21143c5ac0324282ed0e5987629c8700e | PHP | AtVirus/Descent-Scripts | /Trunk/src/php/remove_not_proper_spells_from_chars.php | UTF-8 | 2,242 | 2.640625 | 3 | [] | no_license | <?php
session_start();
//conn settings
$dbhost="localhost";
$dbuname="root";
$dbupass="lofaszka";
$dbname="test302_chars";
//database connection
$dbi = mysql_connect($dbhost, $dbuname, $dbupass,true) or die("Couldn't connect to database server!");
mysql_select_db($dbname, $dbi) or die("Q 200603201239".mysql_error(... | true |
c471455a6178b49d49af82797a7000234aed6f4d | PHP | xinmasi/TD2000 | /inc/check_type.php | UTF-8 | 2,689 | 2.890625 | 3 | [] | no_license | <?
function is_number($str)
{
if(substr($str,0,1)=="-")
$str=substr($str,1);
$length=strlen($str);
for($i=0;$i<$length;$i++)
{
$ascii_value=ord(substr($str,$i,1));
if(!($ascii_value>=48 && $ascii_value<=57))
return false;
}
if($str!="0")
{
$str=intval($str);
if($str==0)
return ... | true |
6911518db78abf7003f7039b2eafaf1e5aac7036 | PHP | fimmel/FRCScouting | /prod/backend/db.php | UTF-8 | 1,209 | 2.546875 | 3 | [] | no_license | <?php
include ("/var/www/secret.php");
try {
$db = new PDO("mysql:host=$DB_server;dbname=$DB_name", $DB_username, $DB_password);
// set the PDO error mode to exception
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//echo "Connected successfully";
}
catch(PDOException $e)
{
... | true |
11d289ab37f793d20f058cd1afa99b33018c0f71 | PHP | SashaDov/callcenter | /vendor/core/Db.php | UTF-8 | 2,543 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Галина
* Date: 30.07.2017
* Time: 19:26
*/
namespace vendor\core;
class Db
{
/**
* keep connection object PDO from config/config_db_pdo.php
* @var $config array
*/
protected $pdo;
/**
* SINGLETON pattern - keep __construct of connection ... | true |
40160c8a32c86521667b9069c4b7c01c5040a3d7 | PHP | freeflygit/shopee-php | /src/SignatureGeneratorInterface.php | UTF-8 | 185 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Shopee;
use Psr\Http\Message\UriInterface;
interface SignatureGeneratorInterface
{
public function generateSignature(UriInterface $uri, array $params): string;
}
| true |
d538e8aaa8246e2688ab1c0a268012a44d5b58e5 | PHP | TheBleate/uniproject | /OLD_Uniproject/classes/Institut.php | UTF-8 | 3,159 | 3.265625 | 3 | [] | no_license | <?php
/*Classe*/
class Institut
{
private $nom;
private $localitat;
private $email;
private $telefon;
/* Constructor */
function __construct($nom, $localitat, $email, $telefon)
{
$this->nom = $nom;
$this->localitat = $localitat;
$this->email = $email;
$thi... | true |
75211ba28348887ee433dd5cb1f4bac56b78cd60 | PHP | yurivolkov/Survey | /server.optimalrating/app/Globals/GlobalResponse.php | UTF-8 | 429 | 2.75 | 3 | [] | no_license | <?php
namespace App\Globals;
class GlobalResponse
{
private $response;
private $errors=[];
private $result;
private $message;
private $code;
private $data;
public function __construct($data, $error=false)
{
if($error)
$this->errors = $data;
else
... | true |
5b517dc7deac6116f2260e0c1275c3196e4ad678 | PHP | ardhikarafi/clustering_kmeans | /hasil.php | UTF-8 | 2,381 | 2.625 | 3 | [] | no_license | <html>
<head>
<style>
body{
font-size:14px;
font-family:tahoma;
font-weight:bold;
}
table{
border : 1px solid #000;
text-align : center;
font-family:tahoma;
font-size:12px;
}
table tr th{
border : 1px solid #000;
background : gray;
color : #FFF;
padding:3px;
}
table tr td... | true |
b00cb8e14221c4d4f6103004d1b6a2f6dde90a34 | PHP | tgachet/cavachess | /src/AppBundle/Entity/Post.php | UTF-8 | 4,636 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\Common\Collections\ArrayCollection;
/**
* Post
*
* @ORM\Table(name="post")
* @ORM\Entity(repositoryClass="AppBundle\Repository\PostRepository")
*/
class Post
{
/***** PROPER... | true |
6edb11b1637fee6cd3f70a5943525debdaf611f5 | PHP | bezama/foodsecure | /modules/contacts/tests/unit/ContactTestHelper.php | UTF-8 | 1,135 | 2.640625 | 3 | [] | no_license | <?php
class ContactTestHelper
{
public static function createContactByNameForOwner($firstName, $owner)
{
ContactsModule::loadStartingData();
$contact = new Contact();
$contact->firstName = $firstName;
$contact->lastName = $firstName.'son';
... | true |
7d779262a179ac870e976768adf11a5109093772 | PHP | panipraveen/Library-Management | /view_delete_book.php | UTF-8 | 3,353 | 2.671875 | 3 | [] | no_license | <?php
//include 'menu.php';
include 'config.php';
date_default_timezone_set('Asia/Kolkata');
?>
<html>
<head>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anon... | true |
fdc3e7f618db4b7bbd023bb8e78ce72b93f793c6 | PHP | dawka300/smarty | /app/libraries/ModelSimple.php | UTF-8 | 1,028 | 3.03125 | 3 | [] | no_license | <?php
namespace App\Library;
use PDO;
abstract class ModelSimple {
protected $dbh, $table;
public function query(string $query)
{
try {
$stmt = $this->dbh->prepare($query);
$stmt->execute();
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
return ... | true |
75e34b2ba209ff2f897b475b734f667c6d8b88c0 | PHP | JustineB/PdfGenesis | /src/PdfGenesis/DocumentBundle/EventListener/PageListener.php | UTF-8 | 907 | 2.640625 | 3 | [] | no_license | <?php
namespace PdfGenesis\DocumentBundle\EventListener;
use Doctrine\ORM\EntityManagerInterface;
use PdfGenesis\DocumentBundle\Event\PageEvent;
class PageListener{
/** @var EntityManagerInterface $em */
protected $em;
public function __construct(EntityManagerInterface $em){
$this->em = $em;
... | true |
1f6c50f966549a8acd3d591214b3353926e7a96f | PHP | SPRAINT890/programacion_web | /a pasar/Practico 1/ejercicio5.php | UTF-8 | 999 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css.css">
<title>Ejercicio 5</title>
</head>
<body>
<div class="div">
<... | true |
3dc68634cfb7a8db4e597c4a44ca65ceef0f93f7 | PHP | rubyshot/PhpEventFulApiClient | /src/Transport/TransportInterface.php | UTF-8 | 935 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace EventFul\Transport;
/**
* Description of TransportInterface
*
* @author Marcos Peña
*/
interface TransportInterface
{
const HTTP_METHOD_GET = 'GET';
const HTTP_METHOD_POST = 'POST';
/**
* Performs a request and returns the response
*
* @param string $httpMethod Th... | true |
9377a575bf57e0e42f38d0d70e2b089dfa71896a | PHP | jonatelo09/S.R.CITAS | /app/Interfaces/ScheduleServiceInterface.php | UTF-8 | 220 | 2.75 | 3 | [
"MIT"
] | permissive | <?php namespace App\Interfaces;
use Carbon\Carbon;
interface ScheduleServiceInterface
{
public function getAvailableIntervals($date, $doctorId);
public function isAvailableIntervals($date, $doctorId,Carbon $start);
} | true |
af95d3bf28cbc508e8207361b5a42658d294d751 | PHP | kob62355/ERPproject | /app/helper.php | UTF-8 | 603 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
function formatDateThat($strDate)
{
$strYear = date("Y",strtotime($strDate))+543;
$strMonth= date("n",strtotime($strDate));
$strDay= date("j",strtotime($strDate));
$strHour= date("H",strtotime($strDate));
$strMinute= date("i",strtotime($strDate));
$strSeconds= date("s",strtotime($strDate)... | true |
be7cee082c2ad9a7fdfc4e6685099fa24064c076 | PHP | tournament-today/clan | /src/Syn/Clan/Repositories/ClanRepository.php | UTF-8 | 1,183 | 2.78125 | 3 | [] | no_license | <?php namespace Syn\Clan\Repositories;
use Syn\Clan\Interfaces\ClanRepositoryInterface;
use Syn\Framework\Abstracts\Repository;
class ClanRepository extends Repository implements ClanRepositoryInterface
{
/**
* Returns a query builder filtering on what is viewable
*
* @param $id
* @return mixed
*/
public... | true |
e5cd9614f8011b85992464a3ff9046d759805975 | PHP | amillionmonkeys/perchd | /admin/addons/apps/perch_mailchimp/runtime.php | UTF-8 | 2,968 | 2.546875 | 3 | [] | no_license | <?php
PerchSystem::register_search_handler('PerchMailchimp_SearchHandler');
require('PerchMailchimp_Campaigns.class.php');
require('PerchMailchimp_Campaign.class.php');
require('PerchMailchimp_Subscribers.class.php');
require('PerchMailchimp_Subscriber.class.php');
require('PerchMailchimp_SearchH... | true |
a343e22f3850c0fc0818bd59f87c1425433f8184 | PHP | jagga68/clarke | /chapter-seven/src/Entity/UserRepository.php | UTF-8 | 2,069 | 3.03125 | 3 | [] | no_license | <?php
namespace App\Entity;
class UserRepository extends ModelRepository
{
public function save(array $userData): bool
{
$user = $this->makeUser($userData);
$sql = "INSERT INTO users (
name,
prod_server_access,
dev_server_access,
... | true |
985341544eb826fc4b733306a904e5a58e52c869 | PHP | wells5609/wp-app | /src/Database/Table/Command/Alter.php | UTF-8 | 2,425 | 2.90625 | 3 | [] | no_license | <?php
namespace WordPress\Database\Table\Command;
use WordPress\Database\Table\Column;
use WordPress\Database\Table\Command;
class Alter extends Command
{
protected $addColumns = array();
protected $dropColumns = array();
protected $addKeys = array();
protected $dropKeys = array();
public function __invoke(... | true |
8d421aa8d982c68a2a75adfab55175a205f82879 | PHP | ekarincodizm/wemall.com | /app/repositories/EverydaywowRepository.php | UTF-8 | 6,478 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
class EverydaywowRepository implements EverydaywowRepositoryInterface
{
/**
* @var int
*/
protected $page;
/**
* @var string { asc, desc }
*/
protected $sortby;
/**
* @var string { discount_start, price, discount }
*/
protected $orderby;
/**
* @v... | true |
27f617662fc0c3a359c4a5aecb70c9ec043ddc67 | PHP | ChenJiR/leetcode.php | /combinationSum2.php | UTF-8 | 1,426 | 3.546875 | 4 | [] | no_license | <?php
/**
* 40. 组合总和 II
* Class CombinationSum2Solution
* https://leetcode-cn.com/problems/combination-sum-ii/
*/
class CombinationSum2Solution
{
protected $result = [];
/**
* @param Integer[] $candidates
* @param Integer $target
* @return Integer[][]
*/
function combinationSum2($... | true |
e0619282d9a0f5c84b54a65278a0954830f7fcb7 | PHP | ovsienkoff/testtask01_catalog_books | /Controllers/AuthorsController.php | UTF-8 | 15,290 | 2.984375 | 3 | [] | no_license | <?php
namespace Controllers {
use Database\DbConfig;
use Database\PDO\DbPDO;
use Database\PDO\Entities\Author;
use Database\PDO\Entities\BookAuthor;
use Models\AuthorModel;
use MVC\Controllers\BaseController;
use MVC\Services\UtilsService;
class AuthorsController extends B... | true |
c524e586ce262ae9a349f0add5092013319f7e9c | PHP | G0uth4m/Restaurant-Management-php-postgresql | /edit.php | UTF-8 | 1,594 | 2.609375 | 3 | [] | no_license | <?php
if(!isset($_COOKIE["type"]))
{
header("location: login.php");
}
require 'db.php';
$dishid = $_GET['dishid'];
$sql = 'SELECT * FROM menu WHERE dishid=:dishid';
$statement = $connection->prepare($sql);
$statement->execute([':dishid' => $dishid ]);
$item = $statement->fetch(PDO::FETCH_OBJ);
if (isset ($_POST['na... | true |
7457e3790a3daeef4d8963afbfcd7f67e81af762 | PHP | tranvanmy/DOANTT | /app/Providers/d.php | UTF-8 | 150 | 3.34375 | 3 | [] | no_license | <?php
class A{
public function move(){
echo 'a';
}
}
class B extends A {
public function move(){
echo 'b';
}
}
$abc = new B;
$abc->move();
?> | true |
570703455545dd5d582e8a1439ed31807acec17e | PHP | partio-scout/pof_backend | /wp-content/themes/POFAPIWP/page-json-trash.php | UTF-8 | 816 | 2.53125 | 3 | [
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
/*
Template Name: JSON Trash
*/
header('Content-type: application/json');
header('Access-Control-Allow-Origin: *');
$ret = array();
$args = array(
'numberposts' => -1,
'posts_per_page' => -1,
'post_type' => array('pof_post_program', 'pof_post_agegroup', 'pof_post_taskgroup', 'pof_post_task', 'pof_post_sugge... | true |
3f0ecc0b0aaa6e91aeb013c1f80faf8632a4bb97 | PHP | TRMassey/ProjectB | /setup.php | UTF-8 | 6,417 | 2.609375 | 3 | [] | no_license | <?php
include 'dbinfo.php';
$mysqli = mysqli_connect($servername, $username, $password, $dbname);
$errors = false;
// check the connection
if (mysqli_connect_errno()) {
printf("Setup could not be completed. Connection to database failed: %s<br />", mysqli_connect_error());
printf("Please check the i... | true |
d004565093b81278948c7448b593bfd3bf70bbbc | PHP | Michelle941/v1.0 | /models/Likes.php | UTF-8 | 1,425 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "likes".
*
* @property integer $id
* @property integer $user_id
* @property integer $photo_id
* @property integer $created_at
*/
class Likes extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function... | true |
d4f4949d8c08cecc1e1b6b53daec8a79a42ec396 | PHP | AdriansaWP/tr_manpro | /app/Helper/MatakuliahHelper.php | UTF-8 | 2,809 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helper ;
use App\Entity\Matakuliah;
class MatakuliahHelper
{
private static $table = "Matakuliah" ;
public static function selectAll()
{
$path = app_path() . "/Database/".self::$table.".json";
$json = json_decode(file_get_contents($path), true);
$listdata = ar... | true |
91383fe4f23ad1431f23601f54304148b796018a | PHP | jennynguyen7762119/babyshop | /app/View/Elements/flash_bad.ctp | UTF-8 | 390 | 2.625 | 3 | [] | no_license | <?php if(isset($message) == TRUE && is_array($message) == TRUE):?>
<div id="errors" class="login-fail">
<ul>
<?php foreach ($message as $error):?>
<?php
if(!empty($error) && is_array($error) == TRUE){
foreach ($error as $mess) {
echo "* ".$mess. "<br>";
}
}else{
echo $error... | true |
ca586224c56a3278a4621d726426f8b04fbdfd8b | PHP | takashiki/image-force | /app/Models/ImageStorage.php | UTF-8 | 1,230 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Models;
use App\Uploaders\NiupicUploader;
use App\Uploaders\SinaUploader;
use App\Uploaders\SmmsUploader;
use Illuminate\Database\Eloquent\Model;
class ImageStorage extends Model
{
const SMMS = 1;
const SINA = 2;
const NIUPIC = 3;
protected static $uploaders = [
self::SIN... | true |
9586721ee4279803e4f0f009b9243a21ad706ed0 | PHP | randock/ddd-bundle | /src/Infrastructure/Form/DataTransformer/NullToEmptyDataTransformer.php | UTF-8 | 763 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Randock\DddBundle\Infrastructure\Form\DataTransformer;
use Symfony\Component\Form\DataTransformerInterface;
/**
* Class NullToEmptyDataTransformer.
*/
class NullToEmptyDataTransformer implements DataTransformerInterface
{
/**
* Does not transform anything.
*
... | true |
18aaae559160bb438eeb95fa40ab1fba05fee0d3 | PHP | Harinder18/Profile | /php/contact-form.php | UTF-8 | 417 | 2.640625 | 3 | [] | no_license | <?php
/*
* Receiving data from the contact form
* Performs appropriate action on the data received
*/
//Retreiving and sanitizing variables
$name = htmlentities($_POST['name']);
$email = htmlentities($_POST['email']);
$msg = htmlentities($_POST['message']);
//... | true |
b2c19a15497763f3d2dcea75596df61b3446ac75 | PHP | Rinvc217/Laravel | /bai3Lớp và đối tượng trong PHP/bt4Nháp/idex1voipublic.php | UTF-8 | 1,013 | 3.109375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ADMIN
* Date: 2/14/2019
* Time: 8:43 AM
*/
include("class_lib.php");
$objName1 = new Person();
$objName1->set_first_name("Le Van");
$objName1->set_last_name("Loc");
$objName1->age = 32;
echo $objName1->get_ho_va_ten();
echo $objName1->age;
//$objName1->age = 17;
echo "<b... | true |
4abd5927b058cd3a338ce1b9826dedc0d3920d95 | PHP | semenakanabisaru/semena | /www/umibackup/files/classes/system/entities/umiFile/iUmiFile.php | UTF-8 | 576 | 2.546875 | 3 | [] | no_license | <?php
interface iUmiFile {
public function __construct($filePath);
public function delete();
public static function upload($variableGroupName, $variableName, $targetFolder);
public function getSize();
public function getExt();
public function getFileName();
public function getDirName();
public functi... | true |
7e199823b06c96991a7c004ff51e3fc1d9e1f769 | PHP | jasny/improved-php-function | /tests/CallableProviderTrait.php | UTF-8 | 1,070 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Improved\Tests;
/**
* Provider different types of callables
*/
trait CallableProviderTrait
{
static public function toUpper($string)
{
return strtoupper($string);
}
/**
* @return callable[]
*/
public function callableProvider()
{
... | true |
7190bf74c50dad665b49838c9c28ca5f056c2186 | PHP | kapxapot/associations | /db/migrations/20190603082046_init_menus.php | UTF-8 | 555 | 2.53125 | 3 | [] | no_license | <?php
use Phinx\Migration\AbstractMigration;
class InitMenus extends AbstractMigration
{
public function change()
{
$table = $this->table('menus');
$table
->addColumn('link', 'string', ['limit' => 100])
->addColumn('text', 'string', ['limit' => 100])
->addC... | true |
31e759cda8d4bb0f309818e4e119a7e639255501 | PHP | arbor-education/sis-sdk-php | /src/Arbor/Model/StudentStandardizedAssessment.php | UTF-8 | 3,157 | 2.75 | 3 | [] | no_license | <?php
namespace Arbor\Model;
use Arbor\Resource\ResourceType;
use Arbor\Query\Query;
use Arbor\Model\ModelBase;
class StudentStandardizedAssessment extends ModelBase
{
public const STUDENT = 'student';
public const STANDARDIZED_ASSESSMENT_TEMPLATE = 'standardizedAssessmentTemplate';
public const ASSESS... | true |
af0d1cecd811de2f7865530f53cd1778dfd6e9cc | PHP | zayceva-nastya/New-_project | /array_table.php | UTF-8 | 626 | 3.078125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<?php
$array=array(
1=>"Иванов",
2=>"Петров",
3=>"Сидоров",
4=>"... | true |
b165c192c31e9006d8ae73813dc1b6805845cab8 | PHP | jasoncases/pa_preview | /src/Proaction/System/Resource/Helpers/Str.php | UTF-8 | 1,869 | 2.984375 | 3 | [] | no_license | <?php
namespace Proaction\System\Resource\Helpers;
class Str
{
public static function camel_case(string $string)
{
return lcfirst(self::pascal_case($string));
}
public static function pascal_case(string $string)
{
$string = ucwords(str_replace(['-', '_'], ' ', $string));
... | true |
d1139fc4c54fbdea28d5457febd0ab1f5ddf6cef | PHP | acerus/WordPressify | /www/wp-content/plugins/template-events-calendar/titan-framework/lib/class-option-date.php | UTF-8 | 6,724 | 2.578125 | 3 | [
"GPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later",
"GPL-2.0-only"
] | permissive | <?php
/**
* Date Option Class
*
* @author Ardalan Naghshineh (www.ardalan.me)
* @package Titan Framework Core
**/
if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
}
/**
* Date Option Class
*
* @since 1.0
**/
class TitanFrameworkOptionDate extends TitanFrameworkOption {
/... | true |
72eeb2e0606b94e401cb0f4637512305ffbd367f | PHP | Densitty/playing_with_php | /4_Functions_&_File_Sys/2_read_file.php | UTF-8 | 602 | 3.734375 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read File</title>
</head>
<body>
<?php
// the content of the file is output as a single-line string
$my_file = file_get_contents('./text.log');
// echo $my_fil... | true |
d1f61e3f6a78911a8c6a0134af0af0976bacf68c | PHP | DatabaseAsAService/dfe-common | /src/Traits/PublishesResults.php | UTF-8 | 2,249 | 2.859375 | 3 | [] | no_license | <?php namespace DreamFactory\Enterprise\Common\Traits;
use DreamFactory\Enterprise\Database\Models\JobResult;
use Illuminate\Support\Facades\Log;
/**
* A trait for things that need to publish a result. Additional functionality for use with
* \DreamFactory\Enterprise\Common\Traits\HasResults
*/
trait PublishesResul... | true |
6b8b044e9d0b7b1bd76e211933f94a28c54f1bc3 | PHP | NwosuCC/combo | /models/Club.php | UTF-8 | 1,844 | 2.78125 | 3 | [] | no_license | <?php
class Club extends Model {
protected $name = '';
protected $_key = '';
protected $code = '';
protected $league = [];
function __construct( $id = '' ) {
parent::__construct( $this->schema() );
if( $id and $record = $this->get( $id )->first() ) {
$this->id = $recor... | true |
7991223426fae2ea3ef31d061e70631113bec138 | PHP | flexa-cz/sixi | /core/Site.core.php | UTF-8 | 4,985 | 2.859375 | 3 | [] | no_license | <?php
namespace core;
/**
* resi html stranu a jeji nezbytne soucasti...
*/
class Site extends Core{
public $data;
private $site=false;
private $content=false;
private $title=false;
private $header=array();
private $highlight;
private $layout='Default';
/* ****************************************************... | true |
c7469e776ef805a9864b036678e6a042891735e5 | PHP | HugoFerreiraDosSantos/Projet-Piscine | /forms/partageTraitement.php | UTF-8 | 1,641 | 2.53125 | 3 | [] | no_license | <?php
include '../includes/login.php';
try
{
$conn = new PDO("mysql:host=localhost;dbname=piscine", "root", "Prolias.123");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SELECT * FROM publication WHERE id_publication = ".$_POST['id'];
$resultats = $conn->query($sql);
$resultat = $... | true |
387c9ac30829259678d98be3236d52570095d91b | PHP | ETICINSATechnologies/Formation | /Sacha Part2/recupcommentaires.php | UTF-8 | 535 | 2.71875 | 3 | [] | no_license | <?php
$db = new PDO('mysql:host = localhost;dbname=bdbibliotheque', 'root', '');
$messages = array();
$recup_messages = $db->query("SELECT *FROM tablecomm ORDER by id DESC");
while($all = $recup_messages->fetch()){
$messages[] = $all;
}
foreach ($messages as $message) {
?>
<section>
<h4><?php e... | true |
854f1144210b6ef5393878b7b30e528b7d4ffcc2 | PHP | fasme/chaxa | /app/models/Archivo.php | UTF-8 | 854 | 2.609375 | 3 | [] | no_license | <?php
class Archivo extends Eloquent { //Todos los modelos deben extender la clase Eloquent
protected $table = 'archivo';
protected $fillable = array('nombre','categoria_id','archivo', 'extension','codigo','version','tiempo','obsoleto','elaboracion');
public function categoria()
{
return $this->belongsTo... | true |
be1ab2ca0b731da4ac9aac7f3eb9bba989316dc0 | PHP | kabab/gestion-stages | /Services/Session.php | UTF-8 | 689 | 3.765625 | 4 | [] | no_license | <?php
/**
* Adding & removing session values
*
* Usage:
* $session = new Session()
* $session->username = 'Youssef'
* echo $session->username;
*
* That's it!
*/
class Session {
public function __construct() {
if (!isset($_SESSION)) {
session_start();
}
}
public f... | true |
8b0d26917fc252c64222251861a4f5a453ad46af | PHP | Learnosity/learnosity-qti | /src/Processors/IMSCP/Out/ManifestWriter.php | UTF-8 | 3,169 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace LearnosityQti\Processors\IMSCP\Out;
use LearnosityQti\Processors\IMSCP\Entities\Manifest;
use LearnosityQti\Services\LogService;
use LearnosityQti\Utils\StringUtil;
class ManifestWriter
{
public function convert(Manifest $manifest, array $rules = []) {
$activityReference = $manifest->getI... | true |
54767c36c1a0ca12fcaeaa75b313a2d044d65984 | PHP | Bruno4745/ProjetoSquad05 | /php/api/parceiro.php | UTF-8 | 2,462 | 2.625 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin:*");
require_once "../actions/conexao.php";
if($_SERVER['REQUEST_METHOD'] === 'GET'){
$sql = "SELECT * FROM parceiros
INNER JOIN cidade_parceiros
ON parceiros.id_cidade = cidade_parceiros.idcidade_parceiros
INNER JOIN estado_parce... | true |
ce73cab881b798bee967365c024852cfe99858df | PHP | mzq1210/newhouse | /api/modules/v1/controllers/MarketController.php | UTF-8 | 1,020 | 2.625 | 3 | [] | no_license | <?php
/**
* 获取市场行情接口
* @Author: <lixiaobin>
* @Date: 17-4-27
*/
namespace api\modules\v1\controllers;
use app\components\ActiveController;
use common\helper\cache\SiteCache;
class MarketController extends ActiveController{
/**
* 根据公司编码获取市场行情
* @Params: Int companyCode 城市公司编码
* @Retrun: Array
... | true |
69ced6bca95465633ed615aeba6fb196007947ee | PHP | allan-fk/Piscine_PHP_Epitech | /Piscine_PHP_Jour_08/ex_10.php | UTF-8 | 126 | 2.6875 | 3 | [] | no_license | <?php
function return_calls()
{
static $i = 1;
if($i % 2 === 0)
{
return $i++;
}
else
{
$i++;
return NULL;
}
}
| true |
222e0c8f366a2324dfa44c14c5359b52678ba4da | PHP | ben06003/MESA9_PHP | /test79.php | UTF-8 | 726 | 2.65625 | 3 | [] | no_license | <?php
class Message{
}
include_once 'sql.php';
include_once 'Member.php';
$mesg = new Message();
if(isset($_REQUEST['account'])&&isset($_REQUEST['passwd'])){
$account = $_REQUEST['account'];
$passwd = $_REQUEST['passwd'];
$sql = "select * from member where accont={$account}";
... | true |
ea467f20c9eac8a4720a7fe6db520627e9c89baa | PHP | yoshiekiura/kcw | /app/Models/TeamBonus.php | UTF-8 | 672 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use App\User;
use Illuminate\Database\Eloquent\Model;
class TeamBonus extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'user_team_bonuses';
/**
* The attributes that are mass assignable.
*
* @v... | true |
9b10e1e80133e7cdf77e6715b5604df035ab1ba1 | PHP | lshanker/BoilerMake2017 | /index.php | UTF-8 | 3,831 | 2.5625 | 3 | [] | no_license | <?php
include_once $_SERVER['DOCUMENT_ROOT'] . "/BoilerMake2017/includes/access.inc.php";
if(!userIsLoggedIn()){
if(isset($_POST['action']) && $_POST['action'] == 'join'){
$GLOBALS['loginError'] = "Created account for " . $_POST['email'];
include_once $_SERVER['DOCUMENT_ROOT'] . "/BoilerMake2017/includes/... | true |
051fe82980dc32f49bbd832cfb6c1bad60cc465b | PHP | code-generators/laravel-crud-code-generator | /src/Codenetix/StubGenerator/Generators/RepositoryClassGenerator.php | UTF-8 | 1,672 | 2.59375 | 3 | [] | no_license | <?php
namespace Codenetix\StubGenerator\Generators;
use Illuminate\Contracts\Config\Repository;
class RepositoryClassGenerator extends BaseGenerator
{
/**
* RequestGenerator constructor.
* @param Repository $config
* @param $basePath
* @param array $options
*/
public function __const... | true |
f336dfad9957897d9c91f9a21a50779466ef280e | PHP | ymanyani-web/server | /server/ycommerce/Models/dbConnection.php | UTF-8 | 342 | 2.90625 | 3 | [] | no_license | <?php
class Db
{
public static function GetConnection()
{
try{
$Connection = new PDO("mysql:host=localhost;dbname=ycommercedb", "root", "root");
return $Connection;
}
catch(Exception $e)
{
echo 'Error : '. $e->getMessage();
... | true |
af86cc6cfa8b21a239c1347e14fb0c54f3c4e720 | PHP | vatzcar/code-sample | /library/acl.php | UTF-8 | 1,447 | 2.78125 | 3 | [] | no_license | <?php
/**
* Class perform ACL for framework
*
* @package JMTFW
* @subpackage ACL
* @author Bhaskar Banerjee
* @version 1.1
* @copyright vatzcar.com
* @license GNU/GPL 2
*
*/
class ACL extends JMTFWBase {
/** @var ACL status */
private $isACLPassed;
/**
* function to check the ACL fo... | true |
f4cdd0916328af0aa19aba6ce11c6bebddf097ab | PHP | michaelhoanglong/wovodat-EOS | /PEAR/php/funcs/v1_funcs.php | UTF-8 | 111,461 | 2.828125 | 3 | [] | no_license | <?php
/******************************************************************************************************
*
* Package of functions doing operations for WOVOML version 1.1.* files
*
* v1_check_dupli_simple: Function to check duplication of data in a same WOVOML file
* v1_check_db_simple: Function to check if data a... | true |
a77f91dfda606a6d81285836dd1dbfc81b15d14d | PHP | haolinbird/phpFamily | /Vendor/JMHttpClient_set/JMHttpClient1.1.0-beta/Core/Connection.php | UTF-8 | 3,785 | 2.5625 | 3 | [] | no_license | <?php
/**
* Connection.
*
* @author xianwangs <xianwangs@jumei.com>
*/
namespace JMHttpClient\Core;
use JMHttpClient\Exception\RequestException;
/**
* Http Connection.
*/
class Connection
{
protected $pool = null;
protected $lastResponse = null;
/**
* Constructor.
*
* @param \JMHttp... | true |
f815378534fbd152639ce1635521048a1430f0a4 | PHP | akshayjoshi12/Investment_demo | /application/models/FundModel.php | UTF-8 | 700 | 2.8125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class FundModel extends CI_Model
{
/**
* File : fundModel.php
* Functionalities : Get and Set Data in Database
**/
public function __construct()
{
parent::__construct();
$this->load->database();
}
/**
... | true |
991d7f705746dc4b7a82e442500bac1e20a7f971 | PHP | TamsIdeaDevelopment/lovlinsquad | /app/Http/Controllers/Roles/Creates/CreateRoles.php | UTF-8 | 817 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: mhmj
* Date: 12/10/2020
* Time: 8:19 PM
*/
namespace App\Http\Controllers\Roles\Creates;
use App\Agent_levels;
use Illuminate\Http\Request;
class CreateRoles
{
/** @var Agent_levels */
private $repository;
/**
* CreateRoles constructor.
* @param ... | true |
87da041e958697c4a74d15cc6ed8870f67d4c533 | PHP | NadiiaMyronenko/FamilyDiary | /model/ModelMother.php | UTF-8 | 865 | 2.8125 | 3 | [] | no_license | <?php
class ModelMother extends ModelBase {
//Добавить задания в таблицу taskList
public function saveTask($tasks){
mysqli_query($this->db, 'DELETE FROM taskList');
foreach ($tasks as $task){
if(!empty($task)) {
mysqli_query($this->db, "INSERT INTO taskList SET task... | true |
d8edb690f9e93ee54dc753b8914906cff74d177c | PHP | mbfjbilal/PHP-CMS | /CMS/includes/forgot.php | UTF-8 | 2,547 | 2.703125 | 3 | [] | no_license | <?php include 'db.php'; ?>
<?php include 'escape.php'; ?>
<?php include '../user_exists.php'; ?>
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
//Load Composer's autoloader
require 'vendor/autoload.php';
//require '../classes/config.php';
if ($_SERVER['REQUEST_METHOD'] == "POST") {
... | true |