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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
17bf41b48184d9c2023490bd003014c2d969fb20 | PHP | abrown/pocket-knife | /www/demo/Book.php | UTF-8 | 2,332 | 2.84375 | 3 | [] | no_license | <?php
/**
* @copyright Copyright 2011 Andrew Brown. All rights reserved.
* @license GNU/GPL, see 'help/LICENSE.html'.
*/
class Book extends ResourceItem {
public $title;
public $author;
public $published;
public $number_of_copies;
protected $storage = array('type' => 'json', 'location' => '../d... | true |
365a3f1ce957d80f0020289d04bb8808e6ee9363 | PHP | taobig/yii-helper | /src/exceptions/APIException.php | UTF-8 | 1,587 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace taobig\yii\exceptions;
class APIException extends BaseException
{
private $_url;
private $_response;
private $_request;
/**
* APIException constructor.
* @param string $message
* @param string $url
* @param array|string $response
* @param array|string $reques... | true |
2ffe34b32967dfa349daa0ec5ca63db19fccd185 | PHP | linuxserver/Heimdall | /vendor/monolog/monolog/src/Monolog/Registry.php | UTF-8 | 3,967 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Monolog;
use InvalidArgumentException;
/**
* M... | true |
d206cb75e2da532750789f72d89a3f5a82ecb272 | PHP | chinel/laravel-ecommerce | /app/Services/SideBarBannerService.php | UTF-8 | 668 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: SONY
* Date: 1/12/2019
* Time: 8:24 AM
*/
namespace App\Services;
use App\Repositories\SideBarBannerRepository;
class SideBarBannerService
{
protected $sideBarRepository;
public function __construct(SideBarBannerRepository $sideBarBannerRepository)
{
... | true |
420c333fa1b6f010e3bf57559a846daf64880615 | PHP | LuYaSC/GuarderiaUcab | /Sistema/app/models/Sedes.php | UTF-8 | 5,382 | 2.640625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
/*
* This file is part of the Ocrend Framewok 2 package.
*
* (c) Ocrend Software <info@ocrend.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace app\models;
use app\models as Model;
use Ocrend\Kernel\Models\Mod... | true |
9a3701366eb8d2997da547e8eaca42a0e71e1aa7 | PHP | Natasha913/WT_Final_Sum21 | /lab2/controllers/DepartmentController.php | UTF-8 | 913 | 2.53125 | 3 | [] | no_license | <?php
require_once 'models/db_config.php';
$err_db="";
if(isset($_POST["add_department"])){
$rs = insertCategory($_POST["name"]);
if($rs === true){
header("Location: alldepartment.php");
}
$err_db = $rs;
}
else if (isset($_POST["edit_department"])){
$rs = updateDepartment($_POST["name"],$_P... | true |
0769e79452675afc7be54116706e4f49353bec87 | PHP | BlueScriptHQ/andalusier | /tryouts/sequelGenerator/index.php | UTF-8 | 2,569 | 2.859375 | 3 | [] | no_license | <?php
class sequelHandler {
private $return;
private $method;
private $tags;
private $from;
private $joins;
private $optional;
private $condition;
public function generateSequel($method, $tags, $from, $joins = false, $condition = false, $optional = false){
$this->method = $method;
$this->tag... | true |
7f431ccd68abb24a3f07d17658ae1774a269a3e8 | PHP | ThemeAvenue/OpenPeeks | /includes/openpeek-kimonolabs-class.php | UTF-8 | 1,232 | 2.921875 | 3 | [] | no_license | <?php
class OpenPeek_Kimonolabs extends OpenPeek {
protected $app_id = null;
protected $api_key = null;
public function __construct( $args = array() ) {
$this->app_id = isset( $args['app_id'] ) ? $args['app_id'] : false;
$this->api_key = isset( $args['api_key'] ) ? $args['api_key'] : false;
$this->route ... | true |
eaf6195d18ab3323d9c0c18fcc80c0dc5bc2d20d | PHP | araujobarret/patrimonio-webservice | /dao/UsuarioChefeSetorDAO.php | UTF-8 | 3,141 | 2.96875 | 3 | [] | no_license | <?php
/**
* Descrição: DAO de manipulação da tabela Usuário Chefe de Setor
* Date: 07/03/17
*/
namespace patrimonio_webservice\model\dao;
use patrimonio_webservice\controller\Banco;
use patrimonio_webservice\model\Usuario;
use patrimonio_webservice\model\UsuarioChefeSetor;
class UsuarioChefeSetorDAO extends Usuar... | true |
a0c9f46b1a02d086905a4dc4f156d7ed69e99ea0 | PHP | kamurotorres/app-shop1.0 | /app/Http/Controllers/CartDetailController.php | UTF-8 | 1,175 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\CartDetail;
use Illuminate\Http\Request;
class CartDetailController extends Controller
{
//creamos funcion para recibir los valores del formi
//cuando se ingresan la cantidades
public function store(Request $request){
$cartDetail = new CartDetail(); /... | true |
0da239397ecf789f5f0b82749bc88bb036ca0be1 | PHP | kedyyan/BaseException | /tests/source/FatalExceptionTest.php | UTF-8 | 3,096 | 2.96875 | 3 | [] | no_license | <?php
namespace Exceptions;
/**
* Test class for FatalException.
* Generated by PHPUnit on 2012-09-08 at 11:04:54.
*/
class FatalExceptionTest extends \PHPUnit_Framework_TestCase
{
/**
* @covers Exceptions\FatalException::__construct
* @covers Exceptions\BaseException::is_fatal
* @cov... | true |
15ae91ca7c7a9050cc47bf5e7afc3196940963b6 | PHP | dcotta/code-books | /walace-php5-conceitos/Capitulo 15/imagem_2.php5 | UTF-8 | 1,225 | 2.625 | 3 | [] | no_license | <?php
// Gera uma imagem com o gradiente
function gradiente($_w=50,$_h=280,$_arq="gradiente.png") {
$_img = imagecreatetruecolor($_w,$_h);
$_prt = imagecolorallocate($_img, 0x00, 0x00, 0x00);
$_brc = imagecolorallocate($_img, 0xff, 0xff, 0xff);
imagefilledrectangle($_img,0,0,$_w-1,$_h-1,$_brc);
imagerec... | true |
47c1c5668f8a4537d9e5e0031359ae3730e1f392 | PHP | zinho82/nova | /src/BackendBundle/Entity/Usuario_rsp.php | UTF-8 | 3,433 | 2.78125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace BackendBundle\Entity;
/**
* Usuario
*/
class Usuario
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $username;
/**
* @var string
*/
private $password;
/**
* @var string
*/
private $nombre;
/**
* @... | true |
130b78edbce1d50cbc69c58d61bbb97df1b688a4 | PHP | dulith-muthu/ikro | /src/AppBundle/Repository/ItemRepository.php | UTF-8 | 1,565 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
/**
* ItemRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class ItemRepository extends EntityRepository
{
public function getSuggestions($itemCode){
$qb = $this->c... | true |
e0b697f2d5f9143c054348ee3adccaaf41123a52 | PHP | elenagarbo/libreria-php | /comprobarusuarioseguro.php | UTF-8 | 984 | 2.515625 | 3 | [] | no_license | <html>
<head>
<title>Problema</title>
</head>
<body>
<?php
header("Content-Type: text/html;charset=utf-8");
include('includes/conexion.php');
$acentos = $enlace->query("SET NAMES 'utf8'");
$user = mysqli_real_escape_string($enlace, $_POST['usuario']);
/*
'or '1'='1
*/
$password = mys... | true |
0044b4eb3a5c874902645c990b157317ab93b021 | PHP | BeaconPlatform/api | /app/Http/Controllers/Controller.php | UTF-8 | 3,482 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Beacon\Api\Http\Controllers;
use Beacon\Api\Core\Entities\Person;
use Beacon\Api\Core\Exceptions\PersonNotFoundException;
use Beacon\Api\Core\Http\JsonResponse;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as B... | true |
e123bf42ffd4d10716f0419ca61e1d8c2a85872a | PHP | thomadeus/graphical-image-password-authenticator | /graphical_pass/signup-page.php | UTF-8 | 1,597 | 2.890625 | 3 | [] | no_license | <?php
$error = "";
if(isset($_GET['err'])){
$error = $_GET['err'];
}
?>
<!DOCTYPE html>
<html lang = "en">
<head>
<title>Password Prototype</title>
<link rel="stylesheet" href="prototype.css">
<script>
function showHint(str) {
if (str.length == 0) {
document.getElementById("tx... | true |
e7562e65b948066ee4f7573fcae2ac3db660fcd2 | PHP | qltf8/finalProject | /application/models/Administration_model.php | UTF-8 | 2,201 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Administration_model extends CI_Model{
//Establlish database connection
public function __construct(){
parent::__construct();
$this->load->database();
$this->db->query("use applicationportal");
}
//Method to check if the wind... | true |
a8c62ac1477a9a7d4911770add1a8b18fa848777 | PHP | dragosthealex/alexdradu-my-website | /app/Support/helpers.php | UTF-8 | 482 | 3.0625 | 3 | [] | no_license | <?php
use App\Setting;
// Get the value of an option with the given name
function get_option($name) {
$setting = Setting::where('name', $name)->first();
if(!$setting) {
return "";
}
return $setting->value;
}
// Set an option with a given name to the given value
function set_option($name, $value) {
$set... | true |
310aab76f4346b5f54fc89443f57fcbd31e20487 | PHP | Divino67/CursoUdemy | /DIO/contaBancaria.php | UTF-8 | 1,302 | 3.609375 | 4 | [] | no_license | <?php
class contaBancaria{
private $banco;
private $nomeTitular;
private $numeroAgencia;
private $numeroConta;
private $saldo = 1000.00;
public function __construct($banco, $nomeTitular, $numeroAgencia, $numeroConta, $saldo){
$this->banco = $banco;
$this->nomeTitula... | true |
33ecbbb2c4070f9676f7c14afe6e061dfeff9880 | PHP | devlabs91/travelgate-push-api | /src/StructType/GuaranteeType.php | UTF-8 | 4,262 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Devlabs91\TravelgatePushApi\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for GuaranteeType StructType
* @subpackage Structs
*/
class GuaranteeType extends AbstractStructBase
{
/**
* The PaymentCode
* Meta informations extracted from the WSDL
... | true |
cd90729a2c740bdb8c01f243144e687e8a9626e0 | PHP | anasrangrez11/payment-billing-product-project1 | /anasproject(PBPP)/Crypto.php | UTF-8 | 2,347 | 2.859375 | 3 | [] | no_license | <?php
/*
* @param1 : Plain String
* @param2 : Working key provided by CCAvenue
* @return : Decrypted String
*/
function encrypt($plainText,$key)
{
$key = hextobin(md5($key));
$initVector = pack("C*", 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f);
$openMode = openssl... | true |
33073b933bd2ca947aebc75494d6f87c75889bec | PHP | ggslavchev/homeworks | /php/homework4/P4_SidebarBuilder.php | UTF-8 | 2,645 | 2.515625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Sidebar Builder</title>
<style>
aside {
box-sizing: border-box;
margin: 5px;
border: solid 1px black;
background: linear-gradient(#c5d6eb 50%, #abc4e5 50%, #c5d6eb, #7fa0cb);
bor... | true |
a421fd5f5e5fa61f739962b3ee0579a7891a7265 | PHP | sr943/upload_CSV | /index.php | UTF-8 | 4,858 | 3.015625 | 3 | [] | no_license | <?php
//turn on debugging messages
ini_set('display_errors', 'On');
error_reporting(E_ALL);
//instantiate the program object
//Class to load classes it finds the file when the progrm starts to fail for calling a missing class
class Manage {
... | true |
9772dd1e2ffbddc20ac832d26ada0a1b39a00f6a | PHP | cyberclick-os/crm-client | /src/CyberclickCrm/Http/Util.php | UTF-8 | 614 | 2.703125 | 3 | [] | no_license | <?php
namespace CyberclickCrm\Http;
abstract class Util {
/**
* Avoid parse_str() for HHVM compatibility
* This implementation is not a complete sobstitute, but covers all the
* requirements of the Facebook Graph Cursor.
*
* @see hhvm.hack.disallow_dynamic_var_env_funcs
* @param $query_string
... | true |
1581fdf48726d2ab583539ee3a0ed1bebbc7af14 | PHP | rinoandrejohnsen/CompositeApplication | /Library/PhpStack/Base/Types/Bool.php | UTF-8 | 497 | 2.578125 | 3 | [] | no_license | <?php
/**
* This file is a part of the PhpStack and contains
* the Bool class that extends SplBool.
*
* @package PhpStack
* @subpackage Base
*
* @version 1.0.0
*
* @author Rino Andre Johnsen <rinoandrejohnsen@gmail.com>
* @copyright Copyright (c) 2011-2012, Author(s) above
*/
namespace PhpStack\Base\Ty... | true |
cdc769eb0a42bbc9c2bfc54ce5e02825336091de | PHP | theyCallMeDudu/Curso-PHP | /08-arrays.php | UTF-8 | 2,528 | 3.59375 | 4 | [
"MIT"
] | permissive | <?php
// Arrays
// Forma de criar nº 1
$carros = array("Fusca", "BMW", "Raptor");
print_r($carros);
echo "<br>";
$length = sizeof($carros);
for($i = 0; $i < $length; $i++){
echo $carros[$i].'<br>';
}
$carros[] = "Toro"; // Adiciona item no array na última posição auto... | true |
7fd192d961bf5e03163e5db1daac8090070577e3 | PHP | wrestrtdr/Login-Panel | /userverify.php | UTF-8 | 1,525 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: shawo
* Date: 10/31/2017
* Time: 12:42 PM
*/
session_start();
//check the request
if (isset($_REQUEST['txtusername'])&& isset($_REQUEST['txtpassword']))
{
// declare variable for username & password from request
$uname= $_REQUEST['txtusername'];
$upass= $_REQUES... | true |
87acc2a15cee80ccc26caad1336f9681b35ea6b8 | PHP | TheEmailHunter/TheHunter | /system/classes/class.auth.php | UTF-8 | 5,770 | 2.609375 | 3 | [] | no_license | <?php
/* (c) 2013 by NocRoom.com, read license, do not alter, change or share anything below this line! */
class auth
{
private $db = false;
private $salt = 'abc1234';
private $cookieName = 'abc12345667890';
private $domain = 'http://www.domain.com';
function __construct($db... | true |
3d066c7d4b3f2111b5e3eaaec9c9019f3c17654e | PHP | adsr/a | /macephp/lib/Ncurses/Stdscr.php | UTF-8 | 432 | 2.65625 | 3 | [] | no_license | <?php
class Ncurses_Stdscr extends Ncurses {
private static $instance;
public static function getInstance() {
if (!self::$instance) {
if (!defined('STDSCR')) {
ncurses_init();
}
self::$instance = new self(STDSCR);
}
return self::$ins... | true |
97f7d0265a174391e3e95407bf1bfc0ed3893686 | PHP | Miguel-Evans-Yikes/Miguel-Evans-Yikes.github.io | /variaveis_v3.php | UTF-8 | 446 | 3.4375 | 3 | [] | no_license | <html>
<head>
<meta charset="utf-8">
<title>Minhas variaveis</title>
</head>
<body>
<?php
$name = "Tom";
$age = "68";
echo("There was once a man named $name <br>");
echo("He was $age years old <br>");
$name = "Steve";
echo("He ... | true |
fd1f60b4a1efc5a43dd8625294655e6d2de56734 | PHP | caijunqi99/chenganxjh | /vendor/cloud/vod/model/UpdateAssetMetaReq.php | UTF-8 | 2,885 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
include_once 'BaseRequest.php';
class UpdateAssetMetaReq extends BaseRequest implements JsonSerializable {
/**
* 租户ID
*/
private $projectId;
/**
* 媒体ID
*/
private $assetId;
/**
* 媒体标题,长度不超过128个字节,utf-8编码
*/
private $title;
/**
* 视频描述, 长度不超过1024个字... | true |
54ab3cf180b7a3b6c0837f46fc3c488e2042bb70 | PHP | ferri1/site_descodeuses | /admin/connexion_reponse.php | UTF-8 | 2,301 | 3.234375 | 3 | [] | no_license | <?php
include "../config.php";
// on verifie que j'ai bien mes envoyé des données.
if(empty($_POST["identifiant_admin"]) || empty($_POST["motdepasse_admin"])) {
echo $passwordHacher=password_hash($_POST[motdepasse_admin], PASSWORD_DEFAULT);
echo "Le mot de passe hacher est : ".$_POST[motdepasse_admin];
ajout... | true |
ac5055ae904377020322ecffad76829b279e90eb | PHP | USJ/USJAssetBundle | /EventListener/ParentChangeListener.php | UTF-8 | 1,112 | 2.515625 | 3 | [] | no_license | <?php
namespace MDB\AssetBundle\EventListener;
use Doctrine\ODM\MongoDB\Event\PreUpdateEventArgs;
use MDB\AssetBundle\Document\Asset;
use MDB\AssetBundle\Document\AssetManager;
/**
* Subscriber which response for logging the asset logs
*/
class ParentChangeListener
{
protected $parentLogClass;
public functi... | true |
6bfa9bd667fbf8f1903788c7862bdaf5eb852945 | PHP | webeweb/smsmode-library | /tests/Request/SendingTextToSpeechSmsRequestTest.php | UTF-8 | 3,533 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the smsmode-library package.
*
* (c) 2019 WEBEWEB
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WBW\Library\SmsMode\Tests\Request;
use InvalidArgumentException;
use Throwable;
use WBW\... | true |
c3e51f2ebeaf88feede5425292e51114670a632b | PHP | kelvinroqueto/Projeto-1-Laravel | /app/Services/UserService.php | UTF-8 | 2,964 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Repositories\UserRepository;
use App\Validators\UserValidator;
use Prettus\Validator\Contracts\ValidatorInterface;
class UserService{
private $repository;
private $validator;
public function __construct(UserRepository $repository, UserValidator $validator ) {
... | true |
36ea1ef2cb23df152425b6a10c5ff93262527162 | PHP | behappyyoung/javascriptsamplecodes | /test/index.php | UTF-8 | 489 | 2.953125 | 3 | [] | no_license | <?php
if ($handle = opendir('.')) {
while (false !== ($entry = readdir($handle))) {
if (($entry != ".")) {
if(is_dir($entry)){
$text1[] = "<a href='./$entry/' > $entry / </a> " ;
}else{
$text2[] = "<a href='./$entry' > $entry </a> " ;
}
... | true |
49d9d654e3dfdb1c9213ca779324326426fd9833 | PHP | philip-putnam/number-to-words | /src/NumbersToWords.php | UTF-8 | 3,464 | 3.859375 | 4 | [] | no_license | <?php
class NumbersToWords
{
function translateNumbersToWords($user_number)
{
$result_output = "";
$working_number = $user_number;
$underTwentyDigits = array(
1 => "one", 2 => "two",
3 => "three", 4 => "four",
5... | true |
3e22ef3404ee93fdbd7eb0774deabc8a2c1c386f | PHP | alagbelandry/dja | /src/LeDjassa/AdsBundle/Form/Handler/InterestedUserSendEmailHandler.php | UTF-8 | 1,749 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace LeDjassa\AdsBundle\Form\Handler;
use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\Request;
use LeDjassa\AdsBundle\Model\Ad;
use LeDjassa\AdsBundle\Model\InterestedUser;
use LeDjassa\AdsBundle\Services\Mailer;
/**
* The InterestedUserSendEmailHandler.
* Use for manage send email b... | true |
ddf7165e1f4c327b69b225a67421d4827be2add3 | PHP | jamessw-byui/cs313-php | /web/week05/scripture_details.php | UTF-8 | 1,675 | 3.1875 | 3 | [] | no_license | <?php
$dbUrl = getenv('DATABASE_URL');
if (empty($dbUrl)) {
// This gets us the heroku credentials without revealing credentials in our code
$dbUrl = exec("heroku config:get DATABASE_URL");
}
$dbopts = parse_url($dbUrl);
$dbHost = $dbopts["host"];
$dbPort = $dbopts["port"];
$dbUser = $dbopts["user"];
$dbPassword... | true |
1976b3135c4c5303a2374e423411557433ef488a | PHP | Cannonb4ll/goodwork | /app/Http/Controllers/HomeController.php | UTF-8 | 1,202 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Services\TeamService;
use App\Services\OfficeService;
use App\Services\ProjectService;
class HomeController extends Controller
{
/**
* @var mixed
*/
protected $projectService;
/**
* @var mixed
*/
protected $teamService;
/**
* ... | true |
d796e94856efc99a4d0e8575732563cd1044ddcf | PHP | dominikb/phel-lang | /src/php/Runtime.php | UTF-8 | 5,697 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Phel;
use Exception;
use Phel\Exceptions\HtmlExceptionPrinter;
use Phel\Exceptions\TextExceptionPrinter;
use Phel\Lang\Keyword;
use Phel\Lang\Symbol;
use Phel\Lang\Table;
use Throwable;
class Runtime {
private GlobalEnvironment $globalEnv;
/** @var string[] */
... | true |
9275ef3ceec63405bdc393023d2f61843ed723d3 | PHP | AdamKyle/flare | /app/Flare/RandomNumber/RandomNumberGenerator.php | UTF-8 | 652 | 3.296875 | 3 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | <?php
namespace App\Flare\RandomNumber;
class RandomNumberGenerator {
/**
* Generate a random number using a randomly generated seed.
*
* @param integer $min
* @param integer $max
* @return integer
*/
public function generateRandomNumber(int $min = 1, int $max = 1000): int {
... | true |
c84c0d8823e9e438238f7f54e7d46c3079bbd76f | PHP | mlocati/ocsp | /src/Exception/ResponseException/MultipleResponsesException.php | UTF-8 | 457 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ocsp\Exception\ResponseException;
use Ocsp\Exception\ResponseException;
/**
* Exception thrown when we expect just one response from the OCSP Responder, but we received more that one.
*/
class MultipleResponsesException extends ResponseException
{
/**
* Create a new instance.
*
*... | true |
04be5450bf30b51705a7e42489ecb6d40cf850ed | PHP | stevenbuehner/BibleVerseBundle | /Tests/Service/BibleVerseMergingTest.php | UTF-8 | 4,106 | 2.78125 | 3 | [] | no_license | <?php
namespace StevenBuehner\BibleVerseBundleTests\Service;
use PHPUnit\Framework\TestCase;
use StevenBuehner\BibleVerseBundle\Entity\BibleVerse;
use StevenBuehner\BibleVerseBundle\Service\BibleVerseService;
class BibleVerseMergingTest extends TestCase {
/**
* @var BibleVerseService
*/
protected $bibleVerseS... | true |
a3b00ae4a40d7bb8f623d37509cdfbb690b388eb | PHP | playgamelxh/lxh | /lib/Dama.php | UTF-8 | 2,760 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: lxh
* Date: 2017/11/29
* Time: 下午3:29
*/
class Dama
{
public $username;
public $password;
public $softid;
public $softkey;
public function __construct()
{
$this->damaUrl = 'http://api.ruokuai.com/create.json';
$this->username... | true |
0dbd67cdc4e7d81a8f393d057318f4d78ad2971a | PHP | LinusTebbe/SQL-Injection-Demo | /src/Service/NavigationRenderingService.php | UTF-8 | 1,382 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace SqlInjectionDemo\Service;
use UnexpectedValueException;
class NavigationRenderingService
{
public const VARIATION_PREPARED = 'prepared';
public const VARIATION_UNPREPARED = 'unprepared';
public const VARIATION_SIDE_BY_SIDE = 'side-by-side';
public const V... | true |
ae6157d1af8521f31abb20f64dc597f22db6f7bd | PHP | ondrej-petr/jednouzacas.cz | /application/models/User/Mapper.php | UTF-8 | 2,013 | 2.53125 | 3 | [] | no_license | <?php
class App_Model_User_Mapper extends OPLib_Model_Mapper_Abstract
{
protected $_tableClass = 'App_Model_User_Table';
protected $_modelClass = 'App_Model_User';
//==========================================================================
/**
* Vrati vsechny uzivatele prirazene k dane akci
*
* @param in... | true |
b80122af1a7ab2dbcf41c8a26c3fd1f60a3fc394 | PHP | Shoter99/Projects | /Dawid/Gra/gra/test.php | UTF-8 | 4,118 | 2.59375 | 3 | [] | no_license | <?php
// otwarcie sesji
session_start();
// plik ze stanem gry
$plik = 'stangry.txt';
// jezeli plik istnieje to wczytanie danych
if(file_exists($plik))
{
$stan = file_get_contents($plik);
$stan = unserialize($stan);
}
if (isset($_POST['UstawGracza']))
{
$_SESSION['gracz'] = $_POST['UstawGracza'];... | true |
f0cd6d1efe62041c1631a1a859aa41c7fa2af081 | PHP | doublemintl/doublemintl.github.io | /inputMoney.php | UTF-8 | 2,465 | 2.625 | 3 | [] | no_license | <?PHP
header("Content-type:text/html;charset=utf-8");
$pin_str="";
for($i=0; $i<6; $i++){
$temp = rand(0, 15);
if($temp <=9)
$pin_str .= chr(48+$temp);
else
$pin_str .= chr(65+$temp-10);
}
?>
<html>
<head>
<meta charset="utf-8">
<title>实验6_2</title>
</head>
<body>
<form... | true |
84aeef80830d800aa3556745615e24ae6bf09de3 | PHP | LuisHenrique10/canal-de-voluntarios | /public_html/class/noticia.php | UTF-8 | 1,240 | 2.84375 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Classe de modelo de notícia
*
* @author pedrotanaka
*/
class Noticia {
private $titulo;
private $conteudo;
private $id_noticia;
private $data_criada;
private $imagens;
publi... | true |
494d1bff003eecbc33b3fa94489c2de84528ba8e | PHP | kotarot/worldcubeassociation.org | /webroot/results/includes/_database.php | UTF-8 | 10,615 | 2.765625 | 3 | [] | no_license | <?php
/**
PLEASE NOTE: FUNCTIONALITY IN THIS FILE IS SET TO BE DEPRECATED. Eventually PHP will no longer support the MySQL API, so this code
needs to be phased out. Instead, please use or extend the mysqli connection class for any new code needing mysql functionality.
**/
if( ! isset( $dontLoadCachedDatabase ))
... | true |
b51fd1f76eedd42d8bcee68fe66612221aca1ebf | PHP | xnyhps/firefly-iii | /app/Rules/Triggers/UserAction.php | UTF-8 | 1,142 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* UserAction.php
* Copyright (C) 2016 Sander Dorigo
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace FireflyIII\Rules\Triggers;
use FireflyIII\Models\RuleTrigger;
use FireflyIII\Models\TransactionJournal;
use Log;
... | true |
85556fd0d900a2a42d3a0a030f3a21735b52184d | PHP | hadesain/apprain-source | /apprain/base/appmodel.php | UTF-8 | 25,527 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* appRain CMF
*
* LICENSE
*
* This source file is subject to the MIT license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.opensource.org/licenses/mit-license.php
* If you did not receive a copy of the license ... | true |
2969c92d24c4da0d365b1163eb9dff4d09241463 | PHP | Magssch/PixelBox | /includes/duce_functions.php | UTF-8 | 3,004 | 3.25 | 3 | [] | no_license | <?php
/***************************\
| - DucePHP library. |
| - Developed by sumodonut. |
\***************************/
// Custom error handler.
if($user['level'] > 3) {
function fetch_error($errno, $errstr, $errfile, $errline)
{
echo"<b>PHP error:</b> \"$errstr\" (Error-level: <b>$errno</b>)<br/>";
echo"Error ... | true |
0d3cb1886bfe269b8d16c46c4f7ccdd98b90d0dc | PHP | integrationvusal/Ssm | /core/class/Logger.class.php | UTF-8 | 1,539 | 3.234375 | 3 | [] | no_license | <?php
class Logger{
private static function getDate($format = null){
if($format === null){
return date("Y-m-d h:i:s") . " - ";
} else {
return date($format) . " - ";
}
}
public static function writeLog($message, $fileName = false){
if(is_arra... | true |
7fd598a075caa90f1595dbdc62a23997fe93a36b | PHP | Wasif-Allvi/Task | /database/seeds/UsersTableSeeder.php | UTF-8 | 265 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
class UsersTableSeeder extends Seeder
{
public function run()
{
$faker = Faker\Factory::create();
foreach (range(1, 10) as $index) {
User::create([
'username' => $faker->name,
'password' => Hash::make('password')
]);
}
}
}
?> | true |
057e58be0a80b821cfbbec434a2063e1255132ac | PHP | innotechgl/innotechglobal | /core/custom_rels/custom_rels_class.php | UTF-8 | 6,108 | 2.859375 | 3 | [] | no_license | <?php
class custom_rels
{
public $id = 0;
public $rel_id = 0;
public $rel_page = '';
public $rel_custom_id = '';
public $rel_custom_name = '';
public $no = 0;
public $modified = '0000-00-00 00:00:00';
public $table = 'rel_customs';
/**
*
* @param int $rel_id
* @param... | true |
ceed25bd0bef942acb3a5ef6b794b863552577f1 | PHP | Guepardo/EgressoOnline_PHP | /Controller/MainController.php | ISO-8859-1 | 3,996 | 2.5625 | 3 | [] | no_license | <?php
require_once(PATH.'Security'.DS.'Firewall.php');
require_once(PATH.'Controller'.DS.'UseCase'.DS.'HumanController.php');
require_once(PATH.'Controller'.DS.'UseCase'.DS.'ManterUsuario.php');
require_once(PATH.'Controller'.DS.'UseCase'.DS.'AjaxServices.php');
require_once(PATH.'Controller'.DS.'UseCase'.DS.'Aute... | true |
f28a9e65f0b5365c06ffc9e2bd6d8e08539e49f0 | PHP | domainlee/fal | /module/Admin/src/Admin/Dg/DgColor.php | UTF-8 | 1,685 | 2.859375 | 3 | [] | no_license | <?php
namespace Admin\Dg;
class DgColor extends \Base\Dg\Table{
protected function init(){
$headerArr = array(
array(
'label' => 'ID'
),
array(
'label' => 'Màu sắc'
),
array(
'label' => 'Giá trị'
),
array(
'label' => 'Thêm'
),
array(
'label' => 'Sửa'
),
array(... | true |
c96428a4ef755378a14bbfdbd56019fbb76ccd91 | PHP | joselee214/tzs | /core/RuntimeData.php | UTF-8 | 4,622 | 2.84375 | 3 | [] | no_license | <?php
class RuntimeData
{
static private $_registry = []; //全局保存的对象
static private $_data = []; //全局保存的数据//二维结构
static private $_request = []; //全局的get/post/等 数据
static private $_responseClosures = null; //设置response的闭包
static public function _setRequest($type,$data=null)
{
if( $type ==... | true |
28f39e314796da31a17c3bda76b1da867503e759 | PHP | isabella232/etcetera | /src/bitExpert/Etcetera/Reader/Meta.php | UTF-8 | 2,333 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types = 1);
/*
* This file is part of the Etcetera package.
*
* (c) bitExpert AG
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace bitExpert\Etcetera\Reader;
/**
* Class Meta
* @package bitExpert\Et... | true |
10c45a4d92a107b32a82e241cdd7972461e2c6fd | PHP | rabahlaihem/php_primer | /switchstatement.php | UTF-8 | 437 | 2.890625 | 3 | [] | no_license | <?php $title="Switch";include "includes/header.php"?>
<h1>Switch statements</h1>
<?php
$grade = 'A';
switch($grade){
case 'A':
echo '<h2 style="color:green">YOU ARE SUPERSTAR!</h2>';;
break;
case 'B':
echo '<h2 style="color:BLUE">YOU DID WELL!</h2>';
break;
default:
... | true |
fb98314487455821eb584ea1788f50a6a7b9e2c3 | PHP | lingtalfi/bee | /bee/modules/BeeSandBox/Language/Parser/Ast/Normalized/AddNode.php | UTF-8 | 1,172 | 2.6875 | 3 | [] | no_license | <?php
/*
* This file is part of the Bee package.
*
* (c) Ling Talfi <lingtalfi@bee-framework.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace BeeSandBox\Language\Parser\Ast\Normalized;
/**
* AddNode
* @author Li... | true |
444d89e114b6db979e462443aa9990b3e35c7757 | PHP | bmeeder22/SE319 | /Exercise06_php/Production/php/getBooks.php | UTF-8 | 911 | 2.5625 | 3 | [] | no_license | <?php
include 'mysqlConnect.php';
$shelfs = [];
$sql = "SELECT * FROM books WHERE book_id in (SELECT book_id FROM shelves WHERE shelf_id = 1) AND deleted=FALSE;";
$result = $link->query($sql);
$shelves['art'] = mysqli_fetch_all($result, MYSQLI_ASSOC);
$sql = "SELECT * FROM books WHERE book_id in (SELECT book_id FRO... | true |
d7796b2b13162fa2a1b79e84cb7d0dd421e8dbcb | PHP | RicardoPoleo/CakePHP_Woop_Backend | /app/Controller/RestaurantesServiciosController.php | UTF-8 | 2,951 | 2.609375 | 3 | [] | no_license | <?php
App::uses('AppController', 'Controller');
/**
* RestaurantesServicios Controller
*
* @property RestaurantesServicio $RestaurantesServicio
* @property PaginatorComponent $Paginator
*/
class RestaurantesServiciosController extends AppController {
/**
* Components
*
* @var array
*/
public $components = ar... | true |
abb9811ec40fb20edbce32e00e41d5cee4d30dcd | PHP | ronlim415/studious-succotash | /ProjectBoard/admin/user.php | UTF-8 | 1,429 | 2.53125 | 3 | [] | no_license | <?php
$conn = mysqli_connect("localhost","root","") or die (mysqli_error($conn));
$db = mysqli_select_db($conn,"db_fms");
$sql = "SELECT * FROM users";
$q = mysqli_query($conn,$sql) or die (mysqli_error($conn));
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" h... | true |
10a35a4147eeb059cec0942f2d74ccaa80c989b5 | PHP | sbbkoru/PHP-ECOMMERCE-PROJECT | /functions.php | UTF-8 | 522 | 2.546875 | 3 | [] | no_license | <?php
// require mysql bağlantısı
require('./database/dbController.php');
// require product class
require('./database/Product.php');
// require cart class
require('./database/Cart.php');
// database object
$db = new dbController();
// product objec... | true |
1771d1734b6454a0a924cd7b34f09688431794b9 | PHP | dbn00/blog | /insertarNoticia.php | UTF-8 | 1,831 | 2.546875 | 3 | [] | no_license | <?php
/*require_once('accesoseguro.php');*/
require_once('../cnxBD.php');
$msg =" ";
$recupera =" ";
if(isset($_POST['enviar'])){
if (mb_strlen($_POST['txtTitulo'])<=120){
$titulo = $_POST['txtTitulo'];
$noticia = $_POST['txtNoticia'];
$fecha = time();
$sql="INSERT INTO blogNoticias (Titu... | true |
6ee8d5e298e482629ac6fe1e6d845e07e988337e | PHP | meenacodenatives/APCO | /app/Console/Commands/HourlyUpdate.php | UTF-8 | 1,456 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use DB;
use Mail;
class HourlyUpdate extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'hour:update';
/**
* The console command description.
*... | true |
db11fc204b93f1d913b11e9ff831b00bd03bef85 | PHP | CubeBlack/KnightSlayer | /old/engine/Peca7.php | UTF-8 | 768 | 2.96875 | 3 | [] | no_license | <?php
require_once 'Peca.php';
class Peca7 extends Peca{
const me_color = "preto";
const me_tipo = "Pião preto";
public function __construct($game,$casa) {
$this->baseContruct($game,$casa);
$y = $this->casaY;
$x = $this->casaX;
$yNew = $y-1;
$xNew = $x;
$primeiroM... | true |
5d643426d10ae8035452c0dfeea724083ec7512e | PHP | tektekpr/forstudents | /withdrawal.php | UTF-8 | 395 | 2.5625 | 3 | [] | no_license | <?php
require 'dbconnect.php';
session_start();
try {
$login_user = $_SESSION['user_name'];
$u_deleted = date("Y/m/d H:i:s");
$stmt = $db->prepare("update users set u_deleted_at = ?
WHERE u_username = ? ");
$stmt->execute([$u_deleted, $login_user]);
... | true |
966b5c6e040797f64a137d75ce6ca37c407f19b7 | PHP | thekill8593/validator-php | /app/Validator/Rules/EmailRule.php | UTF-8 | 294 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Validator\Rules;
class EmailRule implements RuleInterface {
function passes($field, $value) : bool {
return filter_var($value, FILTER_VALIDATE_EMAIL);
}
function message($field) : string {
return "$field is incorrect";
}
} | true |
c39d1a42d4430051da646c1b8ca76badb630d1f6 | PHP | svidde/drawgis | /system/CDrawgis/CDrawgis.php | UTF-8 | 7,490 | 2.625 | 3 | [] | no_license | <?php
# CDrawgis
class CDrawgis implements ISingelton {
private static $instance = null;
public $config = array();
public $request;
public $data;
public $db;
public $views;
public $session;
public $timer = array();
#construct
protected function __construct()
{
$this->timer['first'] = microtime(tr... | true |
ac5ba75e0e0b04f9f0b51ba9ade9f934ae18ed9a | PHP | y94836sl/COMP10120 | /php_lab_1/Section4/Cylinder/cylinder.php | UTF-8 | 365 | 3.25 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>The Cylinder Surface Area Page.</title>
</head>
<body>
<h1>The Cylinder Surface Area Page.</h1>
<?php
$r = $_GET['radi'];
$h = $_GET['height'];
$s = (2 * 3.14 * $r * $r) + (2 * 3.14 * $r * $h);
echo ("The surface area of a sphere with a radius of " . $r . ", and a height ... | true |
d78fc2cd8c87e11d283bbbd3f1b1b36f484f8d03 | PHP | RumenDamyanov/sandbox-github-actions | /tests/SandboxTest.php | UTF-8 | 554 | 2.65625 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php namespace Darumen\Sandbox\Test;
use PHPUnit\Framework\TestCase;
use Darumen\Sandbox\Sandbox;
class SandboxTest extends TestCase
{
protected $string = "TestString123";
public function testMethods()
{
$sandbox = new Sandbox();
$this->assertSame($this->string, $sandbox->returnOriginal... | true |
6747d5e73da04c63d74dadcc484bfa1223fdc518 | PHP | ryshinoz/xunit_sample | /src/Tests/Bowling2Test.php | UTF-8 | 1,669 | 2.875 | 3 | [] | no_license | <?php
class Bowling2Test extends PHPUnit_Framework_TestCase
{
/**
* @test
*/
public function testRoll()
{
$bowling = new Bowling2();
for ($i = 0; $i < 50; $i++) {
$score = $bowling->roll();
$this->assertThat($score, $this->greaterThanOrEqual(0), 'スコアは0以上');... | true |
5841a160333f40352c5c09af7602cc02747131f4 | PHP | dima-bzz/laravel-short-schedule | /src/ShortScheduleConsoleOutput.php | UTF-8 | 1,188 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Spatie\ShortSchedule;
use Illuminate\Support\Facades\App;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
class ShortScheduleConsoleOutput
{
private ConsoleOutput $console;
private int $verbosity;
private int $count = 0;
pu... | true |
13fa9311df7ddec9f6d428255c90fcdf5b076399 | PHP | DinukaNavaratna/Dee_Store-Simple_Online_Shopping_Website | /php/product.php | UTF-8 | 3,479 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/*
$product_id = $_GET['id'];
$product_cat = "Women";
$product_cat_no = 1;
$product_name = "Women_Product_1";
$product_price = 500;
$product_availability = 5;
$product_rank = 3;
$product_info = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Esse quo sint repudiandae sus... | true |
612cf00be5b4235936e0a440070498e9508e99c1 | PHP | klml/drfrederson | /_drf/writesource.php | UTF-8 | 1,382 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/*
* @name writesource.php
* @class WriteSource
* @description write content from POST to file on server
* @author klml
*/
require_once 'lib/spyc/Spyc.php';
class WriteSource {
public function __construct() {
// Duplicate TODO
// concat global and local configuration
$... | true |
aec1199e366dcaeed36c80d22182c40995478a89 | PHP | byte-bandit/tai10aim-webshop | /functions/CategoryShow.php | UTF-8 | 1,359 | 2.625 | 3 | [] | no_license |
<table class="cats" width="100%">
<tr>
<td>
<?php
$cat = new CategoryLister();
$return = $cat->getCatList();
$level = 0;
printCategories($return['subitems'],$level);
function printCategories($array,$level)
{
foreach($array as $arr)
{
foreach($arr as $... | true |
41d1313189d4c3d634c00c9a60be085cbff47399 | PHP | kouheiszk/utatanebiyori | /library/WhisperFormatter.php | UTF-8 | 2,075 | 2.984375 | 3 | [] | no_license | <?php
Rhaco::import("lang.StringUtil");
Rhaco::import("lang.DateUtil");
Rhaco::import("text.RandomString");
/**
* Whisperのフォーマッタ
*
* @author SuzukiKouhei
*/
class WhisperFormatter
{
/**
* コメントの整形
*
* @param $status
* @return unknown_type
*/
function f($status, $users = array()){
$replied_use... | true |
6f31b380d95a82798a49efe24dba5a3664f94914 | PHP | leontalukdar/ssl-assignment | /app/Http/Controllers/CartController.php | UTF-8 | 1,120 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Cart;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
class CartController extends Controller
{
public function index(Request $request)
{
$cartProducts = Cart::content();
return view('cart')->with([
"cartProducts" => $cartProdu... | true |
399df6d3dbb941d5820c88222a38892e4374433c | PHP | impresschina/filesystem | /src/FileSystem.php | UTF-8 | 1,793 | 2.859375 | 3 | [] | no_license | <?php
namespace Dovelet;
/**
* Class FileSystem
* @package Dovelet
*/
class FileSystem extends \Gaufrette\Filesystem
{
/**
* @var LocalAdapter
*/
protected $adapter;
/**
* @var
*/
private $path;
/**
* @param \Gaufrette\Adapter $adapter A configured Adapter instance
... | true |
6907f9eb312b56c579c2045bc0d4241cbe128c39 | PHP | yameen/smartdrawer | /webpage/www/displayusers/getknownusers.php | UTF-8 | 1,841 | 2.75 | 3 | [] | no_license | <?php
$login = "smartdraweruser";
$password = "smart";
$databasename = "smartdrawerdb";
$tablename = "person";
function connectAndSetDatabase() {
$mysqli = mysqli_connect("localhost", $GLOBALS['login'], $GLOBALS['password'], $GLOBALS['databasename']);
$errorCode = mysqli_connect_errno($mysqli);
if ($errorCode) {
... | true |
8188d205ffc2bb2fcfdef5b6ce24c8c95055bda3 | PHP | michaelhoanglong/wovodat-EOS | /public_html/WOVOdat/populate/online_forms/data_forms/helpers/process_sd_rsm_data.php | UTF-8 | 6,759 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
ini_set("memory_limit", "-1");
set_time_limit(0);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
date_default_timezone_set('UTC');
if (!isset($_SESSION)) {
session_start();
}
include ("file_manipulation.php");
require_once('special_db_connect.php');
function ... | true |
a2557c14058a4259a06a59608b72e2268768e842 | PHP | michulob/Michutter_v1 | /src/User.php | UTF-8 | 4,730 | 3.1875 | 3 | [] | no_license | <?php
class User {
private $id;
private $email;
private $username;
private $hashedPassword;
private $salt;
public function __construct(){
$this->id = -1;
$this->email = '';
$this->username = '';
$this->hashedPassword = '';
$this->salt = '';
}
public function setEmail(PDO $conn, $n... | true |
de226ea92991f313a08131aaa1f2237a87c2aca0 | PHP | azjezz/psl | /tests/unit/Async/RunTest.php | UTF-8 | 569 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Psl\Tests\Unit\Async;
use PHPUnit\Framework\TestCase;
use Psl\Async;
final class RunTest extends TestCase
{
public function testRun(): void
{
$awaitable = Async\run(static function (): string {
Async\concurrently([
static fn() => A... | true |
571fa323c889ccecdbfd34c27b27d11dde0a4494 | PHP | Arno2T/projet3 | /projet3/Model/CommentsManager.php | UTF-8 | 3,331 | 2.765625 | 3 | [] | no_license | <?php
require_once 'Model.php';
require_once 'Comments.php';
class CommentsManager
{
private $_bdd;
public function __construct()
{
$db= new Model();
$database= $db->getBdd();
$this->setBdd($database);
}
public function setBdd($bdd)
{
$this->_bdd=$bdd;
}
//----READ----- //
//get all comments fr... | true |
351657735ea34dec3938fd47c8c58fcfa51a0021 | PHP | dan-poveda/tallerfinalalgoritmos | /ejercicio65.php | UTF-8 | 3,736 | 2.859375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Ejercicio 65</title>
</head>
<body>
<header>
<h1>Ejercicio 65</h1>
</header>
<form method="post" action="#">
<section>
<h4>Empleados compañia</h4>
<label>Ingrese su nombre</label><br>
<input type="text" name="NAME"><br>
<label>Ingrese su cedula</labe... | true |
f2557d8bb33cbd0baf0d42e1aa13487b7fba7946 | PHP | bubaishaolong/ruhua_shops | /store_api_free/app/services/TokenService.php | UTF-8 | 7,972 | 2.578125 | 3 | [] | no_license | <?php
namespace app\services;
use app\model\Admin as AdminModel;
use app\model\shops\Shop as ShopModel;
use app\model\shops\ShopUser as ShopUserModel;
use app\model\User as UserModel;
use enum\ScopeEnum;
use exceptions\ShopsException;
use exceptions\TokenException;
use think\Exception;
use think\facade\... | true |
87d18e12be13a8b4c79bd4df8b8859a1e0895711 | PHP | towergit/delivery | /protected/admin/modules/ticket/models/Ticket.php | UTF-8 | 6,904 | 2.609375 | 3 | [] | no_license | <?php
/**
* Тикеты
*
* @category Model
* @package Module.Ticket
* @author Timkovsky Alexandr <timkovsky.alexandr@gmail.com>
*
* Доступные столбцы в таблице '{{ticket}}':
* @property integer $id
* @property integer $user_id
* @property integer $category_id
* @property string $code
* @property integer $cr... | true |
25a33993b0d1f663f4fa950325c35889bc3469b9 | PHP | hugoisrr/CalendarioBAMF | /profile.php | ISO-8859-1 | 12,953 | 2.78125 | 3 | [] | no_license | <?php
ob_start();
?>
<!DOCTYPE html>
<html lang="es">
<?php
include "includes/html/head.php";
include "core/init.php";
if ($user_data['idtipoUsuario'] === "1") {
administrador();
}elseif ($user_data['idtipoUsuario'] === "2") {
jefe();
}elseif ($user_data['idtipoUsuario'... | true |
9e3803b2f909ca29e4ef4ffd86dcf98782a7cd7c | PHP | RawatGitHub/LoginSystem | /register.php | UTF-8 | 2,422 | 2.765625 | 3 | [] | no_license | <?php
include_once 'config/User.php';
$userObj = new User();
$username_err = $password_err = $cpassword_err = "";
if(isset($_POST['btn-save'])) {
$username = trim($_POST['username']);
$password = trim($_POST['password']);
$cpassword = trim($_POST['cpassword']);
/**************** SOME SE... | true |
fb65f414e9d7b920a129ca753f96116b2c7e3336 | PHP | youone04/14117035-PABWA | /pertemuan10/index.php | UTF-8 | 754 | 2.9375 | 3 | [] | no_license | <?php
session_start();
//redirect jika mempunya session
if(isset($_SESSION['user'])){
header('location:home.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<title>PHP Login Authentication OOP PABW</title>
</head>
<body>
<h1>PHP Login Authentication OOP PABW</h1>
<h3><span></span> Login</h3>
<form method="POST"... | true |
dc5d4a4a3421af706509b053481924a29f51e4fc | PHP | Phauthentic/authentication-laravel | /src/Authenticator/Storage/LaravelCookieStorage.php | UTF-8 | 2,859 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* Copyright (c) Phauthentic (https://github.com/Phauthentic)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Phauthent... | true |
aa13cf1cd5b95642feebff650eb700b2ddf83a09 | PHP | irikainer/TP3-ISII | /cancion.php | UTF-8 | 843 | 3.078125 | 3 | [] | no_license | <?php
class Cancion
{
public function __constructor()
{
}
public function getCancion($opcion, $single)
{
if ($opcion == 0) {
if ($single == 1) {
return "Mean - Disco: Speak Now (2010)";
} else {
return "Cold as you - Disco: Taylor Swi... | true |
512ff86b7a94c7865bb43f6e594cd2174fabf2e8 | PHP | zhangyue0503/dev-blog | /php/2021/02/source/1.学习一个PHP中用于检测危险函数的扩展Taint.php | UTF-8 | 1,785 | 3.125 | 3 | [] | no_license | <?php
// php -S 0.0.0.0:9991 1.php
$a = $_GET['a'];
$file_name = '/tmp' . $a;
$output = "Welcome, {$a} !!!";
$var = "output";
$sql = "Select * from " . $a;
echo $a, "<br/>"; // Warning: main() [echo]: Attempt to echo a string that might be tainted in /data/www/blog/taint/1.php on line 10
echo $outpu... | true |
2b93932832cb023f16287be2b104be18bc8b5518 | PHP | proyecto-cra/CRA_web | /modulos/rellenadorLibros.php | UTF-8 | 2,160 | 2.828125 | 3 | [] | no_license | <?php
include "librerias/conexion.php";
include "Clases/Libro.php";
$libros = array();
$sql = "SELECT libros.id, libros.titulo, libros.autor, libros.resumen, libros.copias, tiempo_lectura.comando, libros.imagen FROM libros, tiempo_lectura WHERE (tiempo_lectura.id = libros.tiempo_lectura)";
$listar = mysqli_que... | true |
f3a4ec63b4a12c46f2c5b234511e6f39cb7b1f4b | PHP | Kazuia/phalcon-zoo | /app/models/Animal.php | UTF-8 | 167 | 2.515625 | 3 | [] | no_license | <?php
use Phalcon\Mvc\Model;
class Animal extends Model
{
public $id;
public $name;
public $specie;
public $weight;
public $mammal;
public $shout;
}
| true |