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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5b1a9dd7b75b27760bcb0f78f80f35fd7363ad8a | PHP | Colocust/leetcode | /php/725.php | UTF-8 | 974 | 3.25 | 3 | [] | no_license | <?php
/**
* Definition for a singly-linked list.
* class ListNode {
* public $val = 0;
* public $next = null;
* function __construct($val) { $this->val = $val; }
* }
*/
class Solution {
/**
* @param ListNode $root
* @param Integer $k
* @return ListNode[]
*/
function spli... | true |
8b1d337ba917ebba0d9be2a37b6e089447c3bee3 | PHP | vickyromadon/marketplacepenyewaanbarang | /app/Models/Booking.php | UTF-8 | 1,002 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Booking extends Model
{
const STATUS_EMPTY = 'empty';
const STATUS_PENDING = 'pending';
const STATUS_APPROVED = 'approved';
const STATUS_REJECTED = 'rejected';
const STATUS_CANCELED = 'canceled';
/**
* Th... | true |
b9bcac3624a031c38f9454d46745c6972cfdc78d | PHP | zs425/accommfzf2 | /module/CentralDB/src/CentralDB/Entity/RoamfreeCountries.php | UTF-8 | 3,956 | 2.625 | 3 | [] | no_license | <?php
namespace CentralDB\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* RoamfreeCountries
*
* @ORM\Table(name="roamfree_countries")
* @ORM\Entity
*/
class RoamfreeCountries
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedVal... | true |
da5ec2a17d7ddc070720bdebfcd489ef67334ddd | PHP | Niirrty/Niirrty.Observer | /src/Observable.php | UTF-8 | 4,047 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Ni Irrty <niirrty+code@gmail.com>
* @copyright © 2017-2021, Niirrty
* @package Niirrty\Observer
* @since 2017-11-01
* @version 0.4.0
*/
declare( strict_types = 1 );
namespace Niirrty\Observer;
/**
* Defines all base functionality of an observable obje... | true |
b50d735da4038044078733bf5af017e4c6e63e41 | PHP | mikeorange8/spisok-del | /btns.php | UTF-8 | 705 | 2.515625 | 3 | [] | no_license | <?php
if (isset($_POST['logbtn']))
{
$link = mysqli_connect("localhost", "root", "usbw", "sd");
$login = mysqli_real_escape_string($link, $_POST['login']);
$pass = mysqli_real_escape_string($link, $_POST['pass']);
$query = "SELECT id FROM users WHERE login = '".$login."' AND password = '".$pass."'";
$_SESS... | true |
2bc8ce1d0095fcbf60d366dfe98ed70787be2a76 | PHP | consolari/php-logger | /src/Consolari/Transport/AbstractTransport.php | UTF-8 | 226 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Consolari\Transport;
abstract class AbstractTransport implements TransportInterface
{
protected $data = array();
public function setData(Array $data)
{
$this->data = $data;
}
} | true |
4b22a11deb10cc893eb68bb093d12e061e939d4d | PHP | bradley-holt/beginner-php | /15-enumerative-arrays.php | UTF-8 | 390 | 2.96875 | 3 | [] | no_license | <?php
$foo = array (
0 => 'X',
1 => 'Y',
2 => 'Z',
);
echo '<p>';
// escape output
echo htmlspecialchars($foo[0]);
echo '</p>';
$bar[0] = 'X';
$bar[1] = 'Y';
$bar[2] = 'Z';
echo '<p>';
// escape output
echo htmlspecialchars($bar[1]);
echo '</p>';
$baz[] = 'X';
$baz[] = 'Y';
$baz[] = 'Z';
echo '<... | true |
8c5e8adf338d7c038bd90f7ce3474a965b3e1f8a | PHP | jonatas1002/projeto-web-beginer | /class/UsuarioDAO.php | UTF-8 | 1,125 | 2.984375 | 3 | [] | no_license | <?php
class UsuarioDAO{
private $conexao;
function __construct($conexao){
$this->conexao = $conexao;
}
function listaUsuario(){
$usuariosArray = array();
$resultado = mysqli_query($this->conexao, "SELECT u.nome, u.cod_usuario, u.usuario, u.senha, u.ativo, n.nivel FROM usuarios u
JOIN nivel_acesso n ON... | true |
df7c96625ed4ebe1fe6f8bbd32bd674d008c9df2 | PHP | antonioMedinaCorp/htdocs | /DWESPracticas/cookies/ultimoAcceso.php | UTF-8 | 338 | 2.59375 | 3 | [] | no_license | <?php
$dateNow = date('d-m-y h:i:s');
/*SI NO SE PONE EL TIEMPO, SE BORRA CADA VEZ QUE SE CIERRE EL NAVEGADOR*/
setcookie('ultimoAcceso', $dateNow, time()+3600);
if(isset($_COOKIE['ultimoAcceso'])){
?>
Su última conexión fue: <?php echo $_COOKIE['ultimoAcceso']?>
<?php
}
else{
echo 'Primer acceso a la pági... | true |
41c434d0d4c1798de39de662b4056c4d2a1c2e1b | PHP | OctopyID/OctopyFramework | /system/Config/DotEnv.php | UTF-8 | 5,466 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* ___ _
* / _ \ ___| |_ ___ _ __ _ _
* | | | |/ __| __/ _ \| '_ \| | | |
* | |_| | (__| || (_) | |_) | |_| |
* \___/ \___|\__\___/| .__/ \__, |
* |_| |___/.
* @author : Supian M <supianidz@gmail.com>
* @link : framework.octopy.id
* @license : MIT
*/
namesp... | true |
f4c1fdb66908f8347f913f2f0df32aba85900143 | PHP | mtils/cmsable | /src/Cmsable/Routing/TreeScope/RepositoryInterface.php | UTF-8 | 916 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php namespace Cmsable\Routing\TreeScope;
interface RepositoryInterface{
/**
* Returns all available scopes
*
* @return \Traversable
**/
public function getAll();
/**
* Returns the scope with name $name
*
* @throws OutOfBoundsException If no scope with name $name was f... | true |
54cb91253e9c5805599c7f20522bb8ff38e6467f | PHP | mucan54/laravel-catalog | /app/Orchid/Screens/CustomerListScreen.php | UTF-8 | 1,093 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Orchid\Screens;
use Orchid\Screen\Actions\Link;
use Orchid\Screen\Screen;
use App\Orchid\Layouts\CustomerListLayout;
use App\Models\Customer;
class CustomerListScreen extends Screen
{
/**
* Display header name.
*
* @var string
*/
public $name = 'Kullanıcı Listesi';
... | true |
1828540dadbf969b0f5491a83a8f651afb188cb6 | PHP | BykAndrey/timkaby | /app/Http/Controllers/Auth/AuthController.php | UTF-8 | 8,766 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\User;
use GuzzleHttp\Client;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Mail;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\Auth... | true |
09df77bc2a8467e0cc9fb73387346257b52918c6 | PHP | InfoSec4Fun/SorcecodeReview | /SQLi/Sec_login_action.php | UTF-8 | 1,276 | 2.640625 | 3 | [] | no_license | <?php
# create a session cookie
session_start();
include 'db.php';
if ( isset($_POST['username']) ){
$SCR_username = $_POST['username'];
}
if ( isset($_POST['password']) ) {
$SCR_password = $_POST['password'];
}
$sql = "SELECT * FROM user_info WHERE username = ? AND passcode = ?";
$hand= $db->prepare($sql);
$han... | true |
debcd1245780f2b84ebc79a0d73d276b9c23f020 | PHP | DuronStacy/Database | /database.php | UTF-8 | 4,729 | 3.015625 | 3 | [] | no_license | <h3> Brouillon : Palmer </h3>
<?php
$host="localhost";
$login="root";
$pass="root";
$base="CSV_DB";
//Se connecter à la BD
try
{
//Si succès
$bdd = new PDO("mysql:host=$host;dbname=$base", $login, $pass);
//echo "connexion réussie";
}
catch (Exception $e)
{
// Si echec
die('Erreur : ' . $e->getMessage());... | true |
f867272ca239849cf95a3f4c5f5cb74bf591d9ff | PHP | p-simonazzi-rensolution/mySpese | /class/database.php | UTF-8 | 1,290 | 3.171875 | 3 | [] | no_license | <?php
/*
* © Paolo Simonazzi 2014
* DbManager - class Database
*/
class Database {
public $name = "my_paolosimonazzi";
private $host = "localhost";
private $password = "lordvladeck89";
private $user = "paolosimonazzi";
public $debug = false;
private $mysqli;
public function __constructor() {... | true |
824bbc4ecaed841ce6d79216ae21e0ffbbb48cf7 | PHP | ajbm6/ecomm | /app/database/seeds/UsersTableSeeder.php | UTF-8 | 707 | 2.546875 | 3 | [] | no_license | <?php
class UsersTableSeeder extends Seeder {
public function run() {
$user = new User;
$user->firstname = 'Ranie';
$user->lastname = 'Santos';
$user->address = '#76 Bernal St. Barangay Rosario Pasig City';
$user->city = 'Pasig';
$user->email = 'ransan32@yahoo.com';
$user->password = Hash::make('Admin12... | true |
1689d4fcf777ebfe0a63ea15c758d12fee14cf45 | PHP | Gomesantos/CRUDMarket | /app/Http/Controllers/vendaController.php | UTF-8 | 1,867 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Model\venda;
class vendaController extends Controller
{
private $modelo;
public function __construct(venda $venda)
{
$this->modelo = $venda;
}
public function getAll(){
$venda... | true |
e970c979fa902676e72100db42b7ff93038226cf | PHP | noruzzamanrubel/Practice-OOP | /construct.php | UTF-8 | 380 | 4.28125 | 4 | [] | no_license | <?php
class Math {
public $a;
public $b;
public function __construct($first, $second) {
$this->a = $first;
$this->b = $second;
$this->mul(1);
}
public function sum() {
echo $this->a + $this->b;
}
public function mul($c) {
echo $this->a + $this->b + $c;
}
}
$obj = new Math(2, 2);
$obj->sum();
e... | true |
e4d3d60ed3b5ff06127f59aaf2a9f0bc3cd58a8f | PHP | jauharimalik/stable | /app/model/mod/db.class.php | UTF-8 | 21,916 | 2.65625 | 3 | [] | no_license | <?PHP
defined('SYS') or exit('Access Denied!');
/*
* Warpsite MVC Framework version 1.0
* Author : Jauhari Malik
*/
// Error Reporting
error_reporting(E_ALL);
class Database{
private $mysqli;
public function __construct($host, $user, $pass, $db){
$this->mysqli = new mysqli($host, $user, $pass, $db);
if(my... | true |
3c561237420216ad6e3ba7826728a6998082bd34 | PHP | seriux55/loweeb00043 | /src/Base/NrohoBundle/DataFixtures/ORM/AvisData.php | UTF-8 | 2,628 | 2.53125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Base\NrohoBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Base\NrohoBundle\Entity\Avis;
class AvisData extends AbstractFixture implements OrderedFixtureInterface
{
... | true |
f3b25a7b52ccfab7897d43efcc6f5a439526369c | PHP | cweiske/contagged | /inc/smarty/plugins/modifier.noteparser.php | UTF-8 | 1,405 | 2.921875 | 3 | [] | no_license | <?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Smarty plugin
*
* Type: modifier
* Name: noteparser
* Date: Feb 26, 2003
* Purpose: Converts plaintext notes to richer HTML (very simple)
* Example: {$entry.note|noteparser}
* @author Andreas Gohr <gohr@cosmocode.de... | true |
45d6e1c7f607b93418c3d2f35729e3a9f751d488 | PHP | marcorosas1991/theInquisition | /public/model/users.php | UTF-8 | 1,778 | 2.828125 | 3 | [] | no_license | <?php
function userType($user_id) {
global $link;
$query = 'SELECT userType
FROM user
WHERE id=:id';
$statement = $link->prepare($query);
$statement->bindValue(':id', $user_id);
$statement->execute();
$user_type = $statement->fetch();
$statement->closeCursor();
return $user_ty... | true |
e8120b35973b47ea8c2c1ac319f751a0452a4be9 | PHP | lianran111/umini-openapi | /com/umeng/umini/param/UmengUminiElementDTO.class.php | UTF-8 | 2,967 | 2.59375 | 3 | [] | no_license | <?php
include_once('com/alibaba/openapi/client/entity/SDKDomain.class.php');
include_once('com/alibaba/openapi/client/entity/ByteArray.class.php');
class UmengUminiElementDTO extends SDKDomain
{
private $elementId;
/**
* @return 元素ID
*/
public function getElementId()
{
return $this... | true |
8acfd87674456b614e0b3134db318cbf37a8d76a | PHP | eLoyyyyy/pls-server | /Application/Model/Project.php | UTF-8 | 537 | 2.859375 | 3 | [] | no_license | <?php
class Project extends Model {
static function getProjects($employee_id) {
$sql = "CALL `get_projects`(:employee);";
$qry = self::getDb()->prepare($sql);
$qry->execute( array(':employee' => $employee_id) );
$rows = array();
while($row = $qry->... | true |
cc3b4d1a90bfd6456ea314f7b59c5f8e3c73fa8e | PHP | remi-san/specification | /src/NotSpecification.php | UTF-8 | 581 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace RemiSan\Specification;
class NotSpecification extends AbstractSpecification implements Specification
{
/** @var Specification */
private $specification;
/**
* Constructor.
*
* @param Specification $specification
*/
public function __construct(Specification $specifi... | true |
9d42d4a06ac4bb18668dfd6f011e38e168281b03 | PHP | ToungGHOST/API | /app/Modules/Event/Repositories/EventRepositories.php | UTF-8 | 1,951 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Modules\Event\Repositories;
use App\Libraries\Logger;
use App\Modules\Event\Models\EventModel;
use App\Helpers\UserUtils;
use CodeIgniter\Controller;
class EventRepositories extends Controller
{
private $eventModel;
/**
* Constructor.
*/
public function __construct()
{... | true |
fe4f3b1d0635eaa037281157e0fc2562ddc37b4b | PHP | omise/omise-php | /tests/OmiseExceptionTest.php | UTF-8 | 7,611 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
use PHPUnit\Framework\TestCase;
use Omise\Traits\ChargeTrait;
class OmiseExceptionTest extends TestCase
{
/**
* use charge trait to create a charge using
* default customer id and card id.
*/
use ChargeTrait;
/**
* @test
* ----- Test OmiseException::getInstance() -----
... | true |
17ba5d34e2b185d73991698a55e144bfa127898a | PHP | T-sato1220/PhpPractice | /paiza_B008.php | UTF-8 | 440 | 3.046875 | 3 | [] | no_license | <?php
// 自分の得意な言語で
// Let's チャレンジ!!
$i= 0;
while(! feof(STDIN)){
$line[$i] = trim(fgets(STDIN));
$i++;
}
$a = explode(" ",$line[0]);
//var_dump($a);
for($i=1;$i<$a[1]+1;$i++){
$b = explode(" ",$line[$i]);
for($j=0;$j<$a[0];$j++){
$payoff += $b[$j];
}
if(0<=$payoff){
... | true |
f0cc14a92e9ef6143077c4991b25f3bb015c779a | PHP | uschmelzer/wp-prefix-posts-only | /functions.php | UTF-8 | 1,801 | 2.734375 | 3 | [
"Unlicense"
] | permissive | <?php
// Add this to your functions.php
// -------------------------------------------------------------------
// Wordpress: Add a Prefix to url for posts only
// -------------------------------------------------------------------
// CURRENT: /my-news-title
// NEW : /my-prefix/my-news-title
// ------... | true |
8482fa9291e22d66bdb0164ecdd483e98d0e1873 | PHP | neverstopforever/Codeigniter-Moodle-PHPMailer-Schedule-Booking | /application/models/MatriculaDocModel.php | UTF-8 | 874 | 2.546875 | 3 | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class MatriculaDocModel extends MagaModel {
public function __construct() {
parent::__construct();
$this->table = "matricula_doc";
}
public function getByEnrollId($id) {
$query = $this->db->select('id, nombre AS name, documento, doclink, visible, (SELECT count(*) FROM '.$thi... | true |
fe637f487802ac93c181f644cf3098377b301ed5 | PHP | PacktPublishing/Modular-Programming-with-PHP7 | /Chapter06/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/RedisAdapter.php | UTF-8 | 10,452 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Cache\Adapter;
use Predis\Connection\Factory;
use Pre... | true |
517f86d593c7ffb01412f645943ffc4935c58ec1 | PHP | Lucas-Ramina/Inscri-o | /treinamento/DAO/CursoDAO.php | UTF-8 | 1,556 | 2.75 | 3 | [] | no_license | <?php
require_once dirname(__FILE__)."/../DBConexao.php";
class CursoDAO{
private static $conexao;
public function __construct(){
self::$conexao = DBConexao::getInstancia();
}
public function inserir(Curso $curso){
$query = self::$conexao->prepare("INSERT INTO curso(nom... | true |
958a10f121dc61a4d5b0d83a20b3c9be45310172 | PHP | zhamao2019/PHP-CustomerDepositCalculator | /CustomerInfo.php | UTF-8 | 7,562 | 2.78125 | 3 | [] | no_license | <?php
include './Lab4Common/Header.php';
include './Lab4Common/Functions.php';
?>
<?php
session_start();
?>
<?php
$name = $_POST["name"];
$postCode = $_POST["postCode"];
$phone = $_POST["phone"];
$email = $_POST["email"];
$contactMethod = $_POST["contactMethod"];
$contactTime = $_POST["... | true |
b4aecd73ef3f0e6895825384215ae054401d0e9b | PHP | resyst-cz/tvojekostatus | /wp-content/plugins/gdprcookies-framework/src/posttype/gdprcTaxonomy.php | UTF-8 | 12,090 | 2.6875 | 3 | [] | no_license | <?php
/**
* Please see gdprcookies-framework.php for more details.
*/
/**
* gdprcTaxonomy class
*
* @author $Author: NULL $
* @version $Id: gdprcTaxonomy.php 167 2018-02-24 23:09:06Z NULL $
* @since 0.1
*/
final class gdprcTaxonomy
{
/**
* The name for the Taxonomy to register
*
* @since 0.1
*
* ... | true |
be496850c91f2181cd2a58aeb7d1d972310350b6 | PHP | SusoGym/SEST | /base/class.supermodel.php | UTF-8 | 714 | 2.984375 | 3 | [] | no_license | <?php
namespace base;
class SuperModel {
/** @var $instance SuperModel */
private static $instance;
/** Returns instance of model
*
* @return SuperModel
*/
public static function getInstance() {
return self::$instance;
}
/** @var \Connection */
protec... | true |
7b85e6637bf3d3278ce695a5c21687b01e892f8e | PHP | felixdorn/twitter-stream-api | /src/Generator/CountOperator.php | UTF-8 | 1,651 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Felix\TwitterStream\Generator;
use Felix\TwitterStream\Support\Str;
/**
* @codeCoverageIgnore (internal tool)
*
* @internal
*/
class CountOperator
{
public string $snakeCasedName;
public string $nameAsMethodName;
public string $name;
public function __construct(string $name)
... | true |
e1d147cfe1fdd6a9c9e2ccba025bc97f7ae4a649 | PHP | itzsoumyadip/covid-19_Tracker | /app/Models/PostModel.php | UTF-8 | 491 | 2.640625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php namespace App\Models;
use CodeIgniter\Model;
class PostModel extends Model{
public $table = 'posts';
public $returnType = 'array';
public $useSoftDeletes=false;
public $allowedFields=['uid','suspect_name','suspect_addres','suspect_email','suspect_city','suspect_zipCode','suspect_country','gen... | true |
8eb5cf792e9b836fbc8adedd57537ee6c66dcc48 | PHP | Remo/ponsole | /src/Ponsole/BaseCommand.php | UTF-8 | 1,511 | 2.953125 | 3 | [] | no_license | <?php
namespace Ponsole;
use Symfony\Component\Console\Command\Command;
/**
* The base command where common methods should be kept
*
* @author Remo Laubacher <remo.laubacher@gmail.com>
* @package Ponsole
*/
abstract class BaseCommand extends Command {
protected function copyWithParameters($sourceDirectory... | true |
3bfe663d82b9bb12e0ec3dab1629138d895cedb5 | PHP | Nabilfadilah/pw2021_203040020 | /praktikum/Tugas5/latihan5c/php/functions.php | UTF-8 | 1,314 | 2.84375 | 3 | [] | no_license | <?php
// fungsi untuk melakukan koneksi ke database
function koneksi()
{
$conn = mysqli_connect("localhost", "root", "");
mysqli_select_db($conn, "pw_tubes_203040020");
return $conn;
}
// function untuk melakukan query dan memasukannya kedalam array
function query($sql)
{
$conn = koneksi();
$res... | true |
28aae483c3822e61a9b7812c0358ec7174eec91f | PHP | bulatko/btc_monitor_bot | /wallet.php | UTF-8 | 5,233 | 2.71875 | 3 | [] | no_license | <?php
class wallet
{
/** @var Mysqli $mysqli */
private $mysqli;
public $id, $wallet, $transactions_number, $total_received, $final_balance, $is_updating, $last_update_offset, $transactions, $description;
public function wallet($mysqli)
{
$this->mysqli = $mysqli;
}
public function... | true |
1df4371f8992ee9676f58b8208eb28c99201244c | PHP | dakusan/LetsEncrypt-Better-Apache-Installer | /cfile_get_contents.php | UTF-8 | 648 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?
//Make ssh.exec compatible w/ file_get_contents
function cfile_get_contents($S)
{
//Normal file_get_contents
if(!preg_match('/^\s*ssh2\.exec:/i', $S))
return @file_get_contents($S);
//ssh2.exec wrapper to get all contents
$Parts=Array();
$Stream=@fopen($S, 'r');
$EmptyCount=0;
if($Stream===FALSE)
return ... | true |
bd0e9fb59c3ccdc30412f2b5f1354c845537d675 | PHP | ngmautri/nhungttk | /module/Application/src/Application/Domain/Shared/Uom/BaseUom.php | UTF-8 | 3,526 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Application\Domain\Shared\Uom;
use Application\Domain\Shared\ValueObject;
use Application\Domain\Shared\ValueObjectInterface;
/**
*
* @author Nguyen Mau Tri - ngmautri@gmail.com
*
*/
abstract class BaseUom extends ValueObject implements \JsonSerializable, ValueObjectInterface
{
... | true |
456b57ac85f889840810e9e9320e0ef15fadd98a | PHP | LovelyGon/APT | /app/Enumeration/ChildrenType.php | UTF-8 | 557 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Enumeration;
use MyCLabs\Enum\Enum;
class ChildrenType extends Enum
{
const YES = 'YES';
const NO = 'NO';
public static function toArray()
{
$translatedItem = array();
$class = get_called_class();
$reflection = new \ReflectionClass($cla... | true |
f5d33b28c399a31c0c832e5267a319ac49443c51 | PHP | hack-the-rat/CS-490-Final-Project | /release/backend/examUpdate.php | UTF-8 | 1,016 | 2.609375 | 3 | [] | no_license | <?php
try {
$db = new mysqli("sql.njit.edu", "rat27", "hub1881", "rat27");
}
catch (Exception $e) {
$message = "Service Unavailable. Error: " . $e;
echo json_encode($message);
exit;
}
if (isset($_POST['examName'], $_POST['username'], $_POST['id'], $_POST['grade'], $_POST['teacherNotes'])) {
... | true |
0715257289c3741bc4a95187fad58a7863c4c556 | PHP | MohanaDatla/PHP-CRUD | /index.php | UTF-8 | 2,465 | 2.796875 | 3 | [] | no_license | <?php
require_once "pdo.php";
session_start();
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title> Mohana Datla 48e72a50 </title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2l... | true |
2870d8efc7062aaa2a3f2b7f1453aa9f5c8740a7 | PHP | CodeCommerce/CodingDays | /Dashboard/src/Report/DataType/Sales.php | UTF-8 | 1,048 | 2.953125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace CodingDays\Dashboard\Report\DataType;
use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Type;
/**
* @Type()
*/
final class Sales
{
/** @var string */
private string $orderIdentifier;
/** @var string */
private st... | true |
5bfa2b66ae0fbb1f632199f6e2ea84b7d6bb0357 | PHP | 77708696/php | /pack/pack.php | UTF-8 | 731 | 2.828125 | 3 | [] | no_license | <?php
// http://randomclan.blog.163.com/blog/static/1453009820125454418912/
$code=array(
"username"=>array("A20","张三adfb12"),
"pass"=>array("A10","asdf*#1"),
"age"=>array("C","23"),
"birthday"=>array("I","19900101"),
"email"=>array("A50","zhangsan@163.com"));
$stream=join("... | true |
d0635fa0de37004b0f09606339531c4c6d718dd3 | PHP | ywang2014/Python-PHP-WebDevelopment | /web-php/LibraryManageSystem/1.2/logs/ma_log.php | UTF-8 | 1,147 | 2.546875 | 3 | [] | no_license | <?php
// 负责管理员登录处理的php脚本程序
// ma_log.php
$name = trim($_POST["username"]);
$password = trim($_POST["password"]);
include "../include/common.php";
// connection
$link = mysql_connect($hostname, $username, $hostpassword) or die("数据库服务器连接失败!");
@mysql_select_db($dbname, $link) or die("数据库连接失败!");
$passwordmd5 = md5($pa... | true |
889b100ae714e0b0a3c766fb45759b888ac7d68f | PHP | Gigya-ClientServices/usage-report | /lib/logger.class.php | UTF-8 | 4,785 | 3.21875 | 3 | [] | no_license | <?php
abstract class LogLevels {
const debug = 0x00000001;
const info = 0x00000010;
const warn = 0x00000100;
const error = 0x00001000;
const critical = 0x00010000;
}
class Logger {
const defaultLogLevel = LogLevels::info;
private $logLevel = LogLevels::error;
private... | true |
6cbad7519b14db0d7eac7ec19e4649a65b6852da | PHP | XCarrel/CSUAPI | /database/migrations/2021_06_09_152426_create_todosheets_table.php | UTF-8 | 765 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTodosheetsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('todosheets', function(Blueprint $table)
{
$table->integer('id', true);
... | true |
a4e3cabb18b3f9f2aa76ab1294ed08eafc1ec25a | PHP | asepindrak/saber | /src/App/Commands/Docker.php | UTF-8 | 4,690 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Saber;
use Symfony\Component\Process\Process;
class Docker
{
public $cli;
/**
* Create new Docker instance
*
* @param boolean $verbose
* @param Shell $cli
*/
public function __construct(Shell $cli)
{
$this->cli = $cli;
}
/**
* Build the ... | true |
43d5dda980b03a1da95660c9987c7ef5dff63599 | PHP | vinhdn/doan_api | /protected/components/Helper/Validator/Validator.php | UTF-8 | 1,726 | 3.078125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class Validator{
public static function validatePostParam($postParams, $isNumber = false){
if(isset($_POST[$postParams])){
return $_POST[$postParams];
}
if(!$isNumber){
return '';
}
else{
return 0;
}
}
public static function getError($errors){
$errorString = '';
foreach($errors as $... | true |
599607ca9de2b8a752e4519a3f7f4c6f086094f7 | PHP | mateusweb/nadeb | /v6.0.0.0/NadebLive/DataGrid/Tools/MoveTool.php | UTF-8 | 581 | 2.640625 | 3 | [] | no_license | <?php
namespace NadebLive\DataGrid\Tools;
use NadebLive\Xml\ElementXml;
use NadebLive\DataGrid\Component\ToolsComponent;
class MoveTool extends ToolsComponent
{
protected function setElementName()
{
$this->class = 'edit_move';
}
public function createLink($primaryValue)
{
$element = new ElementXml( 'td' )... | true |
bc68c65664f37dc78104ee609787f3b158ec1ccb | PHP | PradhiptaBagaskara/sistem-latih | /admin/lap.php | UTF-8 | 2,564 | 2.671875 | 3 | [] | no_license | <?php
include 'inc.koneksi.php';
include 'inc.session.php';
?>
<?php if(isset($_GET['gejala'])){ ?>
<body onload="window.print();" Layout="Portrait">
<center><h3>LAPORAN DATA CIRI BENTUK WAJAH</h3></center>
<table border=1 width=600>
<thead>
<tr>
<th>No</th>
<th>Kode Ciri</th>
<th>Nama Ciri</th>
</tr>
<... | true |
3965a5d30a4d873c60f90b6dc4f4267990893a04 | PHP | nicoleip/Cram | /pages/create_decks.php | UTF-8 | 5,377 | 2.546875 | 3 | [] | no_license | <?php
require_once '../db/dbconfig.php';
if(!$user->is_loggedin())
{
$user->redirect('login.php');
}
if(isset($_POST['create-deck']))
{
$title = trim($_POST['title']);
$category_id = trim($_POST['categoryid']);
$description = trim($_POST['description']);
$user_id = trim($_SESSION['user_session']);
try
... | true |
ca8b8e67368cac6f682f542184d280e206c23cb3 | PHP | Mamata2507/example-API | /API/v1.1/functions/keys.php | UTF-8 | 2,321 | 2.78125 | 3 | [] | no_license | <?php
/**
* @author: Wayne Maxim
* @description: remote data management system
* @dateOfCreation: 24/10/2017
**/
define("EMAIL_CODE_ACTIVATION_TYPE", 1);
define("PHONE_CODE_ACTIVATION_TYPE", 2);
function addCodeActivation($objectKey, $time, $type = EMAIL_CODE_ACTIVATION_TYPE, array $other, int $user... | true |
50849617b7dc1b71f8bd0e020d5293c618d4a4a5 | PHP | collectivecolors/php-fbGraph | /object/FbAlbum.php | UTF-8 | 2,158 | 2.90625 | 3 | [] | no_license | <?php
/**
* Require some needed classes.
*/
fb_graph_require('FbLinkedResource', 'object', TRUE);
/**
* Facebook Graph API user photo album object.
*/
class FbAlbum extends FbLinkedResource {
/**
* Provide a text based name for this object class.
*/
public function getType() {
ret... | true |
d2aa3c3318496aec9695f7990468aab7707eba60 | PHP | IP-CAM/Opencart-to-Symfony-Bridge-Extension | /src/Generator/Hydrator/Design/LayoutHydrator.php | UTF-8 | 1,113 | 2.890625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Sypa\Generator\Hydrator\Design;
use Sypa\Model\Design\Layout;
class LayoutHydrator {
const REQUIRED_DATA = [
'layout_id',
'name'
];
/**
* @param array $data
* @return Layout
* @throws \Exception
*/
public function hydrate(... | true |
0d255ca897a5b7af3e69889308a0f2a2667bcb8d | PHP | kozloffsky/mspin | /library/Moodspin/Bootstrap/Resource/Cache.php | UTF-8 | 4,855 | 2.609375 | 3 | [] | no_license | <?php
/**
* Bootstraps classes which controlls handles functionality
* bootstrap memcached
*
*/
class Moodspin_Bootstrap_Resource_Cache extends Zend_Application_Resource_ResourceAbstract {
/**
* resource name in config
*
* @var string
*/
public $_explicitType = "cache";
public s... | true |
a06f7a955042d60b1f37972402ad9bc8e412f186 | PHP | yesterdaysFoe/Marzon_Hotel | /marzon_hotel/addexec.php | UTF-8 | 917 | 2.625 | 3 | [
"MIT"
] | permissive |
<?php include 'config.php'; ?>
<?php
if (!isset($_FILES['image']['tmp_name'])) {
echo "";
} else {
$file = $_FILES['image']['tmp_name'];
$image = addslashes(file_get_contents($_FILES['image']['tmp_name']));
$image_name = addslashes($_FILES['image']['name']);
$image_size = getimagesize($_FILES['ima... | true |
443d249f163413b9d555ea48f899d76aa80e1c02 | PHP | WadsonPontes/loginComNiveisDeAcesso | /v5/cadastro.php | UTF-8 | 1,883 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
include "api.php";
$SERVIDOR = "localhost";
$BANCO_DE_DADOS = "teste";
$USUARIO = "root";
$SENHA = "";
$TABELA_USUARIOS = "usuarios";
$TABELA_LOG = "log";
if (!seLogadoRedireciona($SERVIDOR, $BANCO_DE_DADOS, $USUARIO, $SENHA, $TABELA_USUARIOS)) {
?>
<!DOCTYPE html>
<html>
<head>
<meta charse... | true |
1314d28bc6502937d276fcf40a590e23693e417d | PHP | maks-0906/shards-of-empire | /Library/E1/Action.php | UTF-8 | 5,782 | 2.828125 | 3 | [] | no_license | <?php
/**
* @properties Status $status
*/
abstract class Action extends Object{
protected $aRegisterEvents = array();
protected $aAuthLevelEvents = array();
protected $sDefaultEvent = null;
protected $aParams = array();
protected $sTemplateName;
protected $oRouter;
protected $... | true |
9a2294afaf82254691a8c5705ebc98cedcea7bf1 | PHP | dolmenes/dbrowformat | /dbrowformat.php | UTF-8 | 3,364 | 3.09375 | 3 | [] | no_license | <?php
/*
FORMATO A EMPLEAR:
'nombre_de_columna' => TIPO
'nombre_de_columna' => Array( [ Array( lista_de_valores ), ] TIPO [ , valor_por_defecto [ , tipo_del_valor_por_defecto ] ] )
EJEMPLOS
[
'uid' => SQLITE3_INTEGER
'name' => [ SQLITE3_TEXT ],
'lastlogin' => [ SQLITE3_TEXT, time( ) ],
'notes' ... | true |
443802a2848020b8b292c10e9585c0869b5ffa12 | PHP | MalronWall/OC_Fo-Back_P6 | /src/UI/Responders/Interfaces/TricksDetailsResponderInterface.php | UTF-8 | 1,004 | 2.578125 | 3 | [] | no_license | <?php
declare(strict_types=1);
/**
* (c) Thibaut Tourte <thibaut.tourte17@gmail.com>
*/
namespace App\UI\Responders\Interfaces;
use App\Domain\Models\Trick;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use T... | true |
41ed4a9e9d4b2730258f0d049c484ff8de876582 | PHP | ahmedmohamedshawky/labsny_backEnd | /app/Http/Controllers/ShopCategoryController.php | UTF-8 | 4,230 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\DataTables\ShopCategoryDataTable;
use App\Http\Requests\CreateShopCategoryRequest;
use App\Http\Requests\UpdateShopCategoryRequest;
use App\Repositories\ShopCategoryRepository;
use Flash;
use Illuminate\Support\Facades\Response;
use Prettus\Validator\Exceptions\ValidatorE... | true |
c023e136cd42985d33fbaa0d313958fbd9229982 | PHP | kerlexov/subnetcalc | /submreza.php | UTF-8 | 4,658 | 2.765625 | 3 | [] | no_license | <?php
class mreza{
public $id;
public $adresa;
public $maska;
public $sub;
public $report;
public $adresamreze;
public $prvakorisna;
public $zadnjakorisna;
public $broadcast;
public $ima;
public $max;
public $sledeca;
//public $jsonreport;
public function __con... | true |
e3f41fe0b59e8c71dc69fa1280a6e5af5559a3fd | PHP | chromov/pigsty | /lib/i18n.php | UTF-8 | 8,026 | 2.625 | 3 | [] | no_license | <?php
/**
* I18n
* Internationalization class
*/
class I18n {
/**
* translations
*
* @static
* @var array
* @access private
*/
private static $translations = array();
/**
* fallbacks
*
* @static
* @var array
* @access private
*/
private static $fallbacks = array();
... | true |
78df40cc45f4a3a9abe84d0dcb910ec40b5a7ef8 | PHP | 1101137130/docker_checkergame | /tests/Unit/RaterecordTest.php | UTF-8 | 1,077 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Unit;
use App\CheckersClass\selectRaterecords;
use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class RaterecordTest extends TestCase
{
/**
* @dataProvider dataSelectProvider
*/
public function te... | true |
19422e0e94a2a497a06f2640208ef506ad263e16 | PHP | WPRiders/Woocomerce-Subscription-send-data-to-Drip | /do_woocommerce_drip.php | UTF-8 | 12,482 | 2.53125 | 3 | [] | no_license | <?php
/**
* Plugin Name: Do Woocommerce Drip
* Plugin URI: http://www.wpriders.com
* Description: Do Woocommerce Drip
* Version: 1.0.0
* Author: Ovidiu George Irodiu from WPRiders
* Author URI: http://www.wpriders.com
* License: GPL2
*/
if ( ! defined( 'ABSPATH' ) ) {
header( 'Status: 403 Forbidden' );
heade... | true |
fc49061a02e7451fa0dfcca74d361965bc2e814e | PHP | MRajibH/NewsPortal | /Portalcode/authorreg.php | UTF-8 | 1,786 | 2.5625 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration</title>
<!-- Bootstrap -->
<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css"/>... | true |
ce497ae4fb3a6f7f0903052d9a6f1336734e8e96 | PHP | apoorv-247/product_options | /app/Core/Models/OrderCore/Eddm/Selection.php | UTF-8 | 551 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Core\Models\OrderCore\Eddm;
use App\Core\Models\BaseModel;
class Selection extends BaseModel
{
/**
* Specify the DB connection to use.
*
* @string
*/
protected $connection = 'order_core';
/**
* Specify the table to use.
*
* @var string
*/
pr... | true |
dcc4ae9a52e8dacf25495f74e0763c77e0559ccf | PHP | thelia-modules/TntSearch | /Service/Stemmer.php | UTF-8 | 1,560 | 2.75 | 3 | [] | no_license | <?php
namespace TntSearch\Service;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use TeamTNT\TNTSearch\Stemmer\GermanStemmer;
use TeamTNT\TNTSearch\Stemmer\ItalianStemmer;
use TeamTNT\TNTSearch\Stemmer\PolishStemmer;
use TeamTNT\TNTSearch\Stemmer\PorterStemmer;
use TeamTNT\TNTSearch\Stemmer\RussianS... | true |
69add346c250a82c89e090ec0f9a1cbc63b8f87d | PHP | cHolzberger/sag-akademie | /sag-akademie.de/lib/Mosaik/ElementList.php | UTF-8 | 1,093 | 3.03125 | 3 | [] | no_license | <?php
/**
* @author Christian Holzberger <ch@mosaik-software.de>
* @package Mosaik
* @license Use not permitted without written license
*
*/
class MosaikElementList { ## list of possible tags for html
var $elements;
var $datasourceList;
var $hitcache;
function __construct (&$datasourceList, $elements=false)... | true |
92d87b875e693c5f1875714a9284ccbfd850bb54 | PHP | igunultas/insider-league | /app/Http/Controllers/WelcomeController.php | UTF-8 | 651 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\DB\Fixture;
use App\DB\Team;
use Illuminate\Http\Request;
class WelcomeController extends Controller
{
public function index(Request $request){
$teams = Team::with('homeMatches', 'awayMatches')->get();
if($request->has("season"))
$season =... | true |
e98c851c7c75a78f7cef43c3dead26d62dffdd87 | PHP | fr-matsuo/training | /table.php | UTF-8 | 678 | 3.625 | 4 | [] | no_license | <?php
class Table {
private $_column_list;
private $_record_list;//カラム*レコード
function __construct($column_list, $record_list) {
$this->_column_list = $column_list;
$this->_record_list = $record_list;
}
public function show() {
print '<table>';
print '<tr>';
... | true |
b9174c009649eef629915a68d7f14e40a66b726e | PHP | jubic/RP-Misc | /PHP/P07ShoutMe/allEmployees.php | UTF-8 | 1,241 | 3.171875 | 3 | [] | no_license | <?php
$host = 'localhost';
$username = 'root';
$password = '';
$db = 'c203';
$link = mysqli_connect($host,$username,$password,$db);
// create query
$query = "SELECT * FROM employees";
// execute query
$result = mysqli_query($link, $query);
while($row=mysqli_fetch_assoc($result))
{
$arrEmployees[] = $row;
}
//de... | true |
68dbcaa9dcc54f5fdbc020d972f99b380ae50dab | PHP | eLoyyyyy/pls-server | /Library/Database.php | UTF-8 | 661 | 3.125 | 3 | [] | no_license | <?php
/**
* Database Singleton
*/
class Database extends PDO {
protected static $instance;
static function getInstance(){
$dsn = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8';
if(!self::$instance){
self::$instance = new Database($dsn, ... | true |
cde73dead1d8da5134f0cba6f01b4d117ea39b6e | PHP | dchantzis/dchantzis-v1 | /dchincfunctions/functionsrepositoryinc.php | UTF-8 | 4,329 | 2.578125 | 3 | [] | no_license | <?php
function contactDCH($validationType)
{
require_once('validate.class.php');
$validator = new Validate();
$explodeArr = array();
$pageID = $_POST['pageid'];
$errorsVarsArr = array();
// read validation type (PHP or AJAX?)
//if (isset($_GET['validationType'])){ $validationType = $_GET['validati... | true |
eeb70c35a0e201b7aba72d6f6789fe9c29a42ba8 | PHP | lucianobezerra/sga | /model/operador.php | UTF-8 | 1,856 | 2.90625 | 3 | [] | no_license | <?php
require('../class/Operador.class.php');
$acao = isset($_REQUEST['acao']) ? $_REQUEST['acao'] : null;
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
switch ($acao) {
case "inserir": inserir(); break;
case "alterar": alterar($id); break;
case "excluir": excluir($id); break;
c... | true |
17b07391d3ecbf2ad45c21b0bc66795a31db6fc8 | PHP | tirys/prosystem | /config/funcoes.php | UTF-8 | 9,854 | 3.25 | 3 | [] | no_license | <?php
/*
* Arquivo para funções gerais utilizadas no sistema
* Funções úteis
*/
//Converte Data timestamp mysql para padrão BR
function DataBrasil($Data)
{
$D = explode("-",$Data);
$Data = $D[2].'/'.$D[1].'/'.$D[0];
return $Data;
}
//Converte Data timestamp mysql para padrão BR sem as horas
function D... | true |
b75389f894eac449f1a098c46c395fe071d6587b | PHP | Panda58dev/Git-test | /test.php | UTF-8 | 1,921 | 3.875 | 4 | [] | no_license | <?php
//тест массивов
$array[0] = NULL;
$array[1] = 'b';
echo $array[0]."</br>";
$Array = array('a' =>'1+1=2');
echo $Array['a']."</br>";
$array[0] = NULL;
echo "</br>";
// тест условных операторов
if ($array[0] == 'a') {
echo "{ $array[0] } это ячейка массива";
} elseif ($array[0] == NULL) {... | true |
ab03a0e3a7a64e74b18936f5fe89a4cc8ad4cdd1 | PHP | exponentxqq/itp | /frame/library/core/Compile.php | UTF-8 | 2,254 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: xqq
* Date: 2017/7/29
* Time: 上午10:04
*/
class Compile
{
private $temp; //待编译的文件
private $content; //需要替换的文本
private $comfile; //编译后的文件
private $left = '{'; //左定界符
private $right = '}'; //右定界符
private $v... | true |
500bad3c06d950a88eb62c74f158f5e74dafe038 | PHP | hitomtao/yii2-podium-api | /src/interfaces/PostInterface.php | UTF-8 | 2,959 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace bizley\podium\api\interfaces;
use bizley\podium\api\base\PodiumResponse;
use yii\data\DataFilter;
use yii\data\DataProviderInterface;
use yii\data\Pagination;
use yii\data\Sort;
/**
* Interface PostInterface
* @package bizley\podium\api\interfaces
*/
interface PostInterfa... | true |
040408664e750a35f9d5d901006a246aa2bb1820 | PHP | Farhadcse14/PHP-Projects | /University-Student_Services/include/session.php | UTF-8 | 1,697 | 3.21875 | 3 | [] | no_license | <?php
class Session{
private $logged_in = false;
public $student_id;
public $message;
function __construct(){
session_start();
$this->check_message();
$this->check_login();
if($this->logged_in){
}else{
... | true |
2ffccea0931e8b084a62447487ea6399e16c5193 | PHP | PascalAOMS/wordpress-dynamic-hashes | /functions.php | UTF-8 | 1,127 | 2.625 | 3 | [] | no_license | <?php
function enqueue_files() {
$dirCSS = new DirectoryIterator(get_stylesheet_directory() . '/css');
$dirJS = new DirectoryIterator(get_stylesheet_directory() . '/js');
// CSS
foreach ($dirCSS as $file) {
if (pathinfo($file, PATHINFO_EXTENSION) === 'css') {
$fullName = basename($file);
$na... | true |
2086a0f4b3017562eb3613ff0cc6bf1d04f10764 | PHP | Kaperskyguru/transactions | /database/factories/TransactionFactory.php | UTF-8 | 435 | 2.59375 | 3 | [] | no_license | <?php
use Faker\Generator as Faker;
use App\Transaction;
$factory->define(Transaction::class, function (Faker $faker) {
$type = $faker->randomElement($array = array('credit', 'debit'));
$status = $faker->randomElement($array = array(1,2,3));
return [
'user_id' => $faker->numberBetween(1,1),
... | true |
c8ba6eb398fe2d337001af5f80327df26935c1e5 | PHP | OmgProsto/prototype | /3_prototype.php | UTF-8 | 1,272 | 2.953125 | 3 | [] | no_license | <?php
interface GUIPrototype
{
public function createButton(): Button;
public function createCheckbox(): Checkbox;
}
class WinPrototype implements GUIPrototype
{
private $winButton;
private $winCheckbox;
public function __constructor()
{
$winButton = new WinButton( /* 128937948 парам... | true |
4fe8d9754906622e3de4fc13bba9becb1d806aa3 | PHP | Maxoslav/utils | /src/Utils/ImplicitObjectMap.php | UTF-8 | 978 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Infinityloop\Utils;
abstract class ImplicitObjectMap extends ObjectMap
{
public function __construct(array $data = [])
{
parent::__construct();
foreach ($data as $key => $object) {
$this->offsetSet(\is_string($key)
? $key... | true |
1a18fd56fe567910b005f220231b9ac6105661a9 | PHP | vinnyvinn/erp | /application/models/Support_comments_model.php | UTF-8 | 654 | 2.5625 | 3 | [] | no_license | <?php
class Support_comments_model extends Crud_model {
private $table = null;
function __construct() {
$this->table = 'support_comments';
parent::__construct($this->table);
}
public function getComments($ticket_id){
$sql = "SELECT support_comments.*, CONCAT(users.first_name, ... | true |
fdd85534e647fafe04fd48a6d6817e1eb93fe470 | PHP | pgenc/OPP_2013---Projekt | /opp/db/DataBase.php | UTF-8 | 928 | 2.953125 | 3 | [] | no_license | <?php
namespace opp\db;
use \PDO;
class DataBase {
/**
*
* @var \PDO
*/
private static $db;
/**
*
* @return \PDO
*/
public static function getInstance() {
if (null === self::$db) {
try {
self::$db = new PDO("mysql:dbname=op... | true |
0a93a0705ce44e393186e01169eb0468ce8b5775 | PHP | Optimovl/optimosite | /classes/system/subsystems/selector/group.php | UTF-8 | 854 | 2.9375 | 3 | [] | no_license | <?php
abstract class selectorGroupField {
public function __get($prop) {
return $this->$prop;
}
/**
* Проверяет наличие свойства
* @param string $prop имя свойства
* @return bool
*/
public function __isset($prop) {
return property_exists(get_class($this), $prop);
}
}
class selectorGro... | true |
5186110b7a4a8078a12b3f0b776c1d737b4d4869 | PHP | AthensStateComputerScience/InServiceCenter-dev | /public_html/php/UserForm.php | UTF-8 | 2,368 | 3.046875 | 3 | [] | no_license | <?php session_start(); ?>
<!DOCTYPE html>
<html class="no-js" lang="en" dir="ltr">
<head>
<title>Users</title>
<?php
require "../../resources/config.php";
# create connection to database
$mysqli = new mysqli($config['db']['amsti_01']['host']
, $config['db']['amsti_01']['username']
, $config['db']['... | true |
bd7243128697998e3f5b12684a7098935c8235f1 | PHP | miklcct/thin_php_app | /src/Exception/ExceptionErrorHandler.php | UTF-8 | 717 | 3.03125 | 3 | [
"BSD-4-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace Miklcct\ThinPhpApp\Exception;
use ErrorException;
/**
* Error handler to convert errors to exceptions
*
* Object of this class can be passed directly to <code>set_error_handler()</code>
*/
class ExceptionErrorHandler {
/**
* Throw an exception when an error occur... | true |
84526f8cb44615b8d71a71f17f20c60ebbe50749 | PHP | Gunslh/webshop | /src/common/entity/CategoryEntity.class.php | UTF-8 | 1,268 | 2.625 | 3 | [] | no_license | <?php include_once dirname(__FILE__).'/ItemObjectEntity.class.php';?>
<?php
class CategoryEntity extends ItemObjectEntity
{
function __construct()
{
$this->tableName = "shop_category";
}
function FindById($id)
{
self::Select($id);
return $this->info;
}
function SelectAllCategory()
{
if($this->SelectAll... | true |
e791bd26f53e43d488f168e2a576380b574c575b | PHP | jordyparker/Offre-Emploi | /Core/Database/Entreprise.php | UTF-8 | 3,713 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jordy
* Date: 14/05/2019
* Time: 12:07
*/
namespace Projet\Database;
use Projet\Model\Table;
use function Projet\var_die;
class Entreprise extends Table
{
protected static $table = 'entreprise';
public static function save($nom,$lieu,$numero,$... | true |
bd33519572950182ef8daac648e53636816845db | PHP | vladanzivanovic/test-ecommerce | /src/Entities/User.php | UTF-8 | 1,826 | 2.890625 | 3 | [] | no_license | <?php
namespace CoreBundle\Entities;
class User
{
const TABLE = 'users';
/**
* @var int $id
*/
private $id;
/**
* @var string $firstname
*/
private $firstname;
/**
* @var string $lastname
*/
private $lastname;
/**
* @var string $password
*/
... | true |
fdb883f0ce848ce3dcaecfe9ad248893a25b65ea | PHP | luiscferraz/easy-ticket-web | /src/Project/app/Controller/EmployeesController.php | UTF-8 | 3,895 | 2.71875 | 3 | [] | no_license | <?php
class EmployeesController extends AppController{
public $uses = array ('Employee', 'Role');
public function index(){
//Pega todos os elementos funcionários e retorna na view
$this->set('title_for_layout', 'Funcionários');
$this -> layout = 'index';
$this->set('roles',... | true |
feb0c04cbbdbaa214ca04dcaff93478fdd855651 | PHP | Bakual/Wissensmatrix | /com_wissensmatrix/site/helpers/wissensmatrix.php | UTF-8 | 1,407 | 2.578125 | 3 | [] | no_license | <?php
defined('_JEXEC') or die('Restricted access');
/**
* Wissensmatrix Component Wissensmatrix Helper
*/
class WissensmatrixHelperWissensmatrix
{
public static function getDiffClass($ist, $soll)
{
$diff = $soll - $ist;
if ($diff > 3)
{
return 'important';
}
if ($diff < 0)
{
return 'success';
... | true |
250252e8a08661bdb301513cd86c07b3566bcb1c | PHP | Victor19Rodrigues/issues_PHP | /POO/post.php | UTF-8 | 916 | 3.203125 | 3 | [] | no_license | <?php
class Post{
private $titulo;
private $corpo;
private $data;
private $comentario;
private $qtdComentario;
public function __construct(){
}
public function getTitulo(){
return $this->titulo;
}
public function setTitulo($pTitulo){
if(is_string($pTitulo)){
$this->titulo = $pTitulo... | true |