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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5526d3b6a0d2b095cbaedfda0e3fcf97eb63c877 | PHP | mbabic131/TwitterPApp | /src/AppBundle/Controller/DefaultController.php | UTF-8 | 4,888 | 2.546875 | 3 | [] | no_license | <?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use AppBundle\Entity\User;
use AppBundle\Entity\Tweet;
... | true |
729e8c2d97cafdb5c9c06754c335722156b0b996 | PHP | moshiurr/guitar_shop | /guitar_search.php | UTF-8 | 1,671 | 2.625 | 3 | [] | no_license | <?php include('partials/top_bar.php'); ?>
<!-- getting the user data from the GET method -->
<?php
if(isset($_GET['search'])){
$search = $_GET['search'];
}else{
header('location: index.php');
}
$sql = "SELECT * FROM PRODUCT WHERE description LIKE '%$search%'";
?>
<div class="container">
<h2 class="header... | true |
1e6a68c343da87bad2513937aae31ed88854fb6c | PHP | apteles/orm | /src/DML/Select.php | UTF-8 | 710 | 2.75 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Apteles\ORM\DML;
use Apteles\ORM\DML\Traits\CriteriaAwareTrait;
class Select extends SQLInstruction
{
use CriteriaAwareTrait;
private array $columns = [];
public function table(string $entity): Select
{
$this->setEntity($entity);
return $this;
... | true |
3a8c1eb38f212950fc8005f2c9db67ba318d3d5e | PHP | VirginiaBobotsova/ContentMenagementSystem | /models/PaintingsModel.php | UTF-8 | 1,541 | 2.890625 | 3 | [] | no_license | <?php
class PaintingsModel extends BaseModel {
public function getAll() {
$statement = self::$db->query("SELECT * FROM paintings");
return $statement->fetch_all(MYSQLI_ASSOC);
}
public function find($id) {
$statement = self::$db->prepare(
"SELECT * FROM paintings WHERE i... | true |
5d15c1ec779242d395fd131fd10c4770c776b396 | PHP | marekdan/coders_lab | /week_2/oop/src/cone.php | UTF-8 | 862 | 3.515625 | 4 | [] | no_license | <?php
require_once ("wheel.php");
class Cone extends Wheel{
protected $h;
public function __construct($newX, $newY, $newCol, $newR, $newH){
echo "Konstruktor Cone<br>";
parent::__construct($newX, $newY, $newCol, $newR);
$this->setH($newH);
}
public function __destruct() {
... | true |
9fc3eb794837acd81abdc9b4a1880926ba75bbd0 | PHP | bitmovin/bitmovin-php | /src/Bitmovin/api/resource/AbstractResource.php | UTF-8 | 9,726 | 2.6875 | 3 | [] | no_license | <?php
namespace Bitmovin\api\resource;
use Bitmovin\api\AbstractHttpClient;
use Bitmovin\api\exceptions\BitmovinException;
use Bitmovin\api\model\AbstractModel;
use Bitmovin\api\model\ModelInterface;
use Bitmovin\api\util\ResponseBuilder;
use Doctrine\Common\Annotations\AnnotationRegistry;
use JMS\Serializer\Naming\I... | true |
c3f965cd510167ee56d9ea00f0d4bf25d877a86f | PHP | arout77/diamondphp | /app/plugins/Email.php | UTF-8 | 3,108 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Plugin;
//Import PHPMailer classes into the global namespace
//These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
require_once VENDOR_PATH . 'phpmailer/phpmailer/src/Exception.php';
requi... | true |
b0338d58fd4c8fea067100c5a703ae999baffcfd | PHP | zhangyiran1206/xwom_open | /vendor/aliyun-openapi-php-sdk-master/aliyun-php-sdk-ecs/Ecs/Request/V20140526/ModifyCapacityReservationRequest.php | UTF-8 | 4,936 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Ecs\Request\V20140526;
/**
* @deprecated Please use https://github.com/aliyun/openapi-sdk-php
*
* Request of ModifyCapacityReservation
*
* @method string getResourceOwnerId()
* @method string getDescription()
* @method string getStartTime()
* @method string getPlatform()
* @method string getP... | true |
fc217bffb39882c5296c6bf374416f3391a5b73c | PHP | livissnack/Twine | /src/Traits/Encodable.php | UTF-8 | 2,002 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace PHLAK\Twine\Traits;
use PHLAK\Twine\Config;
use RuntimeException;
trait Encodable
{
/**
* Encode the string to or decode from a base64 encoded value.
*
* @param string $mode A base64 mode flag
*
* Available base64 modes:
*
* - Twine\Config\Base64::ENCODE - Enc... | true |
0597a4143fa2cd30547f3460213466bd6772161a | PHP | hiralvaghasiya/Library | /library/model/category.php | UTF-8 | 648 | 3.0625 | 3 | [] | no_license | <?php
class category{
public $db;
public static $tablename = 'category';
function __construct(){
$db = new dbConnect();
$this->db = $db->connect();
}
function addCategory($data){
$db = $this->db;
$sql="INSERT INTO ".self::$tablename." (name) VALUES ('".$data['category']."')";
... | true |
377b63c864bd17b2520677db4ced0284d0b6fffe | PHP | jpklein/slack-integration | /scripts/include/log.php | UTF-8 | 187 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
function mylog($logfile, $payload)
{
$fh = fopen($logfile, "ra+");
fwrite($fh, time() . "\n");
fwrite($fh, $payload);
fwrite($fh, "\n____________________\n");
fclose($fh);
}
| true |
48826ce13e474b5624c250b1633d1407301d3087 | PHP | cr0wst/LeaseTracker | /app/Repositories/MileEntryRepositoryInterface.php | UTF-8 | 868 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: steve
* Date: 7/21/2017
* Time: 1:17 PM
*/
namespace LeaseTracker\Repositories;
use Illuminate\Support\Collection;
/**
* Implementations of this interface provide a way of working with MileEntry objects on a datasource.
*
* @package LeaseTracker\Repositories
*... | true |
52995f57550fed29c33fac4cd7fa89721956d7c8 | PHP | zxp86021/ChuCooBlog-php | /Controllers/PostController.php | UTF-8 | 5,154 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: zxp86021
* Date: 2017/6/16
* Time: 下午 7:46
*/
class PostController
{
function __construct() {
if ( is_null(json_decode(file_get_contents(__DIR__ . '/../Storage/authors.json'), TRUE)) ) {
$this->authors = [];
} else {
$this->autho... | true |
1604ca9c2bea61cbf7f7525582b2bb1cd5fb07c6 | PHP | metinacun95/eoyuncak | /App/Models/UserModel.php | UTF-8 | 2,237 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use System\Libraries\Model;
use System\Libraries\Config;
class UserModel extends Model{
function create($data = []){
$user = $this->db->query("SELECT * FROM uyeler WHERE KullaniciAdi='".$data['KullaniciAdi']."' OR Eposta='".$data['Eposta']."'");
if(count($user)==0){
i... | true |
2fb1a60879444b99aea7b74a2f8876dcbee5fe88 | PHP | mhmdnz/hoory | /app/Repositories/Interfaces/WalletRepositoryInterface.php | UTF-8 | 263 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Repositories\Interfaces;
use App\Models\User;
use App\Models\Wallet;
interface WalletRepositoryInterface
{
public function save($name, $number, $type, User $user): Wallet;
public function updateBalance($walletId, $newBalance);
}
| true |
d0efea37bc228113097029f4cbb3c8b4fbad0a49 | PHP | php2015/hsshop | /app/Lib/Redis/ShareEventRecordRedis.php | UTF-8 | 755 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* Author: MeiJay
* Date: 2017/12/6
* Time: 23:35
*/
namespace App\Lib\Redis;
class ShareEventRecordRedis extends RedisInterface
{
protected $prefixKey = 'ShareEventRecord';
protected $timeOut = 7200;
public function __construct($key = '')
{
parent::__con... | true |
e93e1db0794ed13bb35f32af949a9f4916cedf49 | PHP | Trekky12/life-tracking | /src/Domain/Home/Widget/ShoppingListWidget.php | UTF-8 | 2,509 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Domain\Home\Widget;
use Psr\Log\LoggerInterface;
use App\Domain\Main\Translator;
use App\Domain\Base\CurrentUser;
use App\Domain\Recipes\Shoppinglist\ShoppinglistService;
use App\Domain\Board\Card\CardMapper;
use Slim\Routing\RouteParser;
class ShoppingListWidget implements Widget
{
private ... | true |
6fa3dd0eb17d7dd26d2f6f37fb3aef2f10f66df9 | PHP | Muqsit/VanillaGenerator | /src/muqsit/vanillagenerator/generator/VanillaGenerator.php | UTF-8 | 3,088 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace muqsit\vanillagenerator\generator;
use muqsit\vanillagenerator\generator\biomegrid\MapLayer;
use muqsit\vanillagenerator\generator\biomegrid\utils\MapLayerPair;
use muqsit\vanillagenerator\generator\overworld\WorldType;
use muqsit\vanillagenerator\generator\utils\preset\Gener... | true |
db0fac79ddd49f019918130bcdae6970818c5937 | PHP | driveto/phpstan-twig | /src/Twig/TwigLineNumberExtractor.php | UTF-8 | 911 | 2.953125 | 3 | [] | no_license | <?php declare(strict_types = 1);
namespace Driveto\PhpstanTwig\Twig;
use function explode;
use function preg_match;
class TwigLineNumberExtractor
{
/** @var array<int, int> */
private array $twigLineNumbersByPhpLineNumbers = [];
public function __construct(string $compiledTemplate)
{
foreach (explode("\n", $... | true |
7183255514e7c165a65eb9ee32485d7a2f137ac9 | PHP | coolstuff01/CryptoTracker | /register.php | UTF-8 | 6,469 | 2.5625 | 3 | [] | no_license |
<?php
session_start();
//$g_url_to_app=pathinfo($_SERVER["REQUEST_SCHEME"]."://".$_SERVER["SERVER_ADDR"]."/".$_SERVER["REQUEST_URI"])['dirname'];
$g_url_to_app="http://cointork.com/CryptoTracker";
require("common.php");
require("vendor/phpmailer/send_mail.php");
$message="";
inc... | true |
8ab9e319e4ccd1d8b11cd32bb59c2c566baa6f17 | PHP | cardhouse/feedback-widget | /app/Models/Song.php | UTF-8 | 1,550 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Http;
class Song extends Model
{
use HasFactory;
protected $guarded = ['user_id'];
public function artist() {
return $this->belongsTo(User::c... | true |
872657aef4c29e5dd24f80ac2d2254b6cde29ed7 | PHP | ray-di/Ray.ValidateModule | /tests/Fake/FakeUser2.php | UTF-8 | 994 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ray\Validation;
use Ray\Validation\Annotation\OnFailure;
use Ray\Validation\Annotation\OnValidate;
use Ray\Validation\Annotation\Valid;
class FakeUser2
{
public $target;
/**
* @Valid
*/
public function createUser($name)
{
}
/**
* @return Validation
*
... | true |
94c5378589b80b9b2daaa9b7fb7e12f70f64e413 | PHP | Elsa5511/zerotask | /src/module/BestPractice/src/BestPractice/Service/SubscriptionService.php | UTF-8 | 4,659 | 2.71875 | 3 | [] | no_license | <?php
namespace BestPractice\Service;
use Application\Service\AbstractBaseService;
use BestPractice\Entity\Subscription;
use Application\Utility\ServiceMessage;
class SubscriptionService extends AbstractBaseService
{
/**
*
* @param int $bestPracticeId
* @param int $userId
* @param bool $subs... | true |
264fa8898f6e8577297d562a605e762f1ec5ba6c | PHP | capons/laravel-auction-show | /App/Library/UpBid.php | UTF-8 | 2,432 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Library;
class UpBid
{
private $sql_data = array();
private $update_val = '';
private $update_key = '';
private $update_sql = array();
private $user_id = array();
private $user_bid = array();
public function changeBid($array) //sor... | true |
a717aee883ac91d41f212691e9a149f603389ef8 | PHP | Radu-Grigorovici/phpbasics | /013_functions/03_anonymous_function_as_callback.php | UTF-8 | 1,078 | 3.453125 | 3 | [] | no_license | <?php
$friends = [
['first' => 'Jim', 'last' => 'White'],
['first' => 'Jane', 'last' => 'White'],
['first' => 'Hilary', 'last' => 'Brown'],
['first' => 'Harry', 'last' => 'Brown'],
['first' => 'Paul', 'last' => 'Green'],
['first' => 'Amanda', 'last' => 'Green'],
['first' => 'John', 'last' => 'Black'],
[... | true |
55f3c75c18c0fa46e616e6dec687387b5145333c | PHP | spetz83/zf3doctrine | /module/Album/src/Model/Album.php | UTF-8 | 1,492 | 2.609375 | 3 | [] | no_license | <?php
////////////////////
//
// Copyright 2014-2016. Quantum Corporation. All Rights Reserved.
// StorNext is either a trademark or registered trademark of
// Quantum Corporation in the US and/or other countries.
//
////////////////////
namespace Album\Model;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Album
* @... | true |
09743043f4c2fd0afce85f0aecdcd7a4268a0a3e | PHP | JamesBondsky/4lapy | /src/MobileApiBundle/Dto/Request/PutUserCartRequest.php | UTF-8 | 1,061 | 2.578125 | 3 | [] | no_license | <?php
/*
* @copyright Copyright (c) ADV/web-engineering co
*/
namespace FourPaws\MobileApiBundle\Dto\Request;
use FourPaws\MobileApiBundle\Dto\Object\ProductQuantity;
use FourPaws\MobileApiBundle\Dto\Request\Types\PutRequest;
use FourPaws\MobileApiBundle\Dto\Request\Types\SimpleUnserializeRequest;
use Symfony\Comp... | true |
8991a69b646d291488ea15d101253613a0171b7a | PHP | Rinku101990/schools_app | /application/controllers/super/Master.php | UTF-8 | 3,337 | 2.578125 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Master extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this control... | true |
aae9726722b7402b7ebd80c22decd99a1b619ae4 | PHP | falgun/kuery | /tests/KueryTest.php | UTF-8 | 8,742 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Falgun\Kuery\Tests;
use Falgun\Kuery\Kuery;
use Falgun\Kuery\Connection;
use Falgun\Kuery\Configuration;
use PHPUnit\Framework\TestCase;
use Falgun\Kuery\Connection\MySqlConnection;
use Falgun\Kuery\Connection\ConnectionInterface;
use Falgun\Kuery\Exception\InvalidStatementExc... | true |
1c4cf66930cfb9cf40e823f11318cc38649fb700 | PHP | comprog-batch-2012-2014/Web-Prog-2 | /utilities.php | UTF-8 | 1,813 | 2.53125 | 3 | [] | no_license | <?php
include "db_Config.php";
function reject($id){
$query = "UPDATE messages SET is_approve = 'N' WHERE id = '$id' ";
$result = mysql_query($query);
if($result){
echo "Successfully to Reject";
}else{
echo "Not Successfully Reject";
}
}
function approve($id){
$query = "UPDATE messages ... | true |
b00e265ba752e29a9bbfc45c4e3aed132578ef82 | PHP | longnh-tmh-techlab/QLBH | /src/Controller/ColorsController.php | UTF-8 | 3,347 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Controller;
/**
* Colors Controller
*
* @property \App\Model\Table\ColorsTable $Colors
* @method \App\Model\Entity\Color[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = [])
*/
class ColorsController extends AppController
{
/**
... | true |
ccd22a8229328fe8bbd90d738ed6e76325f1ed30 | PHP | JainLaunda/sparks-internship | /Transfer.php | UTF-8 | 4,195 | 2.515625 | 3 | [
"MIT"
] | permissive | <!--
MADE BY Rishabh Jain
THIS PAGE IS FOR TRANSACTION OF MONEY FROM ONE BANK ACCOUNT TO ANOTHER.
ON THIS PAGE,
user has to enter the account no of payer, payee and amount that needs to be transferred.
Then click proceed to confirm transaction. If the transfer is successful then user will be shown details
of ... | true |
4fbcc1c718fe3aa1b23e6c78cb35cfdb59f3c481 | PHP | janvernieuwe/rest-demo | /src/Request/Film/FilmRequest.php | UTF-8 | 751 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Phpro\RestDemo\Request\Film;
use Phpro\RestDemo\Request\RequestInterface;
class FilmRequest implements RequestInterface
{
private int $id;
private function __construct()
{
}
public static function withId(int $id): self
{
$instance = new self(... | true |
8b704066a9d3fe6739c2b42041e70904b9227cf5 | PHP | AldricVS/get_the_flight | /admin/test_utilisation_api.php | UTF-8 | 1,896 | 2.5625 | 3 | [] | no_license | <?php
include_once('../php/class/process_data.class.php');
//include('correspond_name.class.php');
//variable test
$aeroport_depart = "PARIS-CHARLES-DE-GAULLE";
$aeroport_arrive = "MARSEILLE-PROVENCE";
$date = "2020-12-04";
$test = new ProcessData;
//insertion des informations
$test->setAeroportDep... | true |
0c1c984ca54edeef74910e43b3f4e2c3057e1d12 | PHP | ChickenCode/php-oop-2 | /user/primeUser.php | UTF-8 | 530 | 3 | 3 | [] | no_license | <?php
require __DIR__ . "./user.php";
class PrimeUser extends User {
public $prime = true;
public $subscriptionDate;
function __construct($name, $lastName, $userName, $age, $email, $subscriptionDate = null) {
parent::__construct($name, $lastName, $userName, $age, $email);
... | true |
8734e763022f6904998bc49c59b2e93085803ba6 | PHP | gubritzke/WANTU | /vendor/naicheframework/Mktplace/Auth/AuthAbstract.php | UTF-8 | 805 | 3 | 3 | [] | no_license | <?php
namespace Naicheframework\Mktplace\Auth;
/**
* @NAICHE | Vitor Deco
*/
abstract class AuthAbstract
{
/**
* identifica qual é a integração
* @var string
*/
private $type = null;
/**
* identifica em qual ambiente está
* @var boolean
*/
protected $is_sandbox = false;
/**
*... | true |
17727543691e5bdd9e91a70099a13a9e7a21f354 | PHP | tarikmanoar/xenforo | /src/XF/Http/ResponseStream.php | UTF-8 | 955 | 3.09375 | 3 | [] | no_license | <?php
namespace XF\Http;
use function is_resource, strlen;
class ResponseStream
{
protected $resource = null;
protected $length = null;
protected $contents = null;
public function __construct($resource, $length = null)
{
if (!is_resource($resource))
{
throw new \InvalidArgumentException("Must pass vali... | true |
d02cf4612f31ffb9f1356e36ee11f8ae8a362820 | PHP | neostoic/food_finder | /tests/CuisineTest.php | UTF-8 | 4,873 | 3 | 3 | [] | no_license | <?php
/**
* @backupGlobals disabled
* @backupStatic Attributes disabled
*/
require_once "src/Cuisine.php";
require_once "src/Restaurant.php";
$server = 'mysql:host=localhost;dbname=food_finder_test';
$username = 'root';
$password = 'root';
$DB = new PDO($server, $username, $pas... | true |
757801bf6fd75113403aca2f1f454da7c8aa6743 | PHP | choco14t/movie-ticket-fee | /src/MovieTicketFee/Customer/CustomerType.php | UTF-8 | 361 | 2.640625 | 3 | [] | no_license | <?php
namespace MovieTicketFee\Customer;
use MyCLabs\Enum\Enum;
/**
* 顧客種別
*
* @method static self MEMBER()
* @method static self SENIOR_MEMBER()
* @method static self REGULAR()
*/
class CustomerType extends Enum
{
private const MEMBER = 'member';
private const SENIOR_MEMBER = 'senior_member';
priv... | true |
4222a6ed0ce91b16fd563699d7a02ea9125681b8 | PHP | mest2011/2-semestre---desenvolvimento-de-web-site-com-banco-de-dados--ferramentas-utilizadas-html-css-php-sql | /cadastroforn.php | UTF-8 | 1,455 | 2.640625 | 3 | [] | no_license | <?php include "cabecalho.php";
include "conecta.php";
$fornecedor = $_POST["fornecedor"]; // Nome do fornecedor/empresa
$dataCadastro = date ("Y-m-d");
$cnpj = (int) $_POST["cnpj"];
$atividade = $_POST["atividade"]; // Atividade da empresa
$nome = $_POST["nome"]; // Nome do usuário
$endereco = $_POST... | true |
5a695cbfb7d29be02f010d57095aca4ed26f810b | PHP | alunoadauto/sge | /app/classes/Arquivo.php | UTF-8 | 1,033 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\classes;
Class Arquivo {
public static function download($arquivo){
//require $arquivo;
$arquivo = str_replace('-.-','/',$arquivo);
//dd(substr($arquivo,1));
if(substr($arquivo,0,1) =='/')
$arquivo = substr($arquivo,1);
if(file... | true |
2b69f1e9f9b4fa1e7e157a90e7f33b4567ab7882 | PHP | aslv/FileUploadingSystem | /includes/constants.php | UTF-8 | 562 | 2.625 | 3 | [] | no_license | <?php
$d = DIRECTORY_SEPARATOR;
$uploads = 'uploads';
$heading = 'Система за качване на файлове';
$highLevelOfSecurity = false; // if you would like to raise the level of security, set this var to true
function return_bytes($val)
{
$val = trim($val);
$last = strtolower($val[strlen($val)-1]);
switch($last) {... | true |
b29237cb2b151711448d558204046775583adf23 | PHP | sandrosa1/crudfatec | /endPoint/comentario.php | UTF-8 | 1,331 | 2.5625 | 3 | [] | no_license | <?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Content-Type: application/json; charset=UTF-8');
$uri = basename($_SERVER['REQUEST_URI']);
require_once ('./../services/sessao.php');
require_once ('./../services/conexao.php');
include_once ... | true |
6363c38106d6759bdecc9d1b5752559f8241c7a8 | PHP | stritti/bkwi1920 | /web/admin/internal.php | UTF-8 | 1,190 | 2.75 | 3 | [
"GPL-3.0-only",
"MIT"
] | permissive | <?php
session_start();
// If you installed via composer, just use this code to require autoloader on the top of your projects.
require_once __DIR__ . '/../init.php';
require_once __DIR__ . '/../vendor/autoload.php';
//Überprüfe, dass der User eingeloggt ist
//Der Aufruf von check_user() muss in alle internen Seiten ... | true |
c9989378a92a8832db8dd2dca761dd338247cb9c | PHP | pengzhengrong/account | /application/file/simple.php | UTF-8 | 1,270 | 2.875 | 3 | [] | no_license | <?php
$file = '/home/pzr/desktop/php.sh';
//{{
// readfile( $file ); //不需要echo
//}}
//{{
// $arr = file( $file );
// foreach ( $arr as $v ){
// echo $v."<br>"; //\n 不行
// }
//}}
//{{
// echo file_get_contents( $file , '',null, 1,10);
//}}
//--------------------------------------------------------------------------... | true |
74b9be93b7b6062747d7e10194d2d6e15a6ff6e0 | PHP | MichelRiou/Project-C | /poubelle/backend.php | UTF-8 | 7,388 | 2.515625 | 3 | [] | no_license | <?php
// CLASSES CHARGEES PAR AUTOLOAD.
// CONTROLEUR POUR LES OPERATIONS SUR LE MODEL
// PAS DE VUES GENEREES
function changeBU($bu) {
// En attente de sérialization de l'objet plus tôt dans le process
$_SESSION['bu'] = $bu;
print_r($_SESSION);
}
function deleteTag($id) {
// En atte... | true |
04b47faa63d5b54b17f0ac3b4562d098a79c38e1 | PHP | yasa83/BookSNS | /post.php | UTF-8 | 6,726 | 2.53125 | 3 | [] | no_license | <?php
session_start();
require('dbconnect.php');
// 直接このページに来たらsignin.phpに飛ぶようにする
if(!isset($_SESSION['email'])){
header('Location:signin.php');
exit();
}
//サインインユーザー情報取得
$sql = 'SELECT * FROM `users` WHERE `email` =?';
$data = array($_SESSION['email']);
$stmt = $dbh->prepare($sql);
$stmt->execute($data);
$s... | true |
b10b5f0a529470e4ee1dd2c58768ca20163f5171 | PHP | Ishwarya-Selvam/phpunit | /mail.php | UTF-8 | 1,032 | 2.765625 | 3 | [] | no_license | <?php
// Uncomment the next line if you're using a dependency loader (such as Composer) (recommended)
require 'vendor/autoload.php';
$API_KEY = "";
// Uncomment the next line if you're not using a dependency loader (such as Composer), replacing <PATH TO> with the path to the sendgrid-php.php file
// require_once '<PAT... | true |
17f671d103eb3997bc983ef4d0d5e3008b2f9b47 | PHP | pizzamanblabla/parsers_project | /src/ParserBundle/Operation/Parse/Dto/SuccessfulResponse.php | UTF-8 | 604 | 2.65625 | 3 | [] | no_license | <?php
namespace ParserBundle\Operation\Parse\Dto;
use ParserBundle\Interaction\Dto\Response\InternalResponseInterface;
use ParserBundle\Interaction\Dto\Response\Successful;
class SuccessfulResponse implements InternalResponseInterface
{
use Successful;
/**
* @var array
*/
private $data;
/... | true |
0aa86f2a80652e9736f63289325abe7031335f94 | PHP | andri000me/elerning_amin | /application/models/Model.php | UTF-8 | 4,438 | 2.703125 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Model extends CI_Model {
public $CREATE = 1, $UPDATE = 2, $DELETE = 3; // action flag
private $numData = 0; // num of record
protected $table = '', $isNew = true;
public function __construct() {
parent::__construct();
... | true |
42f91fce315e2e4fab8dd24ddbebc3a0e13ab75c | PHP | DavidMolinari/DBPRJCT | /core/login.php | UTF-8 | 763 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
// TODO REQUIRE USER MANAGER
require_once '../database/Database.php';
if(!isset($_POST['email']) && !isset($_POST['pwd']))
die('Paramètres manquants');
$login = htmlspecialchars($_POST['inputEmail']);
$password = htmlspecialchars($_POST['inputPassword']);
// Création d'une connexion avec des... | true |
75c29da75796a8a62a20ac0d49db5470f18e4c26 | PHP | Laynt01/DAW2 | /Desarrollo Web Servidor/Ejercicios/Unidad 3/PHPPracticaUD3Sesion2/ejercicio14.php | UTF-8 | 243 | 2.96875 | 3 | [] | no_license | <?php
$x = readline("Por favor introduzca un fichero a leer");
$myfile = fopen($x, "r") or die("ERROR: El fichero: " . $x . " no existe");
echo 'El fichero ' . $x . ' tiene el siguiente contenido:'. "\n";
echo fgets($myfile);
fclose($myfile);
| true |
5f5fd46a0f58579bfdc704449f5fcdfd647e5e31 | PHP | sanatiel90/sonfinancas | /phinx.php | UTF-8 | 1,497 | 2.546875 | 3 | [] | no_license | <?php
//arq do phinx referen as migrations do bd
include __DIR__ . '/vendor/autoload.php';
//vai receber array de configuracao
$db = include __DIR__ . '/config/db.php';
/*func do php 7: vai pegar as info q tem no array $db['development'] e colocar cada informacao (driver,host,database,etc)
numa var (adapter,host,nam... | true |
deb4980ae08380cda63129f42bf4b0e244857886 | PHP | scubafly/d7_vacancies | /vacancies-block-item.tpl.php | UTF-8 | 1,836 | 2.640625 | 3 | [] | no_license | <?php
// $Id$
/**
* @file
* HTML for an item in the vacancies block listing
*
* Available variables:
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can... | true |
a046a4003e56044a144994d4522564039cf4393a | PHP | pistej/yii2-faq | /models/FaqGroup.php | UTF-8 | 2,479 | 2.578125 | 3 | [] | no_license | <?php
namespace pistej\faq\models;
use pistej\faq\Faq;
use yii\behaviors\BlameableBehavior;
use yii\behaviors\TimestampBehavior;
use yii\db\Expression;
/**
* This is the model class for table "{{%faq_group}}".
*
* @property int $id
* @property string $name
* @property string $lang_code
* @property string $key
... | true |
3c47f6b53cd94598784fd9e6bffd618b3757756d | PHP | thelegend6420/att-html5-sdk | /sdk/server/php/public_html/att/codekit.lib/Restful/HttpGet.php | UTF-8 | 890 | 3.046875 | 3 | [] | no_license | <?php
namespace Att\Api\Restful;
class HttpGet
{
/**
* Query parameters to send.
*/
private $_params;
public function __construct()
{
$this->_params = null;
}
/**
* Sets a query parameter, which will be added to the URL query parameters.
*
* @param strin... | true |
afa4d7e87faca38a23d9f1f68534dce853991eb1 | PHP | email2sathyan/login_systems | /add.php | UTF-8 | 10,019 | 2.75 | 3 | [] | no_license | <?PHP
// NOTE adding extra fields is for the little more advance php/mysql'er
// If your not planing to add more fields you can ignore the lines with an # infront of it (that means lines with // # as first 4 chars)
// retrieve al the variables that had been submited by the from
$username1 = $HTTP_POST_VARS["user... | true |
80b19b28d98cf7708e32dbdce2a20af96e16f6c7 | PHP | Pankti4/adminproduct1 | /application/models/Productmodel.php | UTF-8 | 1,797 | 2.59375 | 3 | [] | no_license | <?php
class Productmodel extends CI_Model{
public function get_product(){
if(!empty($this->input->get("search"))){
$this->db->like('name', $this->input->get("search"));
$this->db->like('category_id', $this->input->get("search"));
$this->db->like('subcategory_id'... | true |
9d3008bfa2848670d58d13d843f491be3cdec045 | PHP | J-Trudell/field_formatter_sample | /src/Plugin/Field/FieldFormatter/RotThirteenFormatter.php | UTF-8 | 838 | 2.546875 | 3 | [] | no_license | <?php
namespace Drupal\field_formatter_sample\Plugin\Field\FieldFormatter;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Field\FieldItemListInterface;
/**
* Plugin implementation of the 'Rot13' formatter.
*
* @FieldFormatter(
* id = "Rot13",
* label = @Translation("Rot13 encoding"),
* description ... | true |
40d7ead5a04a2bd3e302f3b2fa277c1ab89149bf | PHP | decima/M2-platine | /src/system/moduleManager.php | UTF-8 | 14,654 | 2.515625 | 3 | [] | no_license | <?php
class ModuleManager implements SystemModule
{
public function info()
{
_Security::version(0, 1);
return [
"name" => "ModuleManager",
"readablename" => "Module Manager",
];
}
public function init_system_module()
{
... | true |
9ceca500374eb2199f5d8b6ec52207834be255ba | PHP | matecat/dqf-integrator | /src/Repository/Api/AbstractApiRepository.php | UTF-8 | 1,198 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Matecat\Dqf\Repository\Api;
use Matecat\Dqf\Cache\BasicAttributes;
use Matecat\Dqf\Client;
use Matecat\Dqf\Model\Entity\Language;
use Matecat\Dqf\Model\Repository\CrudApiRepositoryInterface;
abstract class AbstractApiRepository
{
/**
* @var Client
*/
protected $client;
/**
... | true |
6cdd0057e71116ad92170e53e9194b5a15049c1b | PHP | karlozz157/crud | /src/Entity/User.php | UTF-8 | 3,859 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\UserRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=UserRepository::class)
* @ORM\Table(n... | true |
b74ad6f3a24b2954e1bd11cadfdc740d3c54d8bb | PHP | nagyist/CBOR-PHP | /cbor.php | UTF-8 | 7,541 | 2.90625 | 3 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | <?php
/*
Written by Peter O. in 2014.
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
If you like this, you should donate to Peter O.
at: http://peteroupc.github.io/
*/
class CBORException extends Exception {}
class CBORTagged {
var $value;
var $tag;
private ... | true |
ab0cc8865ca10577d23d09a728d891015a6c6b49 | PHP | bjamey/libuseless | /PHP/Graphics & Colors/Resize and center Image.php | UTF-8 | 1,032 | 2.765625 | 3 | [] | no_license | <?php /* ----------------------------------------------------------------------
DTT 2.1.5.2 (c)2007 FSL - FreeSoftLand
Title: Resize and center Image
Date : 24/05/2007
By : FSL
---------------------------------------------------------------------------- */
... | true |
968d2293cbc85c61cf0a176f36003d56e9da85c3 | PHP | WPPlugins/twitter-follow-button-widget | /twitter-follow-button-widget.php | UTF-8 | 7,541 | 2.796875 | 3 | [] | no_license | <?php
/**
* Plugin Name: Twitter Follow Button
* Plugin URI: http://marbu.org/marbu/argomento/wordpress-plugin/
* Description: A widget that give you the possibility to add official Twitter Follow Button: http://twitter.com/about/resources/followbutton
* Version: 1.0
* Author: Marco Buttarini
* Author URI:... | true |
2c47b81ac193504d1d5870e40bfb488069637f76 | PHP | spotframework/spot | /src/Spot/Reflect/Impl/Matcher/OrMatcher.php | UTF-8 | 388 | 2.578125 | 3 | [] | no_license | <?php
namespace Spot\Reflect\Impl\Matcher;
use Spot\Reflect\Matcher;
use Spot\Reflect\Type;
class OrMatcher extends Matcher {
public $o1, $o2;
public function __construct(Matcher $o1, Matcher $o2) {
$this->o1 = $o1;
$this->o2 = $o2;
}
public function matches(Type $type) {
ret... | true |
ae5bf87d4777b09926a77961924952144f59295f | PHP | FranckChaks/ProjetCPSIA | /controller/categorie.php | UTF-8 | 832 | 2.578125 | 3 | [] | no_license | <?php
require "model/categorieModel.php";
class categorie
{
use Genos;
public $id;
public $libelle_c;
public function __construct(){
$this->id = 0;
$this->libelle_c = "";
}
public static function getList(){
$c = new categorie;
$req... | true |
708cdf88da3b2b9d151d33001ffd82dfc78fa342 | PHP | antony7dermawan/bandrek88coco | /test.php | UTF-8 | 131 | 2.609375 | 3 | [] | no_license | <?php
$date=strtotime(date('Y-m-d H:i:s'));
$date1=strtotime('2020-08-05 09:12:11.2');
echo $date;
echo '<br>';
echo $date1;
?> | true |
02122938505734a06ab5817ac6f0c9cf4290f7ec | PHP | akane0151/ZIM | /application/models/input_model.php | UTF-8 | 3,821 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: asus iran
* Date: 7/27/2018
* Time: 12:37 AM
*/
class Input_model extends CI_Model
{
public function get_inputs()
{
$this->db->select('inputs.id, inputs.final_price, inputs.date, products.Name, inputs.number');
$this->db->from('inputs');
$t... | true |
a390b0de736806e2a64b040185ac5c3bf93a2765 | PHP | MezzoLabs/Mezzo | /src/Exceptions/ModelCannotBeAssociated.php | UTF-8 | 996 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace MezzoLabs\Mezzo\Exceptions;
use MezzoLabs\Mezzo\Core\Modularisation\ModuleProvider;
use MezzoLabs\Mezzo\Core\Reflection\Reflections\ModelReflection;
class ModelCannotBeAssociated extends MezzoException
{
/**
* @param string $model
* @param ModuleProvider $module
*/
public fu... | true |
6bf77a28660e8144d694e03e522357b87fe7dffa | PHP | karthik1911/Online-Shopping-Cart | /Onlineshoppingcart19_6/connection.php | UTF-8 | 637 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
$con=mysqli_connect("localhost","root","root","Online_shopping");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$per_page = 10;
//getting number of rows and calculating no of pages
$result = mysqli_query($con,"SELECT * FROM products");
$c... | true |
cc971352be17c83a336a7208dc8242f978548260 | PHP | petardimic/ZnerG | /app/database/migrations/2013_11_15_233817_create_processes_table.php | UTF-8 | 1,580 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateProcessesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('processes', function(Blueprint $table) {
$table->engine = 'InnoDB';
$tab... | true |
f240b9a674b3faf6402fac062e5f8dc7f1ddf94c | PHP | Beginner95/freightCost | /app/Http/Controllers/Admin/CarController.php | UTF-8 | 2,427 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Weight;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class CarController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$w... | true |
34129ae6fd88ca1d8666406f3bbe4c744cd858e3 | PHP | luzhaochun/-PHP- | /selfPHP_zendframeWork/lib/core/Init.class.php | UTF-8 | 1,693 | 2.546875 | 3 | [] | no_license | <?php
namespace lib\core;
class Init {
public static $pdo = null;
public static function run() {
self::define();
self::autoLoad();
self::sessionStart();
self::bootDriver();
self::errSet();
self::dbConnect();
}
public static function define() {
define('DOC_ROOT', $_SERVER['DOCUMENT_... | true |
6bd2bb63f219a7432d95e2158e299c955f8f77d4 | PHP | xxgail/LeetCode-PHP | /String/m-151-reverseWords.php | UTF-8 | 932 | 3.921875 | 4 | [] | no_license | <?php
/**
* @Time: 2019/9/3 17:10
* @DESC: 151. 翻转字符串里的单词 中等
* 给定一个字符串,逐个翻转字符串中的每个单词。
* @param $s
* @return string
*/
function reverseWords($s) {
# ---- 一行解决
// return implode(" ",array_reverse(array_filter(explode(' ',$s))));
# ---- 代码稍微多一点
$res = "";
$left = 0;
$right = $left+1;
whil... | true |
507a0cacd32afc000ce13d6828494c80d48ad1c8 | PHP | silver-snake/pro-wp | /wp-content/plugins/wpbook/includes/publish_to_facebook.php | UTF-8 | 18,877 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* This function updates profile boxes and publishes to Facebook
* In an include to avoid PHP4 based errors
*/
function wpbook_safe_publish_to_facebook($post_ID) {
$debug_file= WP_PLUGIN_DIR .'/wpbook/wpbook_pub_debug.txt';
if(!class_exists('Facebook')) {
include_once(WP_PLUGIN_DIR.'/wpbook/includes... | true |
6ca548e75f2035385422a22cf577059cfeaf7622 | PHP | gcsmckinnon/comp-1006 | /Lesson-08/comments/create.php | UTF-8 | 2,098 | 2.859375 | 3 | [] | no_license | <?php include_once(dirname(__DIR__) . '/_config.php') ?>
<?php not_auth_redirect(base_path . '/posts') ?>
<?php
// Validate
foreach(['title', 'comment'] as $field) {
if (empty($_POST[$field])) {
$formatted = str_replace("_", " ", $_POST[$field]);
$formatted = ucwords($formatted);
$errors[] =... | true |
7115edba6a36f50e662c67f0bf3090c230de5007 | PHP | edosatriani/greensys | /core/Security.php | UTF-8 | 1,027 | 3.0625 | 3 | [] | no_license | <?php
class Security {
private $var;
public function shield($var = "") {
$this->var = $var;
$this->Level1($this->var);
$this->Level2($this->var);
$this->Level3($this->var);
return $this->fix();
}
public function fix() {
return $this->__toString();
}
public function Level1($str) {
$this->var... | true |
c21a90df968b61a825f55fa3fa8c5fc6cff0a37c | PHP | iZaL/jrgroup | /app/controllers/admin/certificates/AdminCertificateMetasController.php | UTF-8 | 1,528 | 2.53125 | 3 | [] | no_license | <?php
class AdminCertificateMetasController extends AdminBaseController {
protected $model;
/**
* @var CertificateOption
*/
private $option;
public function __construct(CertificateMeta $model)
{
$this->model = $model;
parent::__construct();
}
public function ind... | true |
bc4aa89aef76ef5149610f1ff6c510225f47dee7 | PHP | Ernesto-01/SISTEMA-PARA-EL-CONTROL-DE-BODEGA | /proyectoPhp/modelo/modeloUsuarios.php | UTF-8 | 1,302 | 2.84375 | 3 | [] | no_license | <?php
class usuarios{
private $idusuario;
private $usuario;
private $clave;
private $idtipousuario;
private $activo;
private $pass_cifrado;
public function cifrado()
{
$pass_cifrado=password_hash($clave, PASSWORD_DEFAULT);
}
public function usuarios(){
$this->idusuario=null;
... | true |
0dbfea7614c7d1db7330a9ac4ec04b1a5bc573b4 | PHP | Logi-CE/fmup | /tests/ProjectVersion.php | UTF-8 | 5,713 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* ProjectVersion.php
* @author: jmoulin@castelis.com
*/
namespace FMUPTests;
class ProjectVersionMock extends \FMUP\ProjectVersion
{
public function __construct()
{
}
}
class ProjectVersionTest extends \PHPUnit_Framework_TestCase
{
public function testGetInstance()
{
$reflec... | true |
e8e9c45a7b557335af0fd72693fc6ea290464f2b | PHP | mdesilva/wooter | /app/Commands/ReadWeekdaysCommand.php | UTF-8 | 579 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Wooter\Commands;
use Illuminate\Contracts\Bus\SelfHandling;
use Wooter\Wooter\Repositories\WeekdayRepository;
class ReadWeekdaysCommand extends Command implements SelfHandling
{
/**
* Create a new command instance.
*
*/
public function __construct()
{
//
}
... | true |
d5a7930e0dd6898c62f2332d983894567a10d960 | PHP | OmarAldulaimi/PHP-Course | /3.1/3.1.php | UTF-8 | 542 | 3.140625 | 3 | [] | no_license | <?php
//Filen med antalet besökare
$count_the_page = ("counter.txt");
$hits = file($count_the_page); //anger antal besök till det aktuella värdet av innehållet i counter filen
$hits[0] ++;
$fp = fopen($count_the_page , "w"); //Öppnar filen för skrivning
if (flock($fp, LOCK_EX)) { // flock för att undvika krock i filha... | true |
5322a6de54f3b9a3674c9724e93de49ed6519882 | PHP | athos54/iescomercioAsir | /iaw/php/primerasPaginas/6/index.php | UTF-8 | 759 | 3.265625 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<?php
// Escriba un programa que cada vez que se ejecute muestre un c... | true |
053f5c20dbbf1dc7af2a49a932decdcbb75d9c47 | PHP | amitch6097/CSE477steampunked | /tests/tests/ControllerTest.php | UTF-8 | 2,162 | 2.875 | 3 | [] | no_license | ?>
<?php
require __DIR__ . "/../../vendor/autoload.php";
/** @file
* @brief Empty unit testing template
* @cond
* @brief Unit tests for the class
*/
class GameTest extends \PHPUnit_Framework_TestCase
{
public function test_construct() {
$game = new Steampunked\Game("Jerry", "Kyle");
... | true |
2ea978be7a19bbe693657e1c4498affe33ef6306 | PHP | tcesarusa/mm-e-commerce | /vendor/omnipay/firstdata/src/Message/WebserviceAuthorizeRequest.php | UTF-8 | 2,176 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* First Data Webservice Authorize Request
*/
namespace Omnipay\FirstData\Message;
/**
* First Data Webservice Authorize Request
*
* ### Example
*
* <code>
* // Create a gateway for the First Data Webservice Gateway
* // (routes to GatewayFactory::create)
* $gateway = Omnipay::create('FirstData_Webs... | true |
3a687fc3604cbdfc9ecc9d370678ebc6f08ed137 | PHP | SpartnerNL/Laravel-Excel | /src/Importer.php | UTF-8 | 1,564 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Maatwebsite\Excel;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Collection;
interface Importer
{
/**
* @param object $import
* @param string|\Symfony\Component\HttpFoundation\File\UploadedFile $filePath
* @param string|null $disk
* @param string|nu... | true |
e30b6d6655308aca04a678ab962b50d032aeb3a0 | PHP | lucasmasche00/tp_final_pro3_2020 | /project/src/services/usuarioService.php | UTF-8 | 9,664 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Models\Usuario;
use App\Models\Empleado;
use App\Models\JSend;
use App\Models\Token;
class UsuarioService
{
public static function GenerarToken($request, $response, array $args)
{
$jSend = new JSend('error');
$params = $request->getParsedBody();... | true |
6cd75b82dd913992f518c68c02ce894d9516dd1e | PHP | res2k/noodle | /default.php | UTF-8 | 3,997 | 2.625 | 3 | [] | no_license | <?php
// TODO get and set user
// $user = 'Andreas';
$user = array('name' => '');
$user['attendance'] = noodle_get_attendance($user['name']);
$user['attributes_label'] = $attributes_label;
$user['attributes'] = array_flip($attributes);
// $user_attributes = noodle_get_attributes($user);
$user_attributes = array();
... | true |
2494e17b55eb7539033d3a92d1566dfab9794c37 | PHP | VictoireRabiller/blog | /public/delete_post.php | UTF-8 | 627 | 2.671875 | 3 | [] | no_license | <?php
// Validation de la query string dans l'URL.
if(!array_key_exists('articleid', $_GET) OR !ctype_digit($_GET['articleid']))
{
header('Location: index.php');
exit();
}
include '../services/tools.php';
include '../services/functions.php';
// Suppression d'un article du blog.... | true |
05c920cd31bb493bf044a674dabef59f0156d3c8 | PHP | fervallen/symfony-demo | /src/Helper/View/UrlHelper.php | UTF-8 | 1,716 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Helper\View;
use App\Entity\Article;
use App\Entity\AbstractAddressableEntity;
use Symfony\Component\Routing\Router;
class UrlHelper
{
const CATEGORY_SHOW_ROUTE = 'category_show';
const ARTICLE_SHOW_ROUTE = 'article_show';
const ARTICLE_PREVIEW_ROUTE = 'article_preview';
const HOM... | true |
be220b9a81b820e531d74ee38f90fd913f74037b | PHP | martindilling/spires-irc | /tests/Irc/ParserTest.php | UTF-8 | 7,686 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace PHPOxford\SpiresIrc\Tests\Irc;
use PHPOxford\SpiresIrc\Irc\Parser;
class ParserTest extends \PHPUnit_Framework_TestCase
{
/**
* @test
* @covers \PHPOxford\SpiresIrc\Irc\Parser::parse
* @dataProvider dataMessages
*/
public function can_parse_valid_messages_to_an_array_of_da... | true |
dec30af2b2c8ff435fc7956e34620efdbf55f93d | PHP | akki3009/CrestTraining | /PHP/String/string_funct.php | UTF-8 | 3,880 | 3.625 | 4 | [] | no_license |
<br>
<!-- str_pad -->
<?php
$str = "Hello World";
echo str_pad($str,20,".");
?>
<br>
<!-- str_repeat-->
<?php
echo str_repeat("Wow",13);
?>
<br>
<br>
<!-- str_replace-->
<?php
echo str_replace("world","Peter","Hello world!");
?>
<br>
<?php
$arr = array("blue","red","green","yellow");
print_r(str_replace("red","pink"... | true |
eec2596e3d0b521f6801cfb3dcf49d423f7089e0 | PHP | isheglov/paysys | /app/Service/ServiceInterface.php | UTF-8 | 166 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Service;
interface ServiceInterface
{
/**
* @param mixed $request
* @return mixed
*/
public function behave($request);
}
| true |
8d7fb8f0474cc9283a1b431515e58b2354c03430 | PHP | codetech/programming-challenge-site | /Submission.php | UTF-8 | 3,471 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
/*
* Database Object for contest Submissions.
* Owned-by a Challenge.
*/
include 'functions.php';
include 'DatabaseConnection.php';
include 'DatabaseObject.php';
class Submission implements DatabaseObject
{
const DB_TABLE = 'submissions';
const DB_PRIMARY_KEY = 'id';
public $id; /** int **/
public $c... | true |
0382fe237feb7de82ef6b3809fb6b4389dc2ecfb | PHP | GOCJM/HackTheBurgh7-StirlingTeam | /app/Http/Controllers/ProfileController.php | UTF-8 | 2,311 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str;
class ProfileController extends Controller
{
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/... | true |
c4f8c92419b86f44f47c9abd8e5dc970a8cb94a7 | PHP | dariusgm/PHPFee | /lib/do_register.php | UTF-8 | 6,565 | 2.84375 | 3 | [] | no_license | <?php
//Akti = Aktivierungscode
//To-Do: Umlaute und Böse zeichen Escapen
function generate_key()
{
$pool = "qwertzupasdfghkyxcvbnm";
$pool .= "23456789";
$pool .= "WERTZUPLKJHGFDSAYXCVBNM";
srand ((double)microtime()*1000000);
for($index = 0; $index < 10; $index++)
{
$akti .= substr... | true |
b2b8c2ee60e6fa04c67036c0166f44798089dac5 | PHP | martinrole/Nextu-PHP-BackEnd-Entrega-Final | /index.php | UTF-8 | 5,064 | 3.125 | 3 | [] | no_license | <?php
//Carga datos del archivo JSON
$archivo = "data.json";
$datos = file_get_contents($archivo);
//--------- Punto1: Trae todos las propiedades: ----------------------------------
if($_POST["_peticion"] == "mostrarTodo")
{
echo $datos;
}
// --------- Punto 2: Carg... | true |
0836a3adbcd86b64586a70727f7b6a778413fc21 | PHP | Juliojcjc1/TrabNego | /logingeral.php | UTF-8 | 228 | 2.5625 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<?php
$nome = $_GET["uname"];
$senha = $_GET["psw"];
if (($nome =="admin")&&($senha == "123")) {
echo "Logado";
}else{
echo "Não Logado";
}
?>
<body>
</body>
</html> | true |
efcf1e4a398aa00c868a7043d1369688bc1c11ac | PHP | guoyu07/yii1-plane | /weihg/protected/controllers/TminusController.php | UTF-8 | 2,352 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* 婚礼倒计时
* @time(2015-02-09)
* @author [chan] <[429140141]>
*/
class TminusController extends Controller
{
/**
* Declares class-based actions.
*/
public function actions()
{
return array(
// captcha action renders the CAPTCHA image displayed on the contact page
'captcha'=>array(
'class'... | true |