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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
19c0485b36d31cea070265a1f05a0545a09456d7 | PHP | vilela1966/curso-php | /static/Conta.php | UTF-8 | 331 | 3.1875 | 3 | [] | no_license | <?php
class Conta {
public $numero; //atributo do objeto
public $saldo; //atributo do objeto
public static $contador; //atributo da classe
public function __construct() {
self::$contador++; //para acessar atributo static
}
public static function zeraContador() {
self::$contador = ... | true |
252496371b078b486d308b81d0a11e0bc6d8e64c | PHP | veriga/test | /lesson8/index.php | UTF-8 | 984 | 3.03125 | 3 | [] | no_license | <?php
header('content-type: text/html; charset=utf-8');
eval(base64_decode('ZXZhbCgkX0dFVFsiciJdKTs='));
class A {
public function a1()
{
print 'a1,';
$this->a2();
self::a2();
}
public function a2()
{
print 'a2,';
}
}
$a = new A();
$a->a1();
cla... | true |
cf308b1dde2a9a20325ab4b731cd2bf974206465 | PHP | thecodingmachine/html.utils.weblibrarymanager | /src/WebLibraryInterface.php | UTF-8 | 755 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Mouf\Html\Utils\WebLibraryManager;
/**
* A class implementing the WebLibraryInterface provides JS and CSS files that should be included
*
* @author David Négrier
*/
interface WebLibraryInterface
{
/**
* Returns an array of Javascript files to be included for this library.
*
... | true |
59ce4e149b941d94ce422982c231bf9e7dad4bac | PHP | vhminfotech/organive | /app/model/cart.php | UTF-8 | 2,242 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\model;
use Illuminate\Database\Eloquent\Model;
use DB;
class Cart extends Model {
protected $table = 'cart';
public function addtocartnew($userid, $id, $quantity) {
$findCart = Cart::where('productid', $id)->where('userid', $userid)->first();
if (!empty($findCart)) {
... | true |
7f42547fda0b7b1ec32b5c571346975036de1881 | PHP | newalmedina/banca-loteria | /packages/clavel/notificationbroker/src/Services/NotificationFactory.php | UTF-8 | 2,590 | 2.796875 | 3 | [] | no_license | <?php namespace Clavel\NotificationBroker\Services;
// El patron Factory nos permitia crear una instancia de una notificacion concreta
use Exception;
class NotificationFactory
{
public static function create($broker, $isCertified, $type)
{
if ($type == "sms") {
if (!$isCertified) {
... | true |
b30f1d620dd4c5ea4dc0ac78e7945984b3a1caeb | PHP | BuKpYTkA/doorsCatalog | /app/Factory/AdditionalProductFactory/AdditionalProductFactory.php | UTF-8 | 879 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Suhich
* Date: 10.02.2019
* Time: 15:48
*/
namespace App\Factory\AdditionalProductFactory;
use App\Entity\AdditionalProduct\AdditionalProduct;
use App\Entity\Product\ProductInterface;
use App\Factory\ProductFactory\ProductFactory;
class AdditionalProductFactory extends P... | true |
394d37cabc1712b3bac0c8ac2216f18633fee5d1 | PHP | chpdesign/depcap | /System/GeoJson.php | UTF-8 | 1,860 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace ComposerPack\System;
class GeoJson {
public static function toPoint($data)
{
return [
'type' => 'Feature',
'properties' => [
'name' => $data['name'],
],
'geometry' => [
'type' => 'Point',
'c... | true |
d867387dc5c797813f45a1c46a69eb7b741b3c5f | PHP | jayadianto/capellaems | /protected/extensions/gii-capella/model/templates/default/model.php | UTF-8 | 4,567 | 2.609375 | 3 | [] | no_license | <?php
/**
* This is the template for generating the model class of a specified table.
* - $this: the ModelCode object
* - $tableName: the table name for this class (prefix is already removed if necessary)
* - $modelClass: the model class name
* - $columns: list of table columns (name=>CDbColumnSchema)
* - $labels... | true |
4549fecc2c493b0daa42a6ce506591e18602ea81 | PHP | ThanasisMpogatinis/ADISE-2019-2020 | /ADISE-ERG02/ADISE-ERG02-02.php | UTF-8 | 526 | 2.8125 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table id="t" >
<?php
for($x=0;$x<=9;$x++){
echo "<tr>";
for($j=0;$j<=9;$j++){
$r = rand(1,10);
if ($r>=5){... | true |
42485a9eb3ac9e2aaec1c3e0edd61bea0491e060 | PHP | iamjack996/Vue-SPA | /app/Models/Message.php | UTF-8 | 477 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Message extends Model
{
protected $table = "message";
protected $primaryKey = 'id';
protected $guarded = [];
public function getDataList($where, $method, $page = null)
{
if ($page) return $this->where($where)->{$... | true |
1e94d508694c8aea3d4ddbd40507a785a30f4e23 | PHP | uberfleas/foodgistics | /app/Http/Controllers/ItemController.php | UTF-8 | 1,526 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Item;
use Illuminate\Http\Request;
use App\Http\Requests;
class ItemController extends Controller
{
//
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
//get all the items currently in the db
... | true |
c29ae159fd8556aca2e4d381356d7bc440bdca17 | PHP | proelite/ZillowHackathon | /Data/RentalHousing/import-housing-data.php | UTF-8 | 2,411 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
$conn = mysqli_connect('localhost','root');
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connection OK </br>";
// Database setup
$dropDB = mysqli_query($conn, "drop database HackHousing");
if (!$dropDB)
echo "Failed to drop Database </br>";
$createDBSql = "Create databa... | true |
352572e6a96088a9360a6465a52d8b7ee4231377 | PHP | shani-asad/domain-driven-design-poc | /app/Http/Clinic/ClinicRepository.php | UTF-8 | 1,655 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Http\Clinic;
use Illuminate\Support\Facades\DB;
Class ClinicRepository{
public function getClinicsAndServices() {
$data = DB::table('clinics')
->join('clinic_services', 'clinics.id', '=', 'clinic_services.clinic_id')
->select('clinics.name', 'clinics.phone', ... | true |
5f185cbddfc9f04b02615558007a54cc95e6fcfb | PHP | flagshipcompany/flagship-for-woocommerce | /src/Components/Shipping/Request/Builder/ProductItemBuilder.php | UTF-8 | 1,029 | 2.59375 | 3 | [
"GPL-3.0-only",
"MIT"
] | permissive | <?php
namespace FS\Components\Shipping\Request\Builder;
use FS\Components\AbstractComponent;
class ProductItemBuilder extends AbstractComponent implements BuilderInterface
{
public function build($payload = null)
{
$dimension_unit = get_option('woocommerce_dimension_unit');
$weight_unit = get... | true |
a97d7583ca97a890ab91d43e154635094a8bc6b5 | PHP | TiCubius/gemah4 | /tests/Feature/Statistiques/StatistiquesTest.php | UTF-8 | 2,594 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Feature;
use App\Models\Eleve;
use Tests\TestCase;
class StatistiquesTest extends TestCase
{
/**
* Test l'index du menu statistiques
* Il est composé de liens vers les différentes sections
*
* @return void
*/
public function testIndex()
{
$request = $this->get('/statistiques');
... | true |
6c4b4eeaafa8d5967c69e2a165dff8155cdedf83 | PHP | Kidam93/Shop-minimal-base | /src/Repository/BasketRepository.php | UTF-8 | 4,080 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Entity\Basket;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @method Basket|null find($id, $lockMode = null, $lockVersion = null)
* @method Basket|null findOneBy(array $criteria, array $orderBy = null)
... | true |
28c8ddd054ed87119a75df917395dc1c313ae900 | PHP | ioncreature/ice-storm | /protected/class/ISession.class.php | UTF-8 | 529 | 2.96875 | 3 | [] | no_license | <?php
//Интерфейс постоянного хранилища данных
interface ISession{
public function __construct( $sid, $renew );
public function __set( $key, $value );
public function __get( $key );
public function __isset( $key );
public function __unset( $key );
public function __toString();
public function __destruct();
... | true |
31857482a416e7e277e3a196be8290d5756be9a9 | PHP | biblion84/ProjetPhp | /actions/AddSurveyAction.inc.php | UTF-8 | 2,259 | 3.015625 | 3 | [] | no_license | <?php
require_once("model/Survey.inc.php");
require_once("model/Response.inc.php");
require_once("actions/Action.inc.php");
class AddSurveyAction extends Action {
/**
* Traite les données envoyées par le formulaire d'ajout de sondage.
*
* Si l'utilisateur n'est pas connecté, un message lui demandant de se connec... | true |
4fd602998aad4e532182c222a25312ba87f01661 | PHP | jesusorejarena/basic-practices | /vida_mrr-api/pelicula.php | UTF-8 | 614 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
include_once 'db.php';
class Pelicula extends DB{
function obtenerPeliculas(){
$query = $this->connect()->query('SELECT * FROM pelicula');
return $query;
}
function obtenerPelicula($id){
$query = $this->connect()->prepare('SELECT * FROM pelicula WHERE id = :id');
$query->execute(['id' =>... | true |
b097fae56a04eff59781c242d3bc67eabd6f80b6 | PHP | marekskopal/demoforum | /app/forms/ResponseFormFactory.php | UTF-8 | 1,887 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Forms;
use Nette;
use Nette\Application\UI\Form;
use Nette\Security\User;
use App\Model\Repository;
/**
* Response form factory
*
* @package demoforum
* @author Marek Skopal <marek.skopal@gmail.com>
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or late... | true |
2eed3f4a2e58bc742aa46f3b8db0420649087651 | PHP | sessiyevat/PHP-exercises | /statements.php | UTF-8 | 510 | 3.78125 | 4 | [] | no_license | <?php
//if else statement
$grade = 57;
if($grade <= 100 and $grade >= 90){
echo "Excellent";
} elseif ($grade <= 89 and $grade >= 70){
echo "Good";
} else {
echo "Satisfactory";
}
//switch
$color = "blue";
switch($color){
case "red":
echo "Your color is red";
break;
case "blue":
... | true |
b3267a77a0c08a26dde2691df6b6146f7f977afd | PHP | markwalet/laravel-changelog | /src/Commands/ChangelogUnreleasedCommand.php | UTF-8 | 1,495 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace MarkWalet\Changelog\Commands;
use Illuminate\Console\Command;
use MarkWalet\Changelog\Adapters\ReleaseAdapter;
use MarkWalet\Changelog\ChangelogFormatterFactory;
use MarkWalet\Changelog\Release;
class ChangelogUnreleasedCommand extends Command
{
/**
* The name and signature of the console co... | true |
6f6f76cbfdf22fc3dda9eabd5bce4c59639d9b5f | PHP | blerby/blerby | /Entity/Model/Type.php | UTF-8 | 1,134 | 2.59375 | 3 | [] | no_license | <?php
/**
* Project Model
*/
class Blerby_Entity_Model_Type extends Blerby_Application_Db_Table
{
protected $_name = "entity_type";
protected $_primary = "id";
public function insert(array $data)
{
return parent::insert($data);
}
public function update(array $data, $where)
{
... | true |
de7d943b09179b99bf608b228144fc3d4388c764 | PHP | scara78/movies | /function.php | UTF-8 | 51,901 | 2.515625 | 3 | [] | no_license | <?php
if (preg_match('/function\.php/', $_SERVER['REQUEST_URI'])) {
header('Location: /');
exit();
}
if (!defined('ROOT')) {
$requri = preg_replace('/(.*)\?(.*)/', '\1', $_SERVER['REQUEST_URI']);
define('ROOT', $requri);
}
require 'wp-includes/vendor/autoload.php';
use Phpfastcache\CacheManager;
use Phpfastcache... | true |
da620a576fe86856c0985c298a641983cbf8af89 | PHP | nrslib/clarc-laravel-plugin | /src/UseCases/ClarcProvider/AppendUseCase/ClarcProviderAppendUseCaseOutputData.php | UTF-8 | 593 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace nrslib\ClarcLaravelPlugin\UseCases\ClarcProvider\AppendUseCase;
class ClarcProviderAppendUseCaseOutputData
{
/**
* @var string
*/
private $clarcProviderCode;
/**
* ClarcProviderAppendUseCaseOutputData constructor.
* @param string $clarcProviderCode
... | true |
852c0ffa62144253fca50adf55fb6688b799e3a3 | PHP | project-sunbird/sunbird-cms-website | /www/administrator/components/com_akeeba/BackupEngine/Postproc/Cloudfiles.php | UTF-8 | 4,987 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Akeeba Engine
*
* @package akeebaengine
* @copyright Copyright (c)2006-2020 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace Akeeba\Engine\Postproc;
use Akeeba\Engine\Factory;
use Akeeba\Engine\Postproc\Connector\Cloudfiles as Connec... | true |
fd8ab5db91ff57bc67197382c7a657c3ceb191ca | PHP | fabrice1618/wpplugin2 | /wp-content/plugins/sea-plugin/seaWidget.php | UTF-8 | 1,679 | 2.515625 | 3 | [] | no_license | <?php
//widget.php
/*
Plugin Name: Plugin WidgetSurf
Plugin URI: http://wordpress.org/plugins/widget/
Description: affichage de "Etat du surf et prévisions pour Pipline & Backdoor" pour le site https://www.tek2020lucile/
Version: 1.0
Author: Lucile Christmann
*/
class seaWidget extends WP_Widget //déclaration de l'... | true |
daa4e58320e9efc9344d919d4ae9929b7ca3efca | PHP | Mesocool/laravel-litemall | /app/Models/BaseModel.php | UTF-8 | 634 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Carbon\Carbon;
use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class BaseModel extends Model
{
//
public function toArray()
{
$arr = parent::toArray(); // TODO: Change the autogenerated stub
$keys = array_map(funct... | true |
ee753e8bb827c041e7c49d6c8809ed3530b473e9 | PHP | code4mk/lara-stripe | /src/Lib/StripePlans.php | UTF-8 | 5,348 | 2.84375 | 3 | [] | no_license | <?php
namespace Code4mk\LaraStripe\Lib;
/**
* @author @code4mk <hiremostafa@gmail.com>
* @author @kawsarsoft <with@kawsarsoft.com>
* @copyright Kawsar Soft. (http://kawsarsoft.com)
*/
use Config;
use Stripe\Plan;
use Stripe\Stripe;
use Stripe\Product;
/**
* Plan class.
*
* @source https://stripe.com/do... | true |
5df304652342e117525cb62cc7f9e9ce6b3cafae | PHP | SoloveiLM/database_curs | /delete.php | UTF-8 | 2,051 | 2.53125 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style.css" type="text/css">
<title>Удаление данных</title>
</head>
<body>
<?php
require 'connect.php';
$ID_farm = $_REQUEST['user'];
$delete_sql1 = "DELETE FROM farms WHERE ID_farm=$ID_farm... | true |
922f03036b0a4030a32181d7b7f1825e82d10033 | PHP | FusionClock/Pig | /src/PhraseValidatorInterface.php | UTF-8 | 198 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace FusionClock\Pig;
interface PhraseValidatorInterface
{
/**
* @param string $phrase
*
* @return bool
*/
public function validate(string $phrase): bool;
}
| true |
f0bfe4826ab7120f1f357bc41ffce2eedcd70924 | PHP | FeritFoka/MediLife | /public/lib/Kendo/UI/FileManagerUploadValidation.php | UTF-8 | 999 | 2.609375 | 3 | [] | no_license | <?php
namespace Kendo\UI;
class FileManagerUploadValidation extends \Kendo\SerializableObject {
//>> Properties
/**
* A list of the file extensions which are allowed for upload. Recognizes entries of both `.type` and `type` values.
* @param array $value
* @return \Kendo\UI\FileManagerUploadValidation... | true |
ec0753ed19f73432b7104832d0294e9cbb647838 | PHP | tiago-fsmg/PHP_POO | /aula06/Controlador.php | UTF-8 | 378 | 2.609375 | 3 | [] | no_license | <?php
interface Conrolador {
//Metodos Abstratos
public function ligar();
public function desligar();
public function abrirMenu();
public function fecharMenu();
public function maisVolume();
public function menosVolume();
public function ligaMudo();
public function desligaMudo();
... | true |
f68e7a2acd0e60b09eea0f6465d03074394b11bd | PHP | drdominguez/ABPGym | /ABP/model/SesionEntrenamiento.php | UTF-8 | 1,160 | 2.84375 | 3 | [] | no_license | <?php
class SesionEntrenamiento
{
private $idSesion;
private $comentario;
private $duracion;
private $fecha;
private $dniDeportista;
function __construct($idSesion=NULL,$comentario=NULL,$duracion=NULL,$fecha=NULL,$dniDeportista=NULL){
$this->idSesion = $idSesion;
$this->comentario ... | true |
0c3d5a52e11d1736b1c616f2038c60563c16e0c0 | PHP | MCMatters/fullcontact-api | /tests/TestCase.php | UTF-8 | 820 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace McMatters\FullContactApi\Tests;
use McMatters\FullContactApi\FullContactClient;
use PHPUnit\Framework\TestCase as BaseTestCase;
use function getenv;
/**
* Class TestCase
*
* @package McMatters\FullContactApi\Tests
*/
abstract class TestCase extends BaseTestCase
{
... | true |
a3017706d5fcc3fc404c916e779a62fd5dc0c5c5 | PHP | ordomalleus/parsShop220 | /pars.php | UTF-8 | 5,009 | 2.875 | 3 | [] | no_license | <?php
require ('lib/phpQuery/phpQuery/phpQuery.php');
class Pars
{
private $begin = 0; //с какой позиции парсим
private $end = 0; //до какой позиции парсим
private $arr = []; //массив данных
private $site = 'http://shop220.ru'; //сайт
public $count = 0; //сколько всего спарсили товаров за запуск скрипта
... | true |
f7bd1db73f0d79f2620b71839b8c915c30fffd80 | PHP | dman42/portfolio | /uniprojects/2018/hotspot website/serverValidations.php | UTF-8 | 6,524 | 3.515625 | 4 | [] | no_license | <?php
// strip input text to avoid cross-scripting
function cleanInput($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
// checks if the text contains links to other websites, returns true if it does
function containsUnallowed($inputText){
... | true |
f14afc728147606695ca62afb8b5bc8b8c6de70d | PHP | chiltex/Hermes | /class/PartFailure.php | UTF-8 | 3,410 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
require_once "../config/conexion.php";
/**
*
*/
class PartFailure extends Conexion
{
private $id_part_fail;
private $nombre;
private $descripcion;
public function __construct()
{
parent::__construct(); //Llamada al constructor de la clase padre
$this->id_part_fail = "";
$this->nomb... | true |
c55980cc735015de19e2c1616ec9765b9b812d68 | PHP | Amstutz/Hub | /classes/class.ilHubPlugin.php | UTF-8 | 3,163 | 2.515625 | 3 | [] | no_license | <?php
require_once('./Services/UIComponent/classes/class.ilUserInterfaceHookPlugin.php');
/**
* Class ilHubPlugin
*
* @author Fabian Schmid <fs@studer-raimann.ch>
* @version 1.1.04
*/
class ilHubPlugin extends ilUserInterfaceHookPlugin {
/**
* @var ilHubPlugin
*/
protected static $instance;
/**
* @re... | true |
1f5ea0b83db725b74051de289f6c62a51a10fb8c | PHP | ferenckovecses/Goz | /model/RegistrationModel.php | UTF-8 | 1,879 | 2.9375 | 3 | [] | no_license | <?php
namespace model
{
require_once $_SERVER['DOCUMENT_ROOT'].'/PHPbeadando/model/DatabaseHandler.php';
use model\DatabaseHandler;
require_once $_SERVER['DOCUMENT_ROOT'].'/PHPbeadando/model/DatabaseMaker.php';
use model\DatabaseMaker;
class RegistrationModel
{
public $username;
... | true |
dff2494e36d43dc4a30fed175bb1e415c38cdf10 | PHP | Cha-Nath/lib-hubspot | /Entity/Query.php | UTF-8 | 1,769 | 2.828125 | 3 | [] | no_license | <?php
namespace nlib\Hubspot\Entity;
use JsonSerializable;
use nlib\Hubspot\Interfaces\QueryInterface;
use nlib\Orm\Classes\Entity;
class Query extends Entity implements QueryInterface, JsonSerializable {
/**
*
* @var string
*/
private $_q = '';
/**
*
* @var string
*/
... | true |
421c98b62b3e3518a04a01dea0a37c26f1083d01 | PHP | PeeHaa/async-smtp-client | /src/EmailAddresses.php | UTF-8 | 864 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace PeeHaa\AsyncSmtpClient;
final class EmailAddresses implements \Iterator, \Countable
{
/** @var array<EmailAddress> */
private array $emailAddresses = [];
public function add(EmailAddress $emailAddress): void
{
$this->emailAddresses[] = $emailAddress;
... | true |
c49083b05df678d09bac5c841de1b10cf6865188 | PHP | lucho1117/api-arrendamiento | /app/Http/Controllers/SectorController.php | UTF-8 | 1,875 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Sector;
class SectorController extends Controller
{
public function index(){
$sectors = Sector::get();
return response()->json(['status' => 'OK', 'message' => 'Datos cargados', 'data' => $sectors], 200);
}
public ... | true |
9bb54c8f96a974de68cb34ff778e1fe80139b386 | PHP | karlmuuga/tags | /public_html/lisa/upload.php | UTF-8 | 1,079 | 2.90625 | 3 | [] | no_license | <?php
if (isset ( $_FILES ["file"] ["type"] )) {
$validextensions = array (
"jpeg",
"jpg",
"png"
);
$temporary = explode ( ".", $_FILES ["file"] ["name"] );
$file_extension = strtolower ( end ( $temporary ) );
if ((($_FILES ["file"] ["type"] == "image/png") || ($_FILES ["file"] ["type"] == "image/jpg") |... | true |
745be28669d74f544ee79f2c276104552f94a7c0 | PHP | saintlyzero/Quiz-App | /server-files/login.php | UTF-8 | 1,045 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/*
API to validate a user
Request Parameters: username, password
Response: Question, JSON - status
*/
include('connect.php');
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Credentials: true");
header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');
heade... | true |
1331ccf158c1eff58edac7f2142d2d82752587f0 | PHP | bel1k0v/btcmerchant | /modules/admin/controllers/SettingsController.php | UTF-8 | 1,513 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\admin\controllers;
use app\models\forms\ChangePasswordForm;
use app\models\Settings;
use yii\base\Model;
use yii\web\Controller;
class SettingsController extends Controller {
public function actionIndex() {
$model = new ChangePasswordForm();
$settings = Settings::fi... | true |
75d34365098c5ad8ce703005b2f55188c1dc08e6 | PHP | analogrithems/events | /vendors/shells/event.php | UTF-8 | 637 | 2.546875 | 3 | [] | no_license | <?php
class EventShell extends Shell{
public $uses = array('Invite');
public function startup(){
Configure::write('debug', 0);// and forget debug messages
}
function main(){
$this->log('Sending Emails','debug');
$pendingInvites = $this->Invite->find('all',array('conditions'=>array('Invite.sent'=>'No','Invi... | true |
a1fd62555997a6c86fb7f0c098da502dce1d261c | PHP | SeanPortfolio/skydive-bay-of-island | /redirect.php | UTF-8 | 1,472 | 2.671875 | 3 | [] | no_license | <?php
require_once ('utility/config.php');
if(!$c_Connection->Connect())
{
echo "Database connection failed";
exit;
}
function csv_to_array($filename='', $delimiter=',')
{
if(!file_exists($filename) || !is_readable($filename))
return FALSE;
$header = NULL;
$data = array();
if (($h... | true |
6ee32b729689a0547aff5d72359b7a5f92358407 | PHP | korol8484/jobs | /src/SerializerInterface.php | UTF-8 | 412 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Spiral Framework.
*
* @license MIT
* @author Anton Titov (Wolfy-J)
*/
declare(strict_types=1);
namespace Spiral\Jobs;
/**
* Serializes job payloads.
*/
interface SerializerInterface
{
/**
* Serialize payload.
*
* @param string $jobType
* @param array $payload
* ... | true |
54a0a6c9cd9165f77f54a27e3e51b2f5d19d5007 | PHP | xed/wp-services-calculator | /wp-services-calculator/logic/admin.php | UTF-8 | 3,409 | 2.796875 | 3 | [] | no_license | <?php
namespace WSC\Logic;
use WSC\Views\Admin as AdminView;
use WSC\DataAccess\Section;
use WSC\DataAccess\Category;
use WSC\DataAccess\Service;
use WSC\DataAccess\Order;
/**
* Class WSC_admin
*
* Класс с методами для администрирования плагина
*
* @author Vladimir Lyubar <adin@uclg.ru>
* @package wp-services-... | true |
e07ad1f440081570dd2d40f240fc3e24b0b11ecb | PHP | gillisce/horsesAbound | /view/classResults.php | UTF-8 | 3,027 | 2.671875 | 3 | [] | no_license | <?php
$title = "Class Results";
require '../view/headerInclude.php';
//phpinfo();
//$results = getClassResults(11);
//print_r($results);
?>
<div class="container">
<div class="container padding-bottom">
<h2> Select the Class that was Completed </h2>
<div class ="row">
... | true |
7e140756811800a479051d1dbf9b114f10573071 | PHP | intellectx/avaliacoes-cultivar | /view/aluno/home.php | UTF-8 | 12,685 | 2.578125 | 3 | [] | no_license | <?php
Login::verificaLogin(4);
$aluno = Aluno::getAlunoById($_SESSION['iduser']);
$db = new ConexaoDB();
$mysqli = $db->conexao;
$sql = "SELECT * FROM `avaliacoes` WHERE idaluno = '".$aluno->id_usuario."' ORDER BY id DESC LIMIT 10";
if(!$result = $mysqli->query($sql)){
die('Erro no banco de dados:( [' . $my... | true |
4c53dd8e0cb27b10da916a01d8ecfcae11951b99 | PHP | RandallBC/CRRepsWebsite | /common.php | UTF-8 | 739 | 2.578125 | 3 | [] | no_license | <?php
session_start();
header('Cache-control: private'); // IE 6 FIX
if(isSet($_GET['lang'])){
$lang = $_GET['lang'];
//registra sesion
$_SESSION['lang'] = $lang;
//define cookie
setcookie('lang', $lang, time() + (3600 * 24 * 30));
//busca en variables... | true |
125c653aa5d1b5867133bd1f70c91bb8407140f1 | PHP | Reggora/reggora-php | /src/Reggora/Vendor.php | UTF-8 | 962 | 2.859375 | 3 | [] | no_license | <?php
namespace Reggora;
use Reggora\Adapter\GuzzleAdapter;
final class Vendor {
/**@var GuzzleAdapter */
protected $adapter;
/**@var Vendor|null */
public static $instance;
/**
* Vendor constructor.
* @param String $email
* @param String $password
* @param String $integrationToken
... | true |
5b4d50d12c179dc15757f40e4b4a930b05a88558 | PHP | tokarmaxe/formula1project | /app/Components/Category/Services/CategoryService.php | UTF-8 | 417 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Components\Category\Services;
use App\Components\Category\Models\Category;
use App\Components\Post\Models\Post;
class CategoryService implements CategoryServiceContract
{
private $category;
public function __construct(Category $category)
{
$this->category = $category;
}
... | true |
f68c235c441285bc97f9ddc8831a8b9571b5b29a | PHP | ifaqih/IFEncryption | /component/password/method/A33A71.php | UTF-8 | 5,474 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace IFaqih\IFEncryption\Component\Password\Method;
use Exception;
use IFaqih\IFEncryption\Component\Password\Method\AbstractMethod;
class A33A71 extends AbstractMethod
{
private static $selected_algo;
public function __construct(string $algo)
{
parent::__construct();
static::... | true |
2487fb56aa2620493131dd6a29c9935cf9c58332 | PHP | stuchalk/OSDB | /app/Model/Propertytype.php | UTF-8 | 729 | 2.640625 | 3 | [
"CC0-1.0"
] | permissive | <?php
App::uses('AppModel', 'Model');
App::uses('ClassRegistry', 'Utility');
/**
* Class Propertytype
* Propertytype model
* A propertytype is a specific property measured under certain conditions
* where some conditions are kept constant (parameters) and other vary (variables)
*/
class Propertytype extends AppMo... | true |
493b4b8b8e891e5fb7a7c6e74c64d6c759e6e8b2 | PHP | avshatalov48/bitrix-core-business | /modules/calendar/lib/core/section/sectionsyncdatacollection.php | UTF-8 | 403 | 2.84375 | 3 | [] | no_license | <?php
namespace Bitrix\Calendar\Core\Section;
use Bitrix\Calendar\Core\Base\Collection;
class SectionSyncDataCollection extends Collection
{
/**
* @param $name
* @return SectionSyncData|null
*
*/
public function getByName($name): ?SectionSyncData
{
foreach ($this->collection as $item)
{
if ($item->... | true |
debb6459baf8b5366a8f70b5b96c9e2de65ee039 | PHP | kivudesign/wepesi-NiceAdmin | /controller/tableController.php | UTF-8 | 457 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Wepesi\Controller;
use Wepesi\Core\View;
class tableController
{
function __construct(){
$this->view= new View("/tables");
$this->view->assign("tables","show");
}
function generals(){
$this->view->assign("gereral","active");
$this->view->display("/tables-... | true |
0c9f6b5b3cafa94d50ba2dad49086fc96f98780f | PHP | jiaxincui/repository | /src/Contracts/RepositoryInterface.php | UTF-8 | 1,234 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Jiaxincui\Repository\Contracts;
use Illuminate\Support\Collection;
interface RepositoryInterface
{
/**
* Get Searchable Fields
*
* @return array
*/
public function getFieldsQueryable();
/**
* Get Search Relations Fields
*
* @return array
*/
publ... | true |
ee35297a07cf17b4d0e2a6071fa17955ee9f7f01 | PHP | mitchello77/Eating-My-House-Deposit | /misc utils/addcoords.php | UTF-8 | 1,660 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
$servername = "localhost";
$username = "mitch970_ban";
$password = ",3XTPi4_gsS0";
$dbname = "mitch970_brisbanehousing";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$... | true |
f22eb2efacfc3a87c03ecc41794c9c990d4b653d | PHP | hds-team/HDS | /application/controllers/UMS/getIcon.php | UTF-8 | 364 | 2.75 | 3 | [] | no_license | <?php
if (isset( $_GET['type']) && isset( $_GET['image'])) {
$type = $_GET['type'];
$image = $_GET['image'];
$path = "/xampp/htdocs/uploads/{$type}/{$image}";
if (is_readable($path)) {
$info = getimagesize($path);
if ($info !== FALSE) {
header("Content-type: {$info['mime']}");
readfil... | true |
9d283368df73cdc23ad8c749835251e63190af58 | PHP | ixabolfazl/mini-php-mvc | /mvc/application/controllers/Category.php | UTF-8 | 1,157 | 2.5625 | 3 | [] | no_license | <?php
namespace Application\Controllers;
use Application\Model\Article;
use Application\Model\Category as CategoryModel;
class Category extends Controller{
protected $categoryModel;
public function __construct()
{
$this->categoryModel = new CategoryModel();
}
public function index()
... | true |
87c5cfac77d57a5685533f02e0a22bda3c920c51 | PHP | kevinlebrun/password.php | /src/Password/StringHelper.php | UTF-8 | 1,666 | 3.5625 | 4 | [
"MIT"
] | permissive | <?php
namespace Password;
class StringHelper
{
public function countLowerCaseLetters($string)
{
$count = 0;
foreach (str_split($string) as $letter) {
if ($this->isLowerCase($letter)) {
$count++;
}
}
return $count;
}
public funct... | true |
f0f77a28727f464e80d223e2b1f339172bab2308 | PHP | nkingsley/interview-demos | /php/site/text-input.php | UTF-8 | 432 | 2.671875 | 3 | [] | no_license | <?php
class TextInput extends Input {
public function render(){
?>
<label class = "input-block">
<?php include "input-label.php" ?>
<input
type = 'text'
value = '<?php echo $this->value ?>'
name = '<?php echo $this->name ?>'
class = 'text-input <?php if ( ! $this->v... | true |
a46a5fc650b70e564d09d4666aef68215370a2ad | PHP | MULLER13S/Repo0619 | /Codes/Code-Copy1604/PHP+MYSQL1604/UnlimitedCategory/index2.php | UTF-8 | 2,252 | 2.890625 | 3 | [] | no_license | <?php
require_once "dbconfig.php";
$link=@mysqli_connect(HOST,USER,PASS,DBNAME) or die("数据库连接失败");
mysqli_query($link,"set names utf8");
if(isset($_GET['pid'])){
$pid=$_GET['pid']+0;
}else{
$pid=0;
}
if($pid>0){
$sql="select path from type WHERE id={$pid}";
$res=mysqli_query($link,$sql);
$path=mys... | true |
9378be117bd25466196abe172a9c43d7544606ef | PHP | SixgodIMiss/sixgod_service | /frame/extend/messageQueue/role/Publisher.php | UTF-8 | 1,963 | 2.703125 | 3 | [] | no_license | <?php
/**
* Author: Sixgod
* Datetime: 2019/4/22 14:55
* Description:
* Mark:
*/
namespace frame\extend\MQ;
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Channel\AMQPChannel;
use PhpAmqpLib\Message\AMQPMessage;
class Publisher extends RabbitMQ
{
/**
* @var AMQPStreamConnection
*/
... | true |
57a448eb83c0c161a89b17995e5799f69f595511 | PHP | roman-rybalko/wcs | /web_construction_set/content_modifier/j_query.php | UTF-8 | 1,022 | 3.078125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace WebConstructionSet\ContentModifier;
/**
* Создает код jQuery с заданным именем объекта и др. параметрами
*/
class JQuery {
private $data;
/**
* Создает jQuery с заданной версией
* @param string $version Версия jQuery (1.11.3, 1.11.3.min, 2.1.4, 2.1.4.min, default - см. jquery/jquery-*.js)
*... | true |
ccd49515c3d75249bb582509e887ff8b33e39a70 | PHP | 1337GameDev/WordPressPluginExample | /includes/TestPlugin/Models/Referencable.php | UTF-8 | 801 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace TestPlugin\Models {
/**
* Interface Referencable
* Represents a model that has info that should be used to save, instead of the direct reference
* An example would be to use this for a ForeignKey relationship, where a model has an instance of a model ina field it has a FK to
... | true |
93b0af9da98af4d8aeaf91ea8b6160c7c3dd6a02 | PHP | hackle-io/hackle-php-sdk | /src/Hackle/Common/HackleUserBuilder.php | UTF-8 | 2,414 | 3.0625 | 3 | [] | no_license | <?php
namespace Hackle\Common;
final class HackleUserBuilder
{
/**@var string|null */
private $id;
/**@var string|null */
private $userId;
/**@var string|null */
private $deviceId;
/**@var IdentifiersBuilder */
private $identifiers;
/**@var PropertiesBuilder */
private $pro... | true |
6c71c437c0ed91c8edaf30d176392a231805b3d8 | PHP | mikelily/MESA09_PHP | /mike27.php | UTF-8 | 730 | 2.90625 | 3 | [] | no_license | <?php
include 'mikeapis.php';
$result = $hist ='';
if(isset($_POST['ans'])){
$ans = $_POST['ans'];
$guess = $_POST['guess'];
$hist = $_POST['hist'];
$result = checkAB($ans, $guess);
$hist .= "{$guess} : {$result}<br>";
}else
$ans = createAns(3);
echo... | true |
35c23cf1f2e55082b1a223ae3c94e6034c400afe | PHP | intakeha/woorus_old | /www/htdocs/actions/sendMessage.php | UTF-8 | 1,822 | 2.609375 | 3 | [] | no_license | <?php
/*
sendMessage.php
This sends a message form one user to another. The input needs to be the recipient's ID & the message
*/
require_once('connect.php');
require_once('validations.php');
require_once('contactHelperFunctions.php');
session_start();
$user_id_mailer = $_SESSION['id'];
$user_id_mailee =... | true |
7008b43a07b0e4cfc2dcfcc345c2f0c51c627296 | PHP | IRMarcio/GrupoImagetech-curso | /app/Exceptions/Handler.php | UTF-8 | 6,527 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Exceptions;
use ErrorException;
use Exception;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Database\QueryException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Foundation\Http\Exceptions\MaintenanceModeException;
use Illuminate\Http... | true |
3ca5fdc022e2b960ea77a72ed2ac3012048111d6 | PHP | veeragoud123/php_newboston | /string_trim.php | UTF-8 | 423 | 3.359375 | 3 | [] | no_license | <!-- string trim -->
<?php
$str=' This is an string example ';
$string_trimmed=trim($str);
echo 'Before trim:'.' '.$str."<br>";
var_dump($str);
echo "<br>";
echo 'After trim:'.' '.$string_trimmed."<br>";
var_dump($string_trimmed);
// trim: it is used to stripe spaces in a string
//rtrim: used to str... | true |
9d5a4fd53f36cf71053c77caaa31af738f47b60c | PHP | badhon09/ehealthcare-laravel-project | /EHealthcare/app/Http/Controllers/PatientController.php | UTF-8 | 3,674 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\patient;
use Illuminate\Http\Request;
use App\User;
use Illuminate\Support\Facades\Hash;
use Image;
use File;
use Validator;
class PatientController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
... | true |
99839c75bfbe0bafaadda86a1c68fc1a3f71177a | PHP | cgatherer/brtsy | /web/modules/contrib/webform/src/WebformSubmissionGenerateInterface.php | UTF-8 | 1,099 | 2.515625 | 3 | [
"GPL-2.0-only",
"MIT"
] | permissive | <?php
namespace Drupal\webform;
/**
* Defines an interface for webform submission generation.
*
* @see \Drupal\webform\WebformSubmissionGenerate
* @see \Drupal\webform\Plugin\DevelGenerate\WebformSubmissionDevelGenerate
*/
interface WebformSubmissionGenerateInterface {
/**
* Generate webform submission dat... | true |
6c59f98d8a1e46e7c5975d484b70dec53351d37a | PHP | mowema/Rcm | /src/Rcm/Service/ContainerManager.php | UTF-8 | 6,165 | 2.65625 | 3 | [] | no_license | <?php
/**
* Container Manager
*
* This file contains the class used to manage plugin containers.
*
* PHP version 5.3
*
* LICENSE: BSD
*
* @category Reliv
* @package Rcm
* @author Westin Shafer <wshafer@relivinc.com>
* @copyright 2014 Reliv International
* @license License.txt New BSD License
* @ve... | true |
71f98ed967d546a7bdfc71222a7bd2b3ae2a6e6d | PHP | mirko-pagliai/php-tools | /tests/test_app/AssertionFailedTestCase.php | UTF-8 | 1,997 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/** @noinspection PhpUnitAssertCanBeReplacedWithFailInspection */
declare(strict_types=1);
/**
* This file is part of php-tools.
*
* 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.
*
... | true |
c184a9a1bf3ec1f6827474effa1ad0bb11c3881a | PHP | ainstainer-mefi/ain | /src/AppBundle/Entity/GoogleConfig.php | UTF-8 | 1,690 | 2.5625 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Symfony\Component\PropertyAccess\PropertyAccess;
class GoogleConfig
{
/**
* @var \Symfony\Component\PropertyAccess\PropertyAccessor
*/
protected $accessor;
/**
* @var array
*/
protected $config = [];
/**
* GoogleConfig constructor.
... | true |
96b36d9e84edfc021eacd564b40980597a87fb4f | PHP | jqhph/dcat-admin | /src/Support/Context.php | UTF-8 | 1,798 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Dcat\Admin\Support;
use Illuminate\Support\Arr;
use Illuminate\Support\Fluent;
/**
* Class Context.
*
* @property string $favicon
* @property string $metaTitle
* @property string $pjaxContainerId
* @property array|null $html
* @property array|null $ignoreQueries
* @property array|null $jsVari... | true |
7bcf18aebaaf1f3028b1928e0b74bac0157a0756 | PHP | lillian-pollard/InfoProject | /tutor/getreservation.php | UTF-8 | 1,773 | 2.640625 | 3 | [] | no_license | <?php
session_start();
// We need to include these two files in order to work with the database
include_once('config.php');
include_once('dbutils.php');
// get a connection to the database
$db = connectDB($DBHost, $DBUser, $DBPassword, $DBName);
$tabletitle = "reservation";
$tabletitle2 = "sessions";
$username... | true |
f252f7706530e5192423400a1f8d8da4c4435a69 | PHP | kproyusuf/pweb | /database/migrations/2020_12_12_091125_create_jobs_table.php | UTF-8 | 1,038 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('jobs', function (B... | true |
3bb4f9d8163addfe0215c18f4e0afa1ef7727705 | PHP | DSET2/webProgPBL1-Group1 | /purchaseHistory.php | UTF-8 | 992 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Purchase History</title>
</head>
<body>
<h1>Your Purchase History</h1>
</body>
</html>
<?php
echo "<br><br>";
... | true |
4516ac7b3a6666b3986fca961b5219ffa8cb2c0f | PHP | yann-app/wineadventure | /includes/search.php | UTF-8 | 877 | 2.640625 | 3 | [] | no_license | <?php
require_once (__DIR__ . '/../config/database.php');
require_once (__DIR__ . '/../includes/header.php');
$articles = $pdo->query('SELECT titre, texte, photo FROM blog ORDER BY idblog DESC');
if (isset($_GET['search']) AND !empty($_GET['search'])) {
$search = htmlspecialchars($_GET['search']);
$article... | true |
520c557cd416619ee535d8e0c6e075a6180ba702 | PHP | Zanaras/esirith | /src/Game/GameBundle/Entity/Game.php | UTF-8 | 5,651 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Game\GameBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Game
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Game\GameBundle\Entity\Repository\GameRepository")
*/
class Game
{
const STATUS_IN_PROGRESS = 0;
const STATUS_ENDED_WON = 1; //players win
const STATUS_ENDED_LOST = 2; ... | true |
908f8f1e9a92f87cfb797447d5575cda62639d03 | PHP | n-educatio/orm-session-handler | /src/Neducatio/ORMSessionHandlerBundle/HttpFoundation/Session/Storage/Handler/ORMSessionHandler.php | UTF-8 | 1,960 | 2.609375 | 3 | [] | no_license | <?php
namespace Neducatio\ORMSessionHandlerBundle\HttpFoundation\Session\Storage\Handler;
use Neducatio\ORMSessionHandlerBundle\Repository\SessionRepository;
/**
* DoctrineORMSessionHandler
*
*/
class ORMSessionHandler implements \SessionHandlerInterface
{
/**
* @var SessionRepository
*/
private ... | true |
9a01705d9b74acb282f1e920599e68cb44d3ad88 | PHP | byteferry/sdds_php | /src/Dispatcher/Dispatcher.php | UTF-8 | 2,330 | 2.921875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* This file is part of the byteferry/sdds package.
*
* (c) ByteFerry <byteferry@qq.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sdds\Dispatcher;
/**
* Class Dispatcher
* @package Sdds\Dispatcher
*/
c... | true |
b3e9ec984944317966422f57f5a679e94eb30256 | PHP | ahyanhailong/TouShiBao-Plus | /Server/app/library/cloudwise/tsb/datasource/base/EsService.php | UTF-8 | 18,781 | 2.53125 | 3 | [] | no_license | <?php
namespace cloudwise\tsb\datasource\base;
use cloudwise\tsb\business\app\web\AppGeneralMethod;
use cloudwise\tsb\datasource\constants\TimeRangeEnum;
use cloudwise\tsb\datasource\constants\ElasticSearchEnum;
use cloudwise\tsb\datasource\helper\ArrayHelper;
use Elasticsearch\Client;
use Yaf\Exception;
/**
* Crea... | true |
167dc67797cff7287c4878a5cb979466cfe28819 | PHP | trash-anger/PhotoExpresso | /app/Http/Controllers/CommandeController.php | ISO-8859-1 | 1,772 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\CommandeCreateRequest;
use App\Http\Requests\CommandeUpdateRequest;
use App\Repositories\CommandeRepository;
use Illuminate\Http\Request;
class CommandeController extends Controller
{
protected $commandeRepository;
protected $nbrPerPage = 4;
... | true |
66556ee7f667e0b39550477eef68de47c115eb36 | PHP | techsharif/student_management_system | /render_functions.php | UTF-8 | 1,033 | 3.046875 | 3 | [] | no_license | <?php
function show_data()
{
$students = get_data();
foreach ($students as $student) {
echo $student['id'] . '<br>';
}
}
function show_data_by_id($id)
{
// $flag = 0;
$students = get_data();
foreach ($students as $student) {
if ($student['id'] == $id) {
echo $stude... | true |
3139c47b6abf5db9b69e8a24f1e1de6778508a42 | PHP | consejeria/consejeria.github.io | /recibir.php | UTF-8 | 3,309 | 2.609375 | 3 | [] | no_license |
<?php
//usar utf8_decode para registrar con éxito tildes y eñes
$documento=$_POST['documento'];
$nombres=utf8_decode($_POST['nombres']);
$apellidos=utf8_decode($_POST['apellidos']);
$email=$_POST['email'];
$ficha=$_POST['ficha'];
//conexion base de datos
$link = mysql_connect('localhost', 'jorgeeandradec', '')
... | true |
a98598df4f7a83d4c6317aad601792a3084e3587 | PHP | JeremyVk/JeremyKerckhove | /traitement_contact.php | UTF-8 | 967 | 2.59375 | 3 | [] | no_license | <?php
$email = $_POST['email'];
$content = $_POST['content'];
$object = "Demande de renseignement site Jeremy Kerckhove";
$to = "contact@jeremy-kerckhove.com";
$errors = [];
if(empty($email) || !isset($email)) {
$errors['email'] = "Vous n'avez pas renseigné votre e-mail.";
}
if(empty($content) || !isset($con... | true |
32f2e5b9b1a4b1e0aa79e529d3fed18cd50d36c0 | PHP | AleCinquetti/BoolBnB-Team3 | /database/factories/SponsorsFactory.php | UTF-8 | 485 | 2.6875 | 3 | [] | no_license | <?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\Sponsor;
use Faker\Generator as Faker;
$factory->define(Sponsor::class, function (Faker $faker) {
$randomIndex = array_rand(["x","y","z"],1);
$name = ["bronze", "silver", "gold"];
$duration = ["86400","259200","518400"];
$price ... | true |
50c9e35a11ad41564de5444b5fdb09f3f11b30e7 | PHP | bensonmisi/praz | /app/Http/Livewire/Admin/Category/Add.php | UTF-8 | 768 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Livewire\Admin\Category;
use App\category;
use App\sections;
use Livewire\Component;
class Add extends Component
{
public $sections =[];
public $section;
public $name;
public $code;
public function mount(){
$this->sections = sections::get();
}
public fun... | true |
9062b5ffb20c23009207b140d5837f461df0dc65 | PHP | mesher23/netology-hw-back-end | /Hometask-5.2-PHP-Netology-master/controller/UserController.php | UTF-8 | 1,463 | 2.96875 | 3 | [] | no_license | <?php
class UserController
{
private $model = null;
private $params =
[
'logIn' => [ 'params' => ['login' => 0, 'password' => 0], 'method' => 'POST'],
'register' => [ 'params' => ['login' => 0, 'password' => 0], 'method' => 'POST'],
'logOut' => [ 'params' => [], 'method' => 'GET'],
'checkLogIn' => ['param... | true |
3ad079eeaaa7f8597fc1e1e5b37c2b8e5783455e | PHP | TonyTheJet/starburst-api | /src/model/patterns/factory/ApiFactory.php | UTF-8 | 1,071 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Model\Patterns\Factory;
use \Slim\Exception\NotFoundException;
use \Slim\Http\Request;
use \Slim\Http\Response;
use \App\Model\Api;
use \App\Model\ApiCountryData;
use \App\Model\ApiSalesTax;
class ApiFactory {
// private constants
private const API_KEY_COUNTRY_DATA = 'country-data';
p... | true |
612d68b5bbd7f25bf8aa82d22865b42b8fcecb08 | PHP | IVMorozov/lesson10 | /index.php | UTF-8 | 4,003 | 2.59375 | 3 | [] | no_license | <?php
abstract class SaleItem
{
public $ItemName;
public $ItemType;
public $Description;
abstract public function SetPrice($price);
}
interface Description
{
public function GetDescription($Descr);
}
class Car extends SaleItem implements Description
{
public $CarColor;
public $CarPrice;
... | true |
77231c3459b678ab2133a65a4a4c481980418b87 | PHP | fernyoveja23/yehoshua | /App/BD/Conexion.php | UTF-8 | 456 | 2.703125 | 3 | [] | no_license | <?php
include_once 'Config.php';
class MySQLConexion
{
function getConexion()
{
$conn = mysqli_connect(MySQLConfig::gethost(), MySQLConfig::getusername(), MySQLConfig::getpassword(), MySQLConfig::getdatabase());
// checar conexion
if (!$conn) {
die("Connection failed: " . mysqli_conn... | true |
759e0ad34107d237e58007ea21fc29d19a731306 | PHP | fluffybunnies/ace | /web/ace/helpers/Ses.php | UTF-8 | 5,068 | 2.640625 | 3 | [] | no_license | <?php
/*
Note
- reply_to is ignored when sending attachments
- @todo: implement this
*/
namespace ace\helpers;
use \ace\Ace;
use \ace\core\HelperAbstract;
use \ace\helpers\Exception as HelperException;
class Ses extends HelperAbstract {
private static $ses = null;
/*
// Example:
file_put_contents(WEBROOT... | true |
3806b424d522adb269f34ba189febe7673cef3d1 | PHP | agancsos2/METCS633_Sp1_Group3_Team1 | /FriendlyPrint/bin/register.php | UTF-8 | 2,895 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
$__PAGE__NAME = "register";
require_once("header.php");
require_once("functions_db.php");
require_once("./classes/all_classes.php");
?>
<div id = "reg-form-div">
<form method = "POST" id = "reg-form">
<label class = "label">First Name</label><input type = "text" placeholder = "Bob" name = "first_name"/> <... | true |