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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
bcfa8908b5e1b777f18cef36d45d19c5af4dab26 | PHP | Raionbiru/FamiliaTour | /sistema/Models/Hostal.php | UTF-8 | 401 | 2.5625 | 3 | [] | no_license | <?php
class Hostal
{
// Declaración de una propiedad
public $id_hostal;
public $nom_hostal;
public $clase_hostal;
public $tipo_hostal;
public $lugar_hostal;
public $prec_hostal;
public $prec_var_hostal;
public function cotizadorHostal(int $id_hostal)//validación int de PHP7
{
... | true |
844053e3a6c78657b0262addf83e37ef19ccd311 | PHP | yoshiekiura/server-sosialita | /application/helpers/func_helper.php | UTF-8 | 6,237 | 2.671875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
function encrypt($string) {
$var = base64_encode($string);
$var = str_replace("=", "_", $var);
$var = str_replace("+", "-", $var);
$var = str_replace("1", "!", $var);
$var = str_replace("0", "1", $var);
$var = str_replace("!", "0", $var);
$var = str_replace("A", "@@", $var);
$var = str_replace("a... | true |
b06e7330b4e1f17f902431474d0fefec21172bf2 | PHP | mplx/sxcmd | /src/mplx/sxcmd/Util.php | UTF-8 | 1,974 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* sxcmd
* simple commandline interface to a skylable sx cluster
*
* @package sxcmd
* @author Martin Pircher <mplx+coding@donotreply.at>
* @copyright Copyright (c) 2014-2015, Martin Pircher
* @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
**/
namespace mplx\sxcmd;
/*... | true |
cb20aa763a51aeb4fbc0e106c821c52067efbc64 | PHP | danitome24/php-valueobject | /src/PhpValueObject/Geography/Latitude.php | UTF-8 | 1,769 | 3.5625 | 4 | [
"MIT"
] | permissive | <?php
/**
* This software was built by:
* Daniel Tomé Fernández <danieltomefer@gmail.com>
* GitHub: danitome24
*/
namespace PhpValueObject\Geography;
use PhpValueObject\Geography\Exception\InvalidLatitudeException;
use PhpValueObject\ValueObject;
class Latitude implements ValueObject
{
const MAX_LATITUDE = ... | true |
b7c238a9edacc58b1b0d034ce599b8f16acfbb84 | PHP | corycollier/website-analyzer | /src/ResultList.php | UTF-8 | 771 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace WebsiteAnalyzer;
use Illuminate\Support\Arr;
class ResultList extends \ArrayObject
{
public function getMetrics($type)
{
$results = [];
foreach ($this as $key => $value) {
$uri = $value->getUri();
$results[$uri] = $value->getMetric($type);
}
... | true |
084b2b33b53b329833a7ec7e8ac67eced7304662 | PHP | AdrianSchneider/Qissues-Legacy | /src/Qissues/System/Shell/Shell.php | UTF-8 | 295 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Qissues\System\Shell;
interface Shell
{
/**
* Run a shell command
* @param string $command
* return string response
*/
function run($command);
/**
* Escape an argument
* @param mixed argument
*/
function escape($argument);
}
| true |
222fe7edb02965b319ffa6b7b49ed255caa366e8 | PHP | AltrosCoding/MGNN | /app/Http/Controllers/AuthController.php | UTF-8 | 1,990 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
use Illuminate\Foundation\Auth\ResetsPasswords;
class AuthController extends Controller
{
public function __construct()
{
$t... | true |
d3968a61455708b525262c7848be4edc495d2ba9 | PHP | GastJ/search | /views/utils.php | UTF-8 | 641 | 3.25 | 3 | [] | no_license | <?php
function read_file(){
$handle = fopen('./data.txt', 'r+');
$y=0;
$size=20;
while($line = fgets($handle)){
for($i=0; $i<strlen($line); $i++)
{
$x=$i*$size;
if ('*' === $line[$i])
{
echo '<rect x="'.$x.'" y="'.$y.'" width="'.$size.'" height="'.$size.'"style="fill:rgb(20,20,10)"/>';
}
... | true |
25efb6afa33fddbb853da7f741a1997b6cf7be7d | PHP | jDebu/tp2 | /Sislab/Modelos/grupoCursoLaboratorio.class.php | UTF-8 | 5,190 | 2.734375 | 3 | [] | no_license | <?php
class grupoCursoLaboratorio {
private $id_grupo_curso;
private $id_labo;
private $hora_inicio;
private $hora_fin;
private $dia;
public function grupoCursoLaboratorio($grupo = null, $labo = null, $inicio = null, $fin = null, $dia = null) {
$this->id_grupo_curso = $grup... | true |
8415349a21a3edef1c256f4e3ffea12167e60eb8 | PHP | jdubonsv/laravel-utilities | /src/Traits/IndexCollection.php | UTF-8 | 1,388 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Jdubon\Laravel\Traits;
trait IndexCollection
{
/**
* If paginated was sent it will build the paginated collection metadata,
* otherwise it will return a simple collection
*
* @param Model $model
* @return array
*/
protected function indexCollection($model)
{
... | true |
2c1a36d5eb5e0595e6a99888bee26594c675207a | PHP | Yannick94/Webshop_WebProgrammingBFH | /control/UserLoginControl.php | UTF-8 | 1,757 | 2.75 | 3 | [] | no_license | <?php
include($_SERVER["DOCUMENT_ROOT"] . "/db/db.inc.php");
class UserLoginController {
private $db;
private $mysqli;
private $user;
public function __construct(User $user) {
$this->user = $user;
$this->db = Database::getInstance();
$this->mysqli = $this->db->getConnection()... | true |
bbe52a6cdc75001f7d2dfab393e71be99cc3a1d4 | PHP | Laksh9714/MyFavourites | /ajax/add-user.ajax.php | UTF-8 | 540 | 2.59375 | 3 | [] | no_license | <?php
require_once '../php-includes/connect.inc.php';
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$stmt = $db->prepare("INSERT INTO movie_goers (firstname,lastname) VALUES (?,?)");
$stmt->bind_param('ss', $firstname,$lastname);
$stmt->execute();
$stmt->close();
$maxidsql="Select max(user_id) ... | true |
304f6e7ed5fe638af27d97359d983dc1f4843875 | PHP | todorovaeva/Work | /homework-task4.php | UTF-8 | 1,275 | 3.046875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Task_4</title>
</head>
<body>
</body>
</html>
<?php
//Напишете програма, която по зададени единици използвана
//електроенергия и тяхната цена изчислява сметката за ток, при следните условия.
//- За първите 50 единици - 0,10 лв/единица
//- За сл... | true |
34308cd7c8f6ce6c609e434143de8a43ef008670 | PHP | JeffreyVdb/laravel-js-localization | /src/JeffreyVdb/JsLocalization/Output.php | UTF-8 | 802 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace JeffreyVdb\JsLocalization;
use JeffreyVdb\JsLocalization\Facades\CachingService;
use Lang;
class Output
{
protected $section;
protected $app;
public function __construct()
{
$this->section = 'default';
$this->app = app('app');
}
public function forSection($section)
{
$this->se... | true |
688171be3099f77175396261390c6f155fd4603d | PHP | Jefferson-sudo/Curso-mysqli | /FuncoesGenericasDoCRUD/crud/index.php | UTF-8 | 1,000 | 2.578125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Swapping Songs</title>
</head>
<body>
<?php
require ("crud.php");
$dados = array(
"produto" => "Relogo",
"valor" => 210.00,
"descricao" => "Relogio para academia, corrida e esportes em geral."
... | true |
c64d9ebc63141e3860eee93777ec1638a95261d8 | PHP | GS04-03-JunpeiIhara/kadai | /9/insert_test_data.php | UTF-8 | 1,254 | 3 | 3 | [] | no_license | <?php
$array = [];
for ($i = 0; $i < 10; $i++) {
$array[$i] = ['ジーズ'.$i, 'test'.$i.'@test.com', $i,'テスト'.$i];
}
// $pdo = new PDO('mysql:dbname=an;charset=utf8;host=localhost', 'root', '');
$pdo = new PDO('mysql:dbname=gs_db;charset=utf8;host=localhost','root','');
for ($i = 0; $i < 10; $i++) {
$name = $... | true |
c4fcb233e7248112fa95bc2fc54cfa3572f89524 | PHP | subrin00/w-application | /view/get/get_sub_category.php | UTF-8 | 659 | 2.734375 | 3 | [] | no_license | <?php
$DB_host = "localhost";
$DB_user = "root";
$DB_pass = "";
$DB_name = "gobs";
try
{
$DB_con = new PDO("mysql:host={$DB_host};dbname={$DB_name}",$DB_user,$DB_pass);
$DB_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e)
{
$e->getMessage();
}
if($_GET['id'])
{
$id=$_GET['id'... | true |
f41d03bb1df8beb2307afca4fe3cc4bd67476858 | PHP | irmanshidayat/PHP | /OOP/myClass.php | UTF-8 | 2,568 | 2.9375 | 3 | [] | no_license | <?php
class PesawatTerbang{
public $warnaPesawat;
public function __construct($warnaAwal){
$this->warnaPesawat = $warnaAwal;
}
public function gantiWarna($warnaBaru){
$this->warnaPesawat = $warnaBaru;
return $this->warnaPesawat;
... | true |
8101de8c4dca56c4b73926b5e17f52a5331fd70b | PHP | msooner/laravelCMS | /app/User.php | UTF-8 | 834 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $table = 'users';
public $timestam... | true |
c410cc10592ddc733cb0faf72a30e16d8a29940e | PHP | Johnbin89/DiveInPHP | /app/book_event.php | UTF-8 | 3,707 | 2.640625 | 3 | [] | no_license | <?php
session_name('mysession');
// Initialize the session
session_start();
// Include config file
require_once "../app/dbconfig.php";
require_once "../app/twig.php";
// Define variables and initialize with empty values
// $event_spot = "";
$spot_err = $msg = "";
// Processing form data when form is submitted
if($... | true |
c2a1d09c982ce64d878b2a7286d35ea8a53bf290 | PHP | derekjones/dicecalc | /tests/DiceCalc/Tests/CalcOperation/ExponentTest.php | UTF-8 | 624 | 2.828125 | 3 | [] | no_license | <?php
namespace DiceCalc\Tests\CalcOperation;
use \DiceCalc\CalcOperation;
class ExponentTest extends \PHPUnit_Framework_TestCase
{
/**
* @dataProvider dataForExponent
*
* @param $num1
* @param $num2
* @param $expected
*/
public function testExponent($num1, $num2, $expected)
... | true |
8443e3cb6a2c3506961768d4d9cb540b0542ae9c | PHP | popowa/IdeaBox | /bookSearch/Extract.class.php | UTF-8 | 867 | 2.84375 | 3 | [] | no_license | <?php
class Extract {
private $_source;
public function __construct($source){
$this->_source = $source;
}
public function getFrom() {
preg_match("/From:.*/", $this->_source, $fromline);
preg_match("/[-\+\w](\\.?[-\+\w])*@[-\+\w]+(\.[-\+\w]+)*(\.[a-zA-Z]{2,4})/", $fromline[0], $from);
return $from[0];
}
... | true |
0eb0b87f7b2ad1deaaed9204c597dfbae6f8a92c | PHP | bilbatez/albertjtan | /app/Http/Controllers/MailController.php | UTF-8 | 2,750 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Mail\SendMessage;
use App\Sender;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Validator;
use Ixudra\Curl\Facades\Curl;
class MailController extends Con... | true |
af3cf7f0f328213c3cdcf7de4443ac7f09218798 | PHP | ai2ci/ConfiguredPresenter | /src/ConfigParser.php | UTF-8 | 1,795 | 2.84375 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace ConfiguredPresenters;
use Nette\DI\Config\Helpers;
/**
* Description of ConfigParser
*
* @author chlad
*/
class... | true |
0d474c15b007cbabca91cdebff0a9e58614fe618 | PHP | diegotello/organizame_13 | /application/forms/UserFromService.php | UTF-8 | 2,017 | 2.546875 | 3 | [] | no_license | <?php
class Dtad_Form_UserFromService extends Zend_Form
{
public function init()
{
//User Name
$firstname = new Zend_Form_Element_Text("firstname");
$firstname->setLabel("Primer Nombre")
->addValidator(new Zend_Validate_StringLength(array('max'=>45)))
... | true |
527807296aaf9f159109bd88608de7b99e68d33a | PHP | arvnabil/tugas_2_php | /Tugas2_2.php | UTF-8 | 216 | 2.578125 | 3 | [] | no_license | <?php
$jual = 80000;
$beli = 50000;
$untung = $jual - $beli;
$persenUntung = ($untung/$beli)*100;
echo "<p>
Jual = $jual <br>
Beli = $beli <br>
keuntungan = ? <br>
Jawaban : $persenUntung %
</p>";
?> | true |
4ca58c805d9a6dd869f3a14468d15ff3b2baff4a | PHP | Morebec/orkestra-messaging | /src/Timeout/PollingTimeoutProcessor.php | UTF-8 | 2,895 | 3 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Morebec\Orkestra\Messaging\Timeout;
use Morebec\Orkestra\DateTime\ClockInterface;
use Morebec\Orkestra\DateTime\DateTime;
/**
* Implementation of a TimeoutProcessor that continuously polls the storage for timeouts to be processed.
* This processor always ends up removing the timeout from the storag... | true |
3aebabeabde9b216f86795bc8c9e1ba748b2e82b | PHP | djlambert/doctrine2-security | /lib/CrEOF/Security/SecuredEntity/AbstractMask.php | UTF-8 | 3,770 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (C) 2013 Derek J. Lambert
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, me... | true |
60c5c335f8b50ea9b413deaa54bbd2beb91b2953 | PHP | chengjf/leetcode | /php/941.php | UTF-8 | 1,214 | 3.640625 | 4 | [
"MIT"
] | permissive | <?php
class Solution
{
public function validMountainArray($A)
{
$length = count($A);
if ($length < 3) {
return false;
}
$increaseFlag = false;
$decreaseFlag = false;
$last = null;
foreach ($A as $a) {
if ($last === null) {
... | true |
08e7855869dc63826ba88d68ef0631d1e7ba5463 | PHP | funkyproject/Polymorphism | /tests/stub/TestE.php | UTF-8 | 331 | 3.15625 | 3 | [] | no_license | <?php
class TestE implements TestInterface
{
private $p1 = 'OtherDefaultValue';
private $p2 = 'setterInConstructor';
protected $p3;
public function __construct($p2, $p3)
{
$this->p2 = $p2;
$this->p3 = $p3;
}
public function getP($indice)
{
$attribut = sprintf("p%s", $indice);
return $this->$atti... | true |
5b61af8858e004fa1de40ed1c900fc196c660e77 | PHP | nyeholt/silverstripe-simplewiki | /code/formatters/MarkdownFormatter.php | UTF-8 | 1,129 | 2.921875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* A Wiki formatter for Markdown syntax
*
* @author Marcus Nyeholt <marcus@silverstripe.com.au>
* @license BSD License (http://silverstripe.org/BSD-License)
*/
class MarkdownFormatter extends SimpleWikiFormatter {
public function getFormatterName() {
return "Markdown";
}
/**
* Note that we expli... | true |
c12a94d55c013224d79132158714218b7a5e8f32 | PHP | ilmoralito/courses_site | /src/AppBundle/Entity/Contact.php | UTF-8 | 2,306 | 3 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Symfony\Component\Validator\Constraints as Assert;
class Contact
{
/**
* @Assert\NotBlank(message="Nombre y apellido es requerido")
*/
protected $fullName;
/**
* @Assert\NotBlank(message="Email es requerido")
* @Assert\Email(message="El email '{... | true |
f1a8ba5b1b2ffe47dd34f717a0248ca85a6260cd | PHP | KevinJ30/bgr-30 | /pages/news/view/index.php | UTF-8 | 1,484 | 2.515625 | 3 | [] | no_license | <?php
/**
* File : pages/pages/view/index.php
*
* Crées par Joudrier Kevin
*
* Affiche la page d'accueil du site
**/
$title = "Actualités";
// charge le header
include_once ROOT_TEMPLATE.'header.php';
?>
<article>
<?php
if(!$news)
{
?>
<div class="pannel-box warning">
<p>Aucune ac... | true |
399c6bde7f62de9924b2e767b3d20665426a1527 | PHP | johnnya23/jsdev-jma-youtube-display | /jma-youtube-display.php | UTF-8 | 21,428 | 2.5625 | 3 | [] | no_license | <?php
/*
Plugin Name: JMA YouTube Display
Description: This plugin adds schema markup to youtube embeds and creates YouTube Lists
Version: 2.0
Author: John Antonacci
Author URI: http://cleansupersites.com
License: GPL2
*/
/*
* function jma_yt_quicktags
* add shortcode tags to text toolbar
*
* */
function jma_yt_qu... | true |
7579b52171eddceba8cf3cd6b044e64c82f6ec9a | PHP | NiklasNeumann/GameOfLife | /tests/DummyOutput.php | UTF-8 | 975 | 2.859375 | 3 | [] | no_license | <?php
namespace GameOfLife\tests;
use GameOfLife\Board;
use GameOfLife\outputs\BaseOutput;
use Ulrichsg\Getopt;
/**
* The DummyOutput
* This output is a support class for the Board class and is supposed to mock the BaseOutput, so it can be used for Unit-Tests.
* @package GameOfLife\tests
*/
class DummyOutput ext... | true |
51e77d988a29e3ea2865498cf67a9c819051b340 | PHP | jrpikong/santaiyuk | /app/Http/Library/VoyagerHelper.php | UTF-8 | 731 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: jrpikong
* Date: 28/02/18
* Time: 10:05
*/
namespace App\Http\Library;
use Illuminate\Support\Facades\Storage;
class VoyagerHelper
{
public function thumbnail($image , $type)
{
// We need to get extension type ( .jpeg , .png ...)
$ext = pathinf... | true |
b666f9444ebc501a4a503c1c717b9874da7c628e | PHP | netz98/n98-magerun2 | /src/N98/Magento/Command/Developer/Module/ListCommand.php | UTF-8 | 2,850 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace N98\Magento\Command\Developer\Module;
use N98\Magento\Command\AbstractMagentoCommand;
use N98\Util\Console\Helper\Table\Renderer\RendererFactory;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symf... | true |
baaff54b507b68b8874b1f7bd3b1f55619371a32 | PHP | ramazanov2018/bitrix | /modules/rns.courses/classes/general/CoursesControl.php | UTF-8 | 3,428 | 2.625 | 3 | [] | no_license | <?php
namespace Courses;
use Bitrix\Main;
use CAdminException;
IncludeModuleLangFile(__FILE__);
class CoursesControlTable extends Main\Entity\DataManager
{
public static function getTableName()
{
return 'b_courses_list';
}
public static function getMap()
{
return array(
... | true |
e93b327c184ab67d76d2f3428b6659714dce13a7 | PHP | Dindapradani/Web-Programming-Exercises | /Praktikum5/simpan.php | UTF-8 | 756 | 2.59375 | 3 | [] | no_license | <?php
if (isset($_POST['submit'])) {
$nim = $POST['nim'];
$nama = $POST['nama'];
$tglLahir = $POST['tgllhr'];
$tmptLahir = $POST['tmptlhr'];
if (empty($nim) || empty($tglLahir) || empty($tmptlahir)){
echo "Maaf, lengkapi data terlebih dahulu <a href = 'tambahdata.html'> form </a> ";
}
else{
$fi... | true |
4205c2f02eca3fc6fe79e897e51c48494132029a | PHP | pradosoft/prado | /tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php | UTF-8 | 311 | 2.546875 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class DelayedCallback extends TPage
{
public function callback1($sender, $param)
{
$ms = 4;
sleep($ms);
$this->status->Text = "Callback 1 returned after {$ms}s";
}
public function callback2($sender, $param)
{
$ms = 2;
sleep($ms);
$this->status->Text = "Callback 2 delayed {$ms}s";
}
}
| true |
cad270af3fd9bb138ff494a76fb75b1cf2bba217 | PHP | MohinaTharwani/Managing-Inventory-Online | /MidTerm/createNewRecord_DBINSERT.php | UTF-8 | 1,019 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Mohina Tharwani
* Date: 02-Nov-16
* Time: 6:14 PM
*/
//print_r($_POST);
require_once("config.php");
// Assigning $_POST values to individual variables for reuse.
$First_Name = $_POST['First_Name'];
$Last_Name = $_POST['Last_Name'];
$Address = $_POST['Address'];
$Contact_... | true |
0e0891fd08c4bac3f895ff61a8e3f5a68a1b8d05 | PHP | Nathaniel-Cros/CRUD-Rest | /src/Controllers/CrudController.php | UTF-8 | 7,379 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Src\Controllers;
use Slim\Http\Request;
use Slim\Http\Response;
use \PDO;
use Firebase\JWT\JWT;
require 'db.php';
define("key_secret","qwq9Uag3FT");
class CrudController
{
/*
* Esta funcion regresa todos los usuarios de la base de datos
*/
public function getAll(Request $request,Re... | true |
20aa2f16b6a78aae462cf30fe9ec36ebccf214ac | PHP | nntruong0191/laravel | /app/Modules/Domain/Repositories/Commands/ContentRepositoryCommand.php | UTF-8 | 3,981 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Modules\Domain\Repositories\Commands;
use App\Modules\Domain\Models\Content;
use App\Modules\Infrastructure\Core\Domain\RepositoryCommand;
use App\Modules\Domain\Services\Queries\ContentServiceQuery;
use App\Modules\Infrastructure\Files\Upload;
use Illuminate\Support\Facades\Storage;
class Conten... | true |
a52bb7ac3e31fe1056e9d423f4455022796d2121 | PHP | 18-plus/php-symfony-sdk | /AgeGateSymfony.php | UTF-8 | 2,803 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace EighteenPlus\AgeGateSymfony;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use EighteenPlus\AgeGate\AgeGate;
use Symfony\Component\HttpFoundation\Request;
class AgeGateSymfony extends Bundle
{
public function boot()
{
if (php_sapi_name() === 'cli') {
return;
}
... | true |
e6650ecf88a787a17b16bde19ff58ba0a40864bf | PHP | notpankaj/ajax-chat | /php/signup.php | UTF-8 | 3,336 | 2.625 | 3 | [] | no_license | <?php
session_start();
include_once "./config.php";
$fname = mysqli_escape_string($conn, $_POST['fname']);
$lname = mysqli_escape_string($conn, $_POST['lname']);
$email = mysqli_escape_string($conn, $_POST['email']);
$password = mysqli_escape_string($conn, $_POST['password']);
if(!empty($... | true |
d216a6e2719ada5b6eacd12afa4433db546b0635 | PHP | leonardozambao/wordpress-libs | /lib/recaptcha/recaptcha.php | UTF-8 | 911 | 2.75 | 3 | [] | no_license | <?php
$response = $_POST['token'];
// get cURL resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, 'https://www.recaptcha.net/recaptcha/api/siteverify');
// set method
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
// return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// set... | true |
d65bc07614487224467a57239be618b5b814a211 | PHP | tomokoba/Test_php | /Lesson12.php | UTF-8 | 175 | 3.234375 | 3 | [] | no_license | <?php
function hello(){
echo 'Hello, world!';
}
hello();
echo "\n";
function printRectangleArea($height, $width) {
echo $height * $width;
}
printRectangleArea(5, 10);
?> | true |
81cbd1c8ba7f087c43d87902ed8161e5919fb28d | PHP | muhammadnajich/angkutsampahku | /assets/bootstrap/class/banner.php | UTF-8 | 770 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
include "db.php";
class banner {
public $id_banner;
public $judul;
public $alamat;
public $gambar;
public $id_galeri;
public function getData () {
$db= new database();
$db_con = $db->connect();
$sql ="select * fr... | true |
8372d05992225607a8af85e95c9cc7eb8c5ac4e1 | PHP | skyfalljoss/aptech-php-19-phong | /PHP/02-20190919/file/session-cookie.php | UTF-8 | 302 | 2.8125 | 3 | [] | no_license | <?php
setcookie("myName","Phong" , time()+3600 ) ;//3600=1h
if(isset($_COOKIE['myName'])){
echo $_COOKIE['myName']."<br>";
}
session_start();
$_SESSION["myName"] = "Phong";
$_SESSION["myProject"] = "News Website";
print_r($_SESSION);
session_destroy();
?> | true |
fb14555f58940cdb3558b67c8a8242454c5c1574 | PHP | swapnil-dot/corona_pandemic | /page2.php | UTF-8 | 1,958 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
$errors = array();
$conn = new mysqli('localhost', 'root', '', 'patient');
if (isset($_POST['name']) || isset($_POST['fname']) || isset($_POST['age']) || isset($_POST['addh']) || isset($_POST['email']) || isset($_POST['aad']) || isset($_POST['test']) || isset($_POST['con']) || isset($_POST['usnh']) || isset($... | true |
d253494cf62c41727fd191119fc9abc539e37edb | PHP | Flo0611/PPE3 | /class/race_chevaux.class.php | UTF-8 | 1,763 | 2.96875 | 3 | [] | no_license | <?php
Class race_chevaux
{
private $id_race_chevaux;
private $lib_race_chevaux;
Public function __construct($i, $n)
{
$this->id_race_chevaux = $i;
$this->lib_race_chevaux = $n;
}
//*****************************************GETTER**********************************
Public function get_id_race... | true |
444c3775ebf92858ec28f265a35026463d7333c7 | PHP | taftiyanilham/Sistem-informasi | /keuangan/delete.php | UTF-8 | 1,523 | 2.6875 | 3 | [] | no_license | <?php
include 'func.php';
$pdo = pdo_connect_mysql();
$msg = '';
//Cek apakah ID Ada
if (isset($_GET['id'])) {
//pilih record yang akan dihapus
$stmt = $pdo->prepare('SELECT * FROM keuangan where id =?');
$stmt->execute([$_GET['id']]);
$logKeuangan = $stmt->fetch(PDO::FETCH_ASSOC);
if (!... | true |
0e8948979eb770d05c44ee617263750e573cbefa | PHP | sigrundev/ceidg-api | /src/Validators/REGONValidator.php | UTF-8 | 1,483 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is a part of sigrun/ceidg-api package, a PHP library for to deal
* with the CEIDG (https://datastore.ceidg.gov.pl) SOAP webservice.
*
* @author Marek Kapusta-Ognicki <marek@sigrun.eu>
* @author Sigrun Sp. z o.o. <sigrun@sigrun.eu>
* @copy (C)2019 Sigrun Sp. z o.o. All rights reserved.
*/
n... | true |
a04c7019ee88a51edb83ea4440dfade3733342c0 | PHP | gabegreenspan/WebReminder | /core/init.php | UTF-8 | 1,597 | 2.859375 | 3 | [] | no_license | <?php
session_start();
/* Global array of settings. Helps keep consistancy and makes it easy to set things up. */
$GLOBALS['config'] = array(
'mysql' => array(
'host' => '127.0.0.1',
'username' => 'root',
'password' => '',
'db' => 'reminder_schema'
),
'remember' => arra... | true |
403e911c350c25892f0790858a272481a5ae14fe | PHP | RomanasCh/Romas | /ndarbas06/vidurkiuSkaiciavimas.php | UTF-8 | 389 | 3.578125 | 4 | [] | no_license | <?php
require 'vidurkis.php';
$a = [5, 6, 10, 15];
$b = [8, 5, 3, 25];
echo '<h4>Vidurkio skaičiavimas</h4>';
echo 'Išeities masyvas A: ' . '<code><em>' . implode(', ', $a) . '</em></code><br>';
echo 'Išeities masyvas B: ' . '<code><em>' . implode(', ', $b) . '</em></code><br><br>';
echo 'Vi... | true |
47e83b654456bb11c6a27cf33d60dd3db4253a7a | PHP | imagin/guzzle-openstack | /src/Guzzle/Openstack/Compute/Command/Action.php | UTF-8 | 1,057 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @license See the LICENSE file that was distributed with this source code.
*/
namespace Guzzle\Openstack\Compute\Command;
use Guzzle\Openstack\Common\Command\AbstractJsonCommand;
/**
* Sends a servers API request post
*
* @guzzle Data doc="Data" required="true"
* @guzzle Id doc="Id of the server" r... | true |
5b7973589fe7a9a18bc9a595cc0afdc091e50335 | PHP | vladmeh/rabbitmq-client | /src/Rabbit.php | UTF-8 | 1,418 | 2.8125 | 3 | [] | no_license | <?php
namespace Vladmeh\RabbitMQ;
use Closure;
use Exception;
use Illuminate\Contracts\Container\BindingResolutionException;
use Vladmeh\RabbitMQ\Services\Consumer;
use Vladmeh\RabbitMQ\Services\Producer;
use Vladmeh\RabbitMQ\Services\Rpc;
class Rabbit
{
/**
* @param string $message
* @param string $ex... | true |
1b7a49693d8c24100e2ef4d96127cf80312402cd | PHP | benmuz/RecruteMe | /controller/register.php | UTF-8 | 4,107 | 2.8125 | 3 | [] | no_license | <?php
require_once '../model/Utilisateurs.class.php';
require_once '../model/Connexion.class.php';
require_once '../globals/typeCompte.php';
require_once '../globals/database.php';
//Vérification du pseudo
if(!empty($_POST['pseudo_check'])){
$pseudo = $_POST['pseudo_check'];
$pseudo = preg_replace('#[^a-z0-9]#i... | true |
4e41619d4e2ea92dd7f465ae8b4ff41b78037eaf | PHP | NinadVhawal/MovieRecommendationSystem | /projectwebpage/inc/Utility/MovieDAO.class.php | UTF-8 | 2,936 | 3 | 3 | [] | no_license | <?php
class MovieDAO {
private static $db;
public static function init() {
self::$db= new PDOAgent("Movie");
}
static function getMovie(string $movieTitle) {
$query = "SELECT * FROM `movies` WHERE title=:title";
//Query
self::$db->query($query);
//Bind
... | true |
40b14ee9f93b8e6ac8ebe4daf87b5306c8297c2a | PHP | Calluml24/Twitter-Copycat | /authenticateLogin.php | UTF-8 | 1,051 | 2.515625 | 3 | [] | no_license | <?php
include("connect.php");
$username = $_POST["username"];
$password = $_POST["password"];
$passwordHash = hash('sha256', $password.$username);
$query = "SELECT * FROM accounts WHERE username = ?";
if(is_string($username)) {
if($stmt = mysqli_prepare($conn, $query)) {
mysqli_stmt_bind_param($stmt,... | true |
fd1537d52bd8b7bffa81884c07e421e6418c6d99 | PHP | 1152730631/laravel54 | /database/factories/ModelFactory.php | UTF-8 | 1,213 | 2.515625 | 3 | [] | no_license | <?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding yo... | true |
c85d61ea6d7b2564cf9179319164f750b968d5cd | PHP | jthigpen/StringCalculators | /php/StringCalculator.php | UTF-8 | 575 | 3.75 | 4 | [] | no_license | <?php
class StringCalculator
{
public function add($numberString) {
if ($numberString === 0) {
return 0;
}
$containsCustomDelimiter = strpos($numberString, "//");
if ($containsCustomDelimiter === 0) {
$delimiter = substr($numberString, 2, 1);
$numberString = substr($numberString, 4... | true |
3c9e1453b8db13b276e3be5a549be942bc59d15a | PHP | aislansistemas/SOLID-SINGLETON-FACTORY-DEPENDENCY-MVC | /App/Models/Filiado.php | UTF-8 | 645 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Models;
class Filiado
{
private $iId;
private $sNome;
private $iIdade;
/**
* @return mixed
*/
public function getId()
{
return $this->iId;
}
/**
* @param mixed $iId
*/
public function setId($iId)
{
$this->iId = $iId;
}
/**
* @return mixed
*/
public function getNome... | true |
896d9f8f1a9ef662bf13e85f413f07e1faf460eb | PHP | anthony-kyle/vueTraining | /vueAjax1/interface.php | UTF-8 | 957 | 2.875 | 3 | [] | no_license | <?php
// Error codes:
// - 0: Cannot connect to Database
// - 1: SQL Query Malformed
// - 2: No Records Found
if(!empty($_POST['range'])){
if ($_POST['range'] === 'all'){
$host = 'localhost';
$user = 'localdev';
$pass = '#Yfc55mwWdZRn9k45dd5u!qi9';
$database = 'vue_db';
$db = new mysqli($host... | true |
074c85263b47b102adfa55ed116a2ba24887e0b2 | PHP | mutabix/member-register | /src/Core/Managers/StringManager.php | UTF-8 | 7,419 | 3.140625 | 3 | [] | no_license | <?php
namespace Ng\Core\Managers;
use Ngpictures\Models\UsersModel;
/**
* gestion des chaines des charateres
* Class Str
* @package Ng\Core\Generic
*/
class StringManager
{
/**
* cree un token
* @param int $length
* @return string
*/
public static function setToken(int $length): strin... | true |
263ef9d9c7992420422251d767c43bd3a3cdac17 | PHP | nightmare3832/WorldEditNIGHTMMARE | /src/edit/jnbt/CompoundTag.php | UTF-8 | 4,035 | 2.921875 | 3 | [] | no_license | <?php
namespace edit\jnbt;
class CompoundTag extends Tag{
private $value;
public function __construct(array $value){
parent::__construct();
$this->value = $value;
}
public function containsKey(string $key) : bool{
return isset($this->value[$key]);
}
public function getValue(){
return $this->value;
... | true |
fbd0b5a5f21847ba79e555b1d79041a44b1a62d4 | PHP | smarts-uz/laravel_merinomood_admin | /src/Console/ResourceCommand.php | UTF-8 | 3,932 | 2.515625 | 3 | [] | no_license | <?php
namespace Arniro\Admin\Console;
use Illuminate\Support\Str;
class ResourceCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'admin:resource {resource} {--fields=}';
protected $fields = [];
/**
* Th... | true |
6155ea3988ff372bed5288e3605122063da4e8e4 | PHP | tekimaki/themes | /smartyplugins/modifier.reltime.php | UTF-8 | 2,525 | 2.703125 | 3 | [] | no_license | <?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* smarty_modifier_reltime
*/
function smarty_modifier_reltime( $pTimeStamp, $pMode = 'long', $pFallback = 'bit_short_datetime' ) {
global $gBitSystem, $gBitSmarty;
// if this feature is not desired, we simply don't use it.
if( !$gBitSys... | true |
0345311b4a5e9836e505f8ebb184d452d5ed48d5 | PHP | elstc/cakephp-social_login | /src/Adapter/SessionStorage.php | UTF-8 | 2,192 | 2.71875 | 3 | [] | no_license | <?php
namespace Elastic\SocialLogin\Adapter;
use Cake\Utility\Hash;
use Hybridauth\Storage\StorageInterface;
class SessionStorage implements StorageInterface
{
/**
* @var string
*/
protected $storeNamespace = 'HYBRIDAUTH::STORAGE';
/**
* @var \Cake\Network\Session|\Cake\Http\Session
*... | true |
b3b18a77c3b7d09d814abe0e2bf65250a32535de | PHP | zilahir/onlinecourse | /html_quiz_01/test.php | UTF-8 | 399 | 3.203125 | 3 | [] | no_license | <?php
$result["answers"] = array (
"question-1" => true,
"question-2" => true,
"question-3" => false
);
//echo "count: ".count($result["answers"]);
$goodAnswers = 0;
$badAnswers = 0;
for ($i=0; $i<count($result["answers"]); $i++) {
if ($result["answers"][$i] == true ) {
$goodAnswers++;
} else {
$... | true |
f2dcd58d1f9a4c0c990fc3bacd51a425181950fa | PHP | antoinePhr/natpass | /src/ImportVideo.php | UTF-8 | 3,796 | 2.65625 | 3 | [] | no_license | <?php
use Antoine\Database;
use Symfony\Component\VarDumper\Cloner\Data;
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
class ImportVideo{
private $name; // nom de la vidéo
private $description;
private $analyse; //
private $pathAU; // after... | true |
8e3a13af8a573a5b9580be77096f58f68746d5ce | PHP | Maimouna60/KENEYA | /models/users.php | UTF-8 | 11,406 | 3.21875 | 3 | [] | no_license | <?php
class users {
public $id = 0;
public $lastname = '';
public $firstname = '';
public $mail = '';
public $password = '';
public $id_dom20_roles = 0;
private $table = '`dom20_users`';
private $db = NULL;
public function __construct()
{
$this->db = dataBase::getInstanc... | true |
36e26d2224a4cb74c4f38ee98f27bb2ad9abda67 | PHP | wbaiyy/volunteer | /common/models/AdminSchool.php | UTF-8 | 25,717 | 2.71875 | 3 | [] | no_license | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "admin_school".
*
* @property string $id
* @property string $name
* @property string $success_rate
* @property integer $location
* @property integer $batch
* @property integer $type
* @property integer $spec
* @property string $... | true |
cb58f7131f757beeb4ac893d06aa3dd8473c38b2 | PHP | tonci/Simple-PHP-ORM | /src/SimpleORM/Validators/DBValidator.php | UTF-8 | 3,463 | 2.890625 | 3 | [] | no_license | <?php
namespace SimpleORM\Validators;
// use SimpleORM\Validators\NumberValidator;
// use SimpleORM\Validators\StringValidator;
// use SimpleORM\Validators\DateValidator;
// use SimpleORM\Validators\EmailValidator;
// require (__DIR__.'/NumberValidator.php');
class DBValidator extends Validator {
private $object... | true |
d38b91ef8f4c5c9a71b3251531fb0daf5557debb | PHP | alaster1985/agromax | /app/Social.php | UTF-8 | 718 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Social extends Model
{
protected $fillable = [
'name',
'contact',
];
public static function getSocials()
{
$socials = Social::all();
return $socials;
}
public static function getSocialById($id... | true |
703412aa9f6fcd8f21982dca19dff2e31d3c8d6c | PHP | shipcore-nl/postnl-api-php | /src/Util/Util.php | UTF-8 | 2,377 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* The MIT License (MIT)
*
* Copyright (c) 2017 Thirty Development, LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the... | true |
d90ed3e4d76fc3d2a9be8780b22037ae5765186f | PHP | teslimni/insightclassified | /includes/admin/addons-mp/admin.php | UTF-8 | 6,318 | 2.640625 | 3 | [] | no_license | <?php
/**
* Admin setup class for the AppThemes add-ons marketplace.
*
* @package Components\Add-ons
*/
/**
* Main admin class for displaying the add-ons markeplace browser.
*/
class APP_Addons extends scbAdminPage {
/**
* Constructor.
*
* Setup the Add-ons admin page.
*
* @param string $page_slu... | true |
3cdf005a084555408008406179f4998f5e3ea6e0 | PHP | alexgaa/video_searcher | /app/models/content/FinalAnalysis.php | UTF-8 | 9,899 | 2.796875 | 3 | [] | no_license | <?php
namespace brands\app\models\content;
use \brands\vendor\core\db\DB;
use \brands\app\models\db\DbWork;
/**
* Description of FinalAnalysis
*
* @author aleksey.ga
*/
class FinalAnalysis
{
public $error='';
private $id_input_url;
public function allDataCheck($link, $arrayAllData)
{
//пр... | true |
de5230f9f276c4b1eeca7611d5cf428de9a63f6a | PHP | persilee/MSG | /Application/Common/Common/FileToZip.class.php | UTF-8 | 1,542 | 3.0625 | 3 | [] | no_license | <?php
/**
* 遍历目录,打包成zip格式
*/
namespace Common\Common;
class FileToZip{
private $zipdir; //需要压缩的目录
private $savepath; //压缩文件保存目录
private $fileArr; //需要压缩的目录下所有元素集合
private $zipname ; //压缩完成后的文件
private $zipFile ; //压缩文件完整路径文件名
public function __construct($zipdir,$savepath){
$this->zi... | true |
f099fe384deede420f69a2c0d25127dd86a29320 | PHP | MorioFukuda/challenge-cto | /level2.php | UTF-8 | 3,575 | 3.21875 | 3 | [] | no_license | <?php
//yamlを読み込むライブラリ
require_once('spyc.php');
$csvRaw = file_get_contents('booklist.csv');
$tsvRaw = file_get_contents('booklist.tsv');
$ymlRaw = file_get_contents('booklist.yml');
function csvConverter($csv){
$encodingList = "UTF-8, UTF-7, ASCII, EUC-JP, SJIS, eucJP-win, SJIS-win, JIS, ISO-2022-JP";
//1行以上の改... | true |
d567b6099e1d9c25f09615865a4709328882aa4d | PHP | Mzapeka/RemCon | /Core/Model/Admin.php | UTF-8 | 1,166 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Mzapeka
* Date: 17.11.15
* Time: 22:23
*/
namespace Model;
class Admin {
public function getDevices(){
global $db;
$allDevices = $db->select('devices');
return $allDevices;
//ToDo: make method getDevices()
}
public function get... | true |
396011408c1880d3652eef5fe67e663dbff3436f | PHP | Steepik/max-sp | /domains/lumen.tr/app/Currency.php | UTF-8 | 702 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Currency extends Model {
protected $fillable = [
'name', 'english_name', 'alphabetic_code', 'digit_code', 'rate'
];
protected $hidden = [];
public static function updateCurrency($data)
{
if (! empty($data) && ! ... | true |
820a520f80c19fb77ee933dcd75a6164f3e11be6 | PHP | im286er/shop-1 | /App/Lib/Model/UserTrainingModel.class.php | UTF-8 | 920 | 2.765625 | 3 | [] | no_license | <?php
/**
* 用户培训经历类
*
* @author miaomin
* Mar 10, 2014 4:54:16 PM
*
* $Id$
*/
class UserTrainingModel extends Model {
/**
*
* @var DBF
*/
protected $DBF;
/**
*
* @var DBF_UserTrain
*/
public $F;
/**
* 用户培训经历类
*/
public function __construct() {
$this->DBF = new DBF ();
$this->F = ... | true |
c28d2a7f79d4177a85ac0e4decff062f1e5832de | PHP | marwenhlaoui/AnalysePhpFunction | /inc/function.php | UTF-8 | 4,247 | 2.734375 | 3 | [] | no_license | <?php
function debug($variable)
{
echo '<pre>' . print_r($variable, true) . '</pre>';
}
function dd($data)
{
return die(debug($data));
}
// on cherche le nombre de pages visitées depuis le début (création du site)
function allPageVisited(){
if ( ! isset($connection)) {
global $connecti... | true |
c71b285f995c9b9acc9311382832b1b5e3e370e4 | PHP | QoboLtd/cakephp-cms | /config/Migrations/20160321144838_UpdateArticlesFields.php | UTF-8 | 733 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Migrations\AbstractMigration;
class UpdateArticlesFields extends AbstractMigration
{
/**
* Change Method.
*
* More information on this method is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-change-method
* @return void
*/
public function change()... | true |
7006389aa6c753ccf8fbc6e4f410dbbf4f50af54 | PHP | Xenocidious/www | /StageOpdracht/connect_contact.php | UTF-8 | 946 | 2.84375 | 3 | [] | no_license | <? include "navigation.php"; ?>
<?php
$servername = "localhost";
$username = "root";
$password = "mysql";
$dbname = "CarWash";
$connect = new mysqli ('localhost', 'root', 'mysql', 'CarWash') or die ('Could not connect');
if($connect -> connect_error) {
die('Connection failed.');
} echo "Your form was successfully i... | true |
5e4c8a85b5cdd7d847f1c5a16f8e25a94bfa0fe1 | PHP | TomasJancik/emailing | /iMailRecipient.php | UTF-8 | 1,021 | 3.203125 | 3 | [] | no_license | <?php
namespace Emailing;
interface iMailRecipient {
public function __construct($email, $name = null);
/**
* Set the name of recipient
* @param string $name
*/
public function setName($name);
/**
* Set the mail address
* @param string $email
*/
public funct... | true |
bff6d3fa2a1314f40230d62ff207d89eb2257bb1 | PHP | 442623641/web | /foodstack/application/controllers/api/Lotterys.php | UTF-8 | 1,630 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
//require APPPATH . '/libraries/REST_Controller.php';
/**
* This is an example of a few basic user interaction methods you could use
* all done with a hardcod... | true |
2e4a1ad42da3806c9fef606932ebd7eb7cf97959 | PHP | Rubelrana802/doctorghor | /app/Http/Controllers/doctorViewController.php | UTF-8 | 1,799 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\medicine;
use App\patient;
use Auth;
use DB;
class doctorViewController extends Controller
{
function index()
{
return view('doctor.medicineview.viewmedicine');
}
function action(Request $request)
{
if($request->aj... | true |
25d2efada772bf8f7220763cc1360f82cac17b8e | PHP | JulesDebeaumont/Quote-Machine | /src/Repository/QuoteRepository.php | UTF-8 | 2,286 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Entity\Quote;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @method Quote|null find($id, $lockMode = null, $lockVersion = null)
* @method Quote|null findOneBy(array $criteria, array $orderBy = null)
* ... | true |
725b403993f433e5860e8dc12f8f9a19fc14d38e | PHP | willypalacin/PW_PWPOP_GROUP_08 | /src/Model/UserRepositoryInterface.php | UTF-8 | 533 | 2.765625 | 3 | [] | no_license | <?php
namespace SallePW\SlimApp\Model;
interface UserRepositoryInterface
{
public function save(User $user);
public function findUser(User $user);
public function findUserByUsername(User $user) : bool;
public function findUserById(string $id) : string;
public function validateAccount(string $usernam... | true |
1705d6ff3d6a8d677fc3aa2247f52b6e7fab90f7 | PHP | jostyftm/agora.docentes | /App/Model/TeacherModel.php | UTF-8 | 5,138 | 2.875 | 3 | [] | no_license | <?php
namespace App\Model;
use App\Config\DataBase as DB;
/**
*
*/
class TeacherModel extends DB
{
private $table = 'docentes';
private $table_auth = 'sec_users';
function __construct($db='')
{
if(!$db)
throw new \Exception("La clase ".get_class($this)." no encontro la base de datos", 1);
else
paren... | true |
5d522a32571433f792fa663b8ced7b1a63906734 | PHP | joel-s/portfolio | /PHP/2014-Homework/02-06/hello.php | UTF-8 | 410 | 3.34375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Greetings!</title>
</head>
<body>
<?php
ini_set ('display_errors', 1); // Let me learn from my mistakes!
error_reporting (E_ALL | E_STRICT); // Show all possible problems!
// Say "Hello" to the name specified in the URL parameter (e.g. ?name=Joe)
$name = ... | true |
02bb053a851f4a7f59fa52530934598f05d81741 | PHP | MineDeepRock/box_system | /src/box_system/pmmp/items/BoxItem.php | UTF-8 | 804 | 2.71875 | 3 | [] | no_license | <?php
namespace box_system\pmmp\items;
use box_system\models\AmmoBox;
use box_system\models\Box;
use box_system\models\DecoyBox;
use box_system\models\FlareBox;
use box_system\models\MedicineBox;
use pocketmine\item\Item;
abstract class BoxItem extends Item
{
static function fromBox(Box $box): ?BoxItem {
... | true |
160e666c6f2347e9e494826e4a6e7fcf7e394fb8 | PHP | tkr-saitou/kamimine-test | /html/kamimine/base/cllib/ModelManager.php | UTF-8 | 2,474 | 2.96875 | 3 | [] | no_license | <?php
/**
* Model管理Class
*/
class ModelManager {
private $conn;
private $user_id;
private $transaction_id;
private $logger;
private $journal;
function __construct($conn,$user_id,$transaction_id,$logger=null,$journal=null) {
$this->conn = $conn;
$this->user_id = $user_id;
... | true |
23cf23faf172c9b2f2ae291ef2167e58f26f9786 | PHP | nataki/yiiexample | /protected/migrations/m110228_135154_create_table_static_page.php | UTF-8 | 1,109 | 2.640625 | 3 | [] | no_license | <?php
class m110228_135154_create_table_static_page extends CDbMigration {
public function up() {
$tableName = 'static_page';
$columns = array(
'id' => 'pk',
'url_keyword' => 'string NOT NULL',
'title' => 'string',
'meta_description' => 'text',
'content' => 'text',
'position' => 'integer'
);
... | true |
c8f833f64292a0cac4630c63b5b663380551d3d2 | PHP | C4T-BuT-S4D/training-17-11-19 | /services/anilist/src/anidb/database/migrations/2019_11_12_185523_create_anime_table.php | UTF-8 | 1,375 | 2.625 | 3 | [
"WTFPL"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAnimeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anime', function ... | true |
fcc6fb556a203ffc532c5506e3643466c5ca5317 | PHP | tudorcatalin2013/mvcBlogDaily | /Models/DBModel.php | UTF-8 | 679 | 3.078125 | 3 | [] | no_license | <?php
class DBModel
{
//well , we know what this does :)
const HOST="localhost";
const USER="tpopa";
const PASS="parola2015";
const DB="tpopa";
private $connection;
public function __construct(){
$this->connection=new mysqli(self::HOST,self::USER,self::PASS,self::DB);
... | true |
04e32b65064494f33c79b459119707e446b6826c | PHP | kanuto123/SmartBPMonitoring | /api/login.php | UTF-8 | 1,164 | 2.671875 | 3 | [] | no_license | <?php
session_start();
require('../templates/initialization.php');
$con=mysqli_connect($GLOBALS['dbHost'],$GLOBALS['dbUsername'],$GLOBALS['dbPassword'],$GLOBALS['dbName']);
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
die();
}
$post = $_POST;
if (!... | true |
28193f6bbab0814bb76a45d913f4042b312d97b6 | PHP | kapigsaan/online-course-management-system | /application/models/m_profile.php | UTF-8 | 746 | 2.5625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class M_profile extends CI_Model
{
public function get_profiles()
{
$sql = "SELECT * FROM profiles";
$query = $this->db->query($sql);
return $query->num_rows() > 0 ? $query->row() : FALSE;
}
public function insert_profil... | true |