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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3e609e857793d124bdadb74f323d138f4728e40e | PHP | architshin/SocymSlimMVC | /classes/exceptions/CustomErrorRenderer.php | UTF-8 | 2,388 | 3.03125 | 3 | [] | no_license | <?php
namespace SocymSlim\MVC\exceptions;
use Throwable;
use Psr\Container\ContainerInterface;
use Slim\Interfaces\ErrorRendererInterface;
use Slim\Views\Twig;
use Slim\Error\Renderers\HtmlErrorRenderer;
use Slim\Exception\HttpNotFoundException;
use SocymSlim\MVC\exceptions\DataAccessException;
class CustomErrorRende... | true |
72dcb772dd2f0d9f0c6a1b96ae9debd95faa5e87 | PHP | dindaaemia15/latihan | /php/soal2.php | UTF-8 | 225 | 2.96875 | 3 | [] | no_license | <?php
$a = 375000;
$b = 25000/2;
$c = 625000;
$f = 24;
$g = $c - $a;
$h = $g/$b;
$i = $f+$h;
echo "Harga sewa mobil 24jam pertama : " .$a;
echo "<br> kena denda : " .$b;
echo "<br> jadi jerry menyewa mobil selama :" .$i;
?>
| true |
5444fc6d29fb8be315bfe633f098383514e8bb19 | PHP | Nantonov2020/belbin_laravel | /database/seeders/TestUnitsSeeder.php | UTF-8 | 1,827 | 2.5625 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use App\Models\Company;
use App\Models\Department;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class TestUnitsSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{... | true |
41a9442d65c196e9cd7c28fa3756ca13d1a25277 | PHP | electric-eloquence/fepper-drupal | /backend/drupal/core/lib/Drupal/Core/Routing/PreloadableRouteProviderInterface.php | UTF-8 | 561 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-other-copyleft",
"GPL-2.0-or-later",
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Drupal\Core\Routing;
/**
* Extends the router provider interface to pre-load routes.
*/
interface PreloadableRouteProviderInterface extends RouteProviderInterface {
/**
* Pre-load routes by their names using the provided list of names.
*
* This method exists in order to allow performance... | true |
95490dd73c01700a862df3afe6a72bd6908c6d76 | PHP | ixcel4prescott/WebBasedConferencing | /common/base_controller.php | UTF-8 | 3,677 | 2.703125 | 3 | [] | no_license | <?
class BaseController extends controller
{
var $uses = array();
var $helpers = array();
var $components = array();
// stopwatch for timing actions
var $actionStart;
// define actions that we omit from checkAccess()
var $publicActions = array();
// define actions that must be over https
... | true |
ce6226876123bffbfa4eb82c04353da241875fe1 | PHP | JWizerd/php-projects | /OOP/class_extend_car.php | UTF-8 | 188 | 3.09375 | 3 | [] | no_license | <?php
include('class_car.php');
class Plane extends Car {
}
$bird = new Plane();
echo '<p>the plane extends in such that is has <strong>' . $bird->wheels . '</strong> wheels also.</p>';
| true |
9f24d53f226fecd9a5194fa64a123000879d12d4 | PHP | legattes/novicetrainee | /php/controller/Empresa.php | UTF-8 | 6,285 | 2.5625 | 3 | [] | no_license | <?php
require_once "../php/dao/Dao.php";
require_once "../php/Session.php";
require_once "../php/model/Vaga.php";
require_once "../php/Validation.php";
class Empresa extends Dao
{
public function loginPOST()
{
//verifica $_POST
//escape strings (prepare)
$cnpj = $_POST['cnpj'] ?? '';... | true |
f96ae976c0de1b28f96c093c9bd6756a82a39f98 | PHP | carollousdc/saproject | /application/models/pendapatan_sql.php | UTF-8 | 2,585 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') or exit('No direct script access allowed');
class Pendapatan_sql extends CI_Model
{
private $tabel = "pendapatan";
public function add($absensi)
{
return $this->db->insert($this->tabel, $absensi);
}
public function gets()
{
$query = $this->db->get($this->tabel);
return $query->r... | true |
1b27ff6a19a713ba0b9a3956a59f2ca85f3c1058 | PHP | hsemix/yuga-framework | /src/Yuga/Database/Query/Transaction.php | UTF-8 | 3,764 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Yuga\Database\Query;
use Yuga\Database\Query\Exceptions\DatabaseQueryException;
use Yuga\Database\Query\Exceptions\TransactionHaltException;
/**
* Class Transaction
*
* @package Yuga\Database\Query
*/
class Transaction extends Builder
{
protected $transactionStatement;
/**
* @param... | true |
f88388ecc6fdcc967f68b97737992a95bb8bef93 | PHP | liuyuchen01/noah_php | /moshuchangliang/__FILE__.php | UTF-8 | 162 | 2.546875 | 3 | [] | no_license | <?php
// 文件的完整路径和文件名。如果用在被包含文件中,则返回被包含的文件名。
echo '该文件位于 " ' . __FILE__ . ' " ';
?> | true |
e45d4b6a65344dd2096309e64cd3c52296f1bb38 | PHP | russsiq/bixbite | /app/Contracts/Actions/Attachment/UpdatesAttachment.php | UTF-8 | 356 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Contracts\Actions\Attachment;
use App\Models\Attachment;
interface UpdatesAttachment
{
/**
* Validate and update the given attachment.
*
* @param Attachment $attachment
* @param array $input
* @return Attachment
*/
public function update(Attachment $attac... | true |
8323bc0941485fd3c4dbd9dc959e7bb2178782cd | PHP | iclanzan/cms | /modules/gleez/classes/controller/autocomplete.php | UTF-8 | 3,817 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php defined('SYSPATH') or die('No direct script access.');
class Controller_AutoComplete extends Controller {
public function before()
{
// Ajax request only!
if ( !$this->request->is_ajax() )
{
throw new HTTP_Exception_404('Accessing an ajax request <small>:type</small> externally', array(
... | true |
d90e5460881c1f79361faaa945afdc250d1aa9f1 | PHP | trialforce/blend | /src/datahandle/files.php | UTF-8 | 313 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace DataHandle;
/**
* Simple class to deal with files super global
*/
class Files extends DataHandle
{
/**
* Construct the files
* @SuppressWarnings(PHPMD.Superglobals)
*/
public function __construct()
{
parent::__construct($_FILES);
}
} | true |
155604aa89b529e899269e39663c6565cc6dfb83 | PHP | Uthmordar/symfony_wikebec | /src/AppBundle/Entity/Listener/DefinitionListener.php | UTF-8 | 865 | 2.546875 | 3 | [] | no_license | <?php
namespace AppBundle\Entity\Listener;
use AppBundle\Entity\Definition;
use Doctrine\ORM\Event\LifecycleEventArgs;
class DefinitionListener{
protected $mailer;
protected $backuper;
public function __construct($mailer, $backuper){
$this->mailer=$mailer;
$this->backuper = $backuper;... | true |
82124c0e3edb0137205a6689ada81e1ea3fce46c | PHP | burgerballer44/tailgate-api-old | /src/Actions/Group/DeletePlayerAction.php | UTF-8 | 1,073 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace TailgateApi\Actions\Group;
use Psr\Http\Message\ResponseInterface;
use TailgateApi\Actions\AbstractAction;
use Tailgate\Application\Command\Group\DeletePlayerCommand;
use Tailgate\Application\Query\Group\GroupQuery;
use Tailgate\Domain\Service\Group\DeletePlayerHandler;
use Tailgate\Domain\Service\Gro... | true |
097e7bf701785a7b509fb4d82af165b100531a0a | PHP | Riftan13/tugas_weekend_php | /tugas_week_1d.php | UTF-8 | 342 | 3.28125 | 3 | [] | no_license | <?php
$r = 14;
$t = 10;
$phi = 22/7;
function luas_tabung($r,$t,$phi){
return 2*$phi*$r*($r+$t);
}
echo "4. Sebuah tabung memiliki jari – jari dan tinggi masing – masing 14 cm dan 10 cm, <br> maka tentukan lah berapa luasnya ? <br>";
echo "<b>Jadi, luasnya adalah : <b>",luas_tabung($r,$t,$phi)," cm<s... | true |
28abdff7e0bd21960a0818a58f7927741a418f64 | PHP | makara-dev/netra | /database/seeds/PromosetTableSeeder.php | UTF-8 | 759 | 2.625 | 3 | [] | no_license | <?php
use App\Promoset;
use Illuminate\Database\Seeder;
class PromosetTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
$data = [
// argust set 1
[
'promoset_name' =... | true |
7eb251206eb42001b71e3841b35ed9b30123a0ef | PHP | AyushTinu/patient-app-system | /admin/clinic_region.php | UTF-8 | 2,780 | 2.84375 | 3 | [] | no_license | <?php
require 'admin_dbcon.php';
session_start();
?>
<!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>Document</title>
</head>
<body>
<form a... | true |
f65bfb418c33fa5562d562640bbf0e03636e2a4f | PHP | nikdjordjevic/Portfolio | /5_PHP_zadaci_basic/10.php | UTF-8 | 1,283 | 4 | 4 | [] | no_license | <?php
/* Odrediti proizvod brojeva od $n do $m koji su deljivi sa 7 a nisu sa 3, a potom od njega oduzeti zbir brojeva od $n do $m koji su deljivi sa 3 a nisu sa 7:
a) Koristeći while petlju
b) Kotisteći for petlju */
echo "<p>a)</p>";
$n = 1;
$m = 21;
$sum = 1;
$sum2 = 0;
while (... | true |
5f0f093826d02847131052dabe7e56c47ed5a7f1 | PHP | akki44/School-System-by-REST-API | /insert.php | UTF-8 | 945 | 2.5625 | 3 | [] | no_license | <?php
$conn = mysqli_connect('localhost',"root","","api_db");
if ($_SERVER["REQUEST_METHOD"] === 'POST')
{
$name = $_REQUEST["name"];
$description = $_REQUEST["description"];
$price = $_REQUEST["price"];
$category_id = $_REQUEST["category_id"];
$created = $_REQUEST["created"];
$modifie... | true |
5758520c04dcb7176fbb66b1312fe0de3c9dc100 | PHP | Timoniann/kit | /models/Testings.php | UTF-8 | 512 | 2.828125 | 3 | [] | no_license | <?php
class Testings extends Model
{
public function add($user_id, $test_id, $questions_count, $answered_count)
{
$user_id = (int)$user_id;
$test_id = (int)$test_id;
$questions_count = (int)$questions_count;
$answered_count = (int)$answered_count;
$date = date('Y-m-d H:i:s');
$sql = "INSERT INTO $this->... | true |
f718cfaf7294008b0279380a11326d906ea34023 | PHP | jasbulilit/Zipcode | /src/AbstractCSV.php | UTF-8 | 3,799 | 2.953125 | 3 | [] | no_license | <?php
/**
* 郵便番号CSV
*
* @author Jasmine
* @link https://github.com/jasbulilit/Zipcode
* @package ZipcodeCSV
*/
namespace ZipcodeCSV;
abstract class AbstractCSV {
const FILTER_CHAIN_READ = 'read';
const FILTER_CHAIN_WRITE = 'write';
/**
* The field delimiter
*
* @var string
*/
protected $delimiter ... | true |
8e9f9862ce766d9953d526f0ffe8325a31dbece9 | PHP | niloyrudra/pubs-bars-plugin | /inc/Controllers/TemplatesController.php | UTF-8 | 1,195 | 2.625 | 3 | [] | no_license | <?php
/**
*
* Template Controller Class
* ==========================
*
* @package pubs-bars-plugin
* @version 1.0.0
*
*/
namespace Inc\Controllers;
class TemplatesController
{
public $templates;
public function register_templates()
{
$this->templates = [
'templates... | true |
80485e37a9e9cbc53bbc476c348a165d9a101332 | PHP | 9rj/mautic-form-submit | /src/Mautic/Contact.php | UTF-8 | 2,976 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Escopecz\MauticFormSubmit\Mautic;
use Escopecz\MauticFormSubmit\Mautic\Cookie;
/**
* Mautic Contact
*/
class Contact
{
/**
* Mautic contact IP address
*
* @var string
*/
protected $ip;
/**
* Mautic Cookie
*
* @var Cookie
*/
protected $cookie;... | true |
29f0caee81e283ec54dce04d0aaf848928a64019 | PHP | iamqamarali/Eeno | /Eeno/src/routing/contracts/RouteInterface.php | UTF-8 | 232 | 2.53125 | 3 | [] | no_license | <?php
namespace Eeno\Routing\Contracts;
interface RouteInterface{
public function name($name = null);
public function controller();
public function method();
public function function();
public function url();
} | true |
b0d4812f80c2b34366468a0f641789d835c0b350 | PHP | tishma/vacations_module | /model/VacationManager.php | UTF-8 | 528 | 2.921875 | 3 | [] | no_license | <?php
namespace service;
use model\VacationRequest;
class VacationManager {
/**
* VacationManager constructor.
*/
public function __construct() {
}
public function acceptRequest( VacationRequest $vacationRequest ) {
$vacationRequest->setStatus(VacationRequest::STATUS_ACCEPTED);
$vacationRe... | true |
5dd52c8281e1beba162b400b597b19d37bf74d39 | PHP | Kein1945/IKStock | /src/IK/StockBundle/Model/Attribute/AbstractExtension.php | UTF-8 | 1,212 | 2.625 | 3 | [] | no_license | <?php
namespace IK\StockBundle\Model\Attribute;
use IK\StockBundle\Entity\Attribute\Category;
use IK\StockBundle\Entity\Attribute\Value;
use IK\StockBundle\Entity\Product;
abstract class AbstractExtension
{
protected $category;
protected $product;
protected $value;
function __construct... | true |
6d6e4cf62e71f3be1d2853a6b297b9bc2dde907b | PHP | sindukisna/bimbinganonline | /application/modules/mhs/models/Isi_model.php | UTF-8 | 764 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
class Isi_model extends CI_Model{
private $_table = "kerangkas";
public $isi_id;
public $nim;
public $konten;
public $koreksi;
public $idb;
public $id_sub;
public $judul_subab;
public function rules()
{
return [
['field' => 'id_sub',
... | true |
ca2a9e94d7f3feb6a978a687d7c4c7e6ac8600ea | PHP | SwedbankPay/swedbank-pay-sdk-php | /src/SwedbankPay/Api/Service/Payment/Resource/Data/PaymentInterface.php | UTF-8 | 2,214 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace SwedbankPay\Api\Service\Payment\Resource\Data;
use SwedbankPay\Api\Service\Data\ResourceInterface;
use SwedbankPay\Api\Service\Payment\Resource\Request\Data\PayeeInfoInterface;
use SwedbankPay\Api\Service\Payment\Resource\Request\Data\UrlInterface;
/**
* Payment request resource interface
*
* @api... | true |
d3cda85d37e8f0d710dfadcb9a2fbe9b634143a6 | PHP | legacy-fatcode/storage | /tests/Hydration/Type/EmbedTypeTest.php | UTF-8 | 1,524 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace FatCode\Tests\Storage\Hydration\Type;
use FatCode\Storage\Hydration\Type\EmbedType;
use FatCode\Tests\Storage\Fixtures\User;
use FatCode\Tests\Storage\Fixtures\UserName;
use FatCode\Tests\Storage\Fixtures\UserSchema;
use FatCode\Tests\Storage\Fixtures\UserWallet;
use MongoDB\B... | true |
c60dad56ccd7051e916635d7db2fc3bc221d1c56 | PHP | manishgautam30/PHP-Implementation | /session/view.php | UTF-8 | 403 | 2.65625 | 3 | [] | no_license | <?php
session_start();
echo $_SESSION["stu"]; // to strat the function
echo "<br>";
session_unset(); // to delete the session variables only erases the values of the session variable but the variables are still there in the memory
echo "all sessions are ended!";
// or we can use this session_destroy(); but this ... | true |
6a3a8fd2c7e21230f10ac152b8915ccfe35af958 | PHP | udivankin/yii-paypal | /protected/components/PayPalExpress.php | UTF-8 | 8,388 | 2.546875 | 3 | [] | no_license | <?php
/**
* PayPalExpress.php
*
* https://github.com/udivankin/yii-paypal
*
* @author STDev <yii@st-dev.com>
* @author allx <alexey@udivankin.ru>
* @copyright 2014 allx <alexey@udivankin.ru>
* @license released under dual license BSD License and LGP License
* @package PayPal
* @version 1.0
*/
class PayPalEx... | true |
23ec1f674ac7d791f51443972cd6d093066136f4 | PHP | arklines/cis355 | /Homework/TeeTymeBetter/tt_Courses/Server/ServerCreate.php | UTF-8 | 2,252 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
//error_reporting(E_ALL);
//ini_set("display_errors", 1);
session_start();
if(empty($_SESSION["user"])){
echo "NoUser";
exit;
}
if(!($_SESSION["user"]=== "admin@svsu.edu") ){
echo "Unauthorized access";
exit;
}
include_once '../../config.php';
include_once(ROOT_DIR . '/InputObjects/Inpu... | true |
0adb4261d8ff0a427598f620f00da2de6ec1361c | PHP | greg0ire/Rector | /src/Rector/MagicDisclosure/UnsetAndIssetToMethodCallRector.php | UTF-8 | 3,387 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Rector\Rector\MagicDisclosure;
use PhpParser\Node;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Isset_;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Unset_;
use Rector\Node\Attribute;
use Rector\Node\MethodCallNodeFactory;
use Rector\Rector\Abs... | true |
1e93e638b503ebf2baa7bfa55073754741f75c27 | PHP | Shahriar-Shadhin/Online_department_management_system | /app/Imports/TeachersImport.php | UTF-8 | 788 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Imports;
use App\Models\Teacher;
use Maatwebsite\Excel\Concerns\ToModel;
use Illuminate\Support\Facades\Hash;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
use Maatwebsite\Excel\Concerns\Importable;
class TeachersImport implements ToModel,WithHeadingRow
{
use Importable;
/**
* @param... | true |
cf5bfdbf1773595f85c004bab0797b3c45f02607 | PHP | dmcardoso/AlternativeLab | /ScriptsPHP/array_asort.php | UTF-8 | 508 | 3.203125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Daniel
* Date: 06/02/2019
* Time: 10:21
*/
$frutas = array("d" => "limao", "a" => "laranja", "b" => "banana", "c" => "melancia");
arsort($frutas);
foreach ($frutas as $chave => $valor) {
echo "{$chave} = {$valor} <br>";
}
echo "-------------------------"... | true |
82e00e38a7b308f24b37c8102b76647b2707c2dc | PHP | LoraMS/ProgrammingBasicsPHP | /Homeworks/SimpleConditionalStatements/metric-converter.php | UTF-8 | 1,732 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
$num = readline();
$firstMetric = strtolower(readline());
$secondMetric = strtolower(readline());
$convertValue = 0.0;
$result = 0.0;
if ($firstMetric === "mm") {
$convertValue = $num / 1000;
} elseif ($firstMetric === "cm") {
$convertValue = $num / 100;
} elseif ($firstMetric === "mi") {
$convertV... | true |
cd78827a6a50ecb959dbca7f54b1d7fa03a624ce | PHP | santhapa/ci-mag-cms | /application/modules/media/helpers/media_helper.php | UTF-8 | 280 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
function getAllMediaSources()
{
$CI = &get_instance();
$mediaManager = $CI->container->get('media.media_manager');
$medias = $mediaManager->getMedias();
$mediaArray = array();
foreach ($medias as $md) {
$mediaArray[] = $md->getSource();
}
return $mediaArray;
}
| true |
db5797ee3b251ddb4ce1adc5d0bbfb5eb734fa44 | PHP | wilsontwm/instagram_social | /app/Http/helpers.php | UTF-8 | 916 | 3.53125 | 4 | [
"MIT"
] | permissive | <?php
/**
* Truncate the string if exceeded a max limit
* @param $string
* @param int $chars
* @return string
*/
function substr_with_ellipsis($string, $chars = 100)
{
preg_match('/^.{0,' . $chars. '}(?:.*?)\b/iu', $string, $matches);
$new_string = $matches[0];
return ($new_string === $string) ? $stri... | true |
6cbcdc5a0c7a25c59be904659b3a9d09d98749f4 | PHP | jramirezgranada/supershoes | /app/Http/Controllers/Api/ArticleController.php | UTF-8 | 2,926 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Http\Requests\CreateArticleRequest;
use App\Http\Resources\Article as ArticleResource;
use App\Models\Article;
class ArticleController extends Controller
{
/**
* Load all the articles that are in the Database.
* @ret... | true |
5abe422d1ea4ac4b5efefe392c67fd349072808f | PHP | Covid19-Applications/MZ-DRM-WebApp | /code.php | UTF-8 | 2,394 | 2.59375 | 3 | [] | no_license | <?php
include('security.php');
if(isset($_POST['registerbtn']))
{
$username = $_POST['username'];
$email = $_POST['email'];
$password = $_POST['password'];
$cpassword = $_POST['confirmpassword'];
$usertype = $_POST['usertype'];
$state = $_POST['state'];
$email_query = "SELECT * F... | true |
6831aedd508fbf8863563c236e6df1a5d9589a17 | PHP | scottybo/LinkedIn-API-client-v2 | /src/AuthenticatorInterface.php | UTF-8 | 1,313 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Scottybo\LinkedIn2;
use Scottybo\LinkedIn2\Exception\LinkedInException;
use Scottybo\LinkedIn2\Http\LinkedInUrlGeneratorInterface;
use Scottybo\LinkedIn2\Storage\DataStorageInterface;
/**
* This interface is responsible for the authentication process with LinkedIn.
*
* @author Tobias Nyholm <tobia... | true |
b1f138529dd1aa78ad59acff3be041db69ab8b44 | PHP | emlycool/friend-finder-App | /engine/insert.php | UTF-8 | 27,650 | 2.703125 | 3 | [] | no_license | <?php
session_start();
include_once("database.php");
include_once("../processes/functions.php");
require_once('ImageManipulator.php');
include_once('../processes/my-functions.php');
if (isset($_POST['create_admin'])) {
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
$admin_email = protect_value($_POST['admi... | true |
0d012670ed0589769d2fa87019f183e086c48388 | PHP | violinist-dev/swapp | /src/Repository/TeamRepository.php | UTF-8 | 277 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Repository;
use App\Entity\Team;
interface TeamRepository
{
/**
* @param int|string $id
*
* @return Team|null
*/
public function findOneById($id): ?Team;
public function save(Team $team): void;
}
| true |
85b03e243e6488609cdf23939645e50c010777d1 | PHP | hugoliegeard/SilexLyon | /src/TechNews/Provider/NewsControllerProvider.php | UTF-8 | 2,737 | 2.609375 | 3 | [] | no_license | <?php
namespace TechNews\Provider;
use Silex\Api\ControllerProviderInterface;
use Silex\Application;
class NewsControllerProvider implements ControllerProviderInterface
{
/**
* {@inheritDoc}
* @see \Silex\Api\ControllerProviderInterface::connect()
*/
public function connect(Application $app)
... | true |
e110e9d8da10ab8a2d2d1545e8c0cdcebb9a6477 | PHP | NemanjaMandic/PDORegistration | /blog/blogs.php | UTF-8 | 1,164 | 2.65625 | 3 | [] | no_license | <?php
echo "<h3>Last Blogs</h3>";
$qBlogs = "
SELECT `blog`.`id` as `blodz_id`,
`blog`.`title` as `blodz_tajtl`,
`blog`.`text` as `blodz_text`,
`blog`.`date` as `blodz_dejt`,
`blog`.`category_id` as `blog_cat_id`,
`blog`.`user_id` as `blog_user_id`,
`bl... | true |
7961ef7a8f17ac8b0ea38ea76d93799eeec7366e | PHP | MCU-Sule/praktikum-4-2072050 | /Praktikum 4/Soal 2/indexHasil.php | UTF-8 | 2,351 | 2.90625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="author" content="Puji Mei Indriana Sihombing">
<title>Hasil</title>
</head>
<body>
<table style="background-color: Chartreuse" border="1" align="center" cellspacing="... | true |
efaac5cb5ad914c4563063e9ea705f48781664d3 | PHP | dereckleme/bidtravel | /module/Base/src/Base/Entity/Leilao.php | UTF-8 | 2,183 | 2.890625 | 3 | [] | no_license | <?php
namespace Base\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Leilao
*
* @ORM\Table(name="leilao")
* @ORM\Entity
*/
class Leilao
{
CONST TEXT_TIME_FINISH = "Tempo Esgotado";
/**
* @var integer
*
* @ORM\Column(name="idleilao", type="integer", nullable=false)
* @ORM\Id
* @O... | true |
73894efe956c0377874538f37230e1604599d2f7 | PHP | MattRvt/plongee | /src/controller/controllerNewPlongeur.php | UTF-8 | 4,410 | 2.890625 | 3 | [] | no_license | <?php
class controllerNewPlongeur extends controller
{
private $num;
private $nom;
private $prenom;
private $dateCertif;
private $aptitude;
private $active;
public function __construct($url)
{
if (isset($url) && count($url) > 1) {
throw new Exception('Page introuva... | true |
9e18e523b92b0d5534736c371ffd605aa0058c6e | PHP | FrenchYeti/seddkit | /src/TaintedScalar.php | UTF-8 | 4,013 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace Seddkit;
/**
* class for one tainted string
*/
class TaintedScalar extends Tainted
{
/**
* String that is tainted
* @var mixed
*/
protected $data;
protected $bypass = array();
// Control access to the value
// It is TRUE only when a derivation or a bypass happe... | true |
db0a43eb293131befe6a9423d942d95bdb8f0419 | PHP | SEARCAPhil/archives | /application/helpers/pager_helper.php | UTF-8 | 1,058 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/**
* set the current class of page indicator to active if it equal on requested page
* @param integer $page_nav item_index
* @param integer $page requested_page
* @return string add active class
*/
function page_indicator($page_nav,$page=1){
echo $indi=$page_nav==$page?"active":'';
}
/... | true |
7eb5a82ba60b8fbb768e8924c5268a95cc6dcb97 | PHP | Ingvar-91/server-demo | /app/Http/Controllers/Api/v1/Admin/UsersController.php | UTF-8 | 2,317 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api\v1\Admin;
use App\Http\Controllers\Api\v1\RestController;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
use App\Http\Models\Admin\Users;
use Image;
class UsersController extends RestController {
public function index(Request $request) :... | true |
cd4439a30c4ed55b7601b958c79c58c059005c45 | PHP | EvokeNet/humhub | /protected/modules/missions/controllers/MissionsController.php | UTF-8 | 4,723 | 2.625 | 3 | [] | no_license | <?php
namespace humhub\modules\missions\controllers;
use Yii;
use app\modules\missions\models\Missions;
use app\modules\languages\models\Languages;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* MissionsController implements the CRUD actions for Missions model.
*/
cla... | true |
c71f50cf65abd4a9cfbe4bfcb7d5a9c2383b489d | PHP | yashj302/ERM | /live login/Employee/ERM/examples/Test.php | UTF-8 | 358 | 2.65625 | 3 | [] | no_license | <?php
include "db_con.php";
echo "0 results";
$sql = "SELECT UserId, UserName, EmailId, PhoneNumber FROM employee";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
echo "UserId: " . $row["UserId"]. " - Name: " . $row["UserName"]. " " . $row["EmailId"]."Ph nu".$row["PhoneNumber"... | true |
5a9dd8924275bc21c09e2ebb5545efd1c3e2fbdc | PHP | SolidNetSoftware/plugin-cerberus | /models/cerberus_orgs.php | UTF-8 | 3,918 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
class CerberusOrgs extends CerberusModel {
public function __construct()
{
parent::__construct();
}
public function doesOrgExists($client_id, &$cerb_org_id /* REF */)
{
$cerb_org_id = null;
$cerb_org_custom_field_name = Configure::get('cerberus.custom.fieldset.name.o... | true |
48ec342c6daa14a5728edeb94ef6cd65b3d648a7 | PHP | elchris/easysql | /com/github/elchris/easysql/tests/integration/ConnectedApplicationTest.php | UTF-8 | 9,511 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created with PhpStorm.
* User: Chris Holland
* Date: 12/11/14
* Time: 12:29 PM
*/
namespace com\github\elchris\easysql\tests\integration;
use com\github\elchris\easysql\EasySQLContext;
use com\github\elchris\easysql\tests\EasySQLUnitTest;
class MyApp extends ExampleBaseModel
{
private $arrayMod... | true |
02f742b8b3c374ad1813e76a2a8256579d120077 | PHP | BigRoomStudios/PivotalTrackerBundle | /Services/PivotalTrackerService.php | UTF-8 | 5,650 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: charlie
* Date: 2/07/13
* Time: 10:10 AM
* To change this template use File | Settings | File Templates.
*/
namespace Dreamoftrees\PivotalTrackerBundle\Services;
use Monolog\Logger;
class PivotalTrackerService extends \pivotal {
protected $logger;
pro... | true |
0ed9b8f9f8850c6e750758d2f552509d06edd9c7 | PHP | 31431/orbital | /Ajax/test.php | UTF-8 | 366 | 2.515625 | 3 | [] | no_license | <?php
include("databaseconnection.php");
session_start();
$errMessage='';
$username=trim($_POST['username']);
$password=trim($_POST['password']);
echo "username: $username and password: $password ";
$username='31431';
$x = '$2y$10$lHl6a6hL.rNxPzLB5vvdIO9j95hbMcLyOIRHEUAJkG6zoflzZhNCK';
//$password=password_hash($_POST... | true |
332a8f2b3212670c8b37d546bc49e08f56830d37 | PHP | shadowppz/NotAnemicDomainModel | /src/Domain/Discount/Entity/Discount.php | UTF-8 | 700 | 3.015625 | 3 | [] | no_license | <?php
namespace Domain\Discount\Entity;
class Discount
{
/** @var string */
private $id;
/** @var int */
private $amount;
/** @var float */
private $percent;
/** @var int */
private $minPrice;
/**
* @return string
*/
public function getId(): string
{
r... | true |
2f236dd0b863ce72b7d7a9c867437ae54045691c | PHP | camt-mmit/2020-01-954246-lab05-associative-array-felicia188 | /hw5-3and4.php | UTF-8 | 2,990 | 3.390625 | 3 | [] | no_license | <?php
/*
Try to use some structure like:
$gradeData = [
'A' => [
'score' => 4,
'students' => [],
],
'B' => [
'score' => 3,
'students' => [],
],
'C' => [
'score' => 2,
'students' => [],
],
'D' => [
'score' => 1,
... | true |
696b09e2214df4ad4945f8728409df5bafe79938 | PHP | Marin-Fa/BLOG-MVC-PHP-P4 | /model/CommentManager.php | UTF-8 | 3,043 | 2.625 | 3 | [] | no_license | <?php
namespace Blog\model;
use Blog\model\Comment;
use PDO;
class CommentManager extends Manager
{
/**
* Get all comments on a post
*/
public function getComments($postId)
{
$db = $this->dbConnect();
$comments = $db->prepare('SELECT id, post_id, author, comment, status, DATE_F... | true |
ed830b96d45953857f1803b2e98249c1e55fd361 | PHP | alex-rysaev/php-project-lvl1 | /src/games/Even.php | UTF-8 | 554 | 3.34375 | 3 | [] | no_license | <?php
namespace BrainGames\Even;
use function BrainGames\Engine\engine;
use const BrainGames\Engine\ROUNDS_COUNT;
function isEven($number)
{
return $number % 2 == 0;
}
function brainEven()
{
$mission = 'Answer "yes" if the number is even, otherwise answer "no".';
for ($i = 0; $i < ROUNDS_COUNT; $i++) ... | true |
450a26cd9b5aa9f2eba3ec80fb197b375d5662f2 | PHP | Mys9ys/gosudarstvo | /classes/human.php | UTF-8 | 654 | 2.703125 | 3 | [] | no_license | <?php
require_once __DIR__ . '/AbstractModel.php';
/**
* Created by PhpStorm.
* User: Мусяус
* Date: 24.01.2017
* Time: 18:26
*/
class human
extends AbstractModel
{
protected static $table = 'human';
// public $name;
// public $money;
// public $job;
function getClassName(){
echo __... | true |
3d1592762d3002f141b458f75f5497a0b08979ac | PHP | yitaodong/322 | /veggieplayers-master/postJSON.php | UTF-8 | 935 | 2.84375 | 3 | [] | no_license | <?php
/*$myObj = array("postname" => "New Post", "text" => "Hi!"); $myJSON = json_encode($myObj);
echo $myJSON;
*/
$postID = $_POST['postID'];
$nc = count($postID);
if ($nc > 1){
foreach($postID as $aPostID){
$postID =... | true |
0572155fab7e7038af2fabea4527ba2fb8b6ca03 | PHP | jeremyliu8/AAHelper | /createStudent.php | UTF-8 | 3,123 | 2.59375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Create Student</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-selec... | true |
53b827903cb13468abe7bc2649a41b2df4fb431d | PHP | lajayuhniyarsyah/OpenPrint | /models/AccountPaymentTerm.php | UTF-8 | 2,903 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "account_payment_term".
*
* @property integer $id
* @property integer $create_uid
* @property string $create_date
* @property string $write_date
* @property integer $write_uid
* @property boolean $active
* @property string $note
*... | true |
72e2276eafade06f64035580da999ff9aa7a57fa | PHP | Zoorken/Knom07-10 | /incl/article/showAllArticle.php | UTF-8 | 661 | 2.875 | 3 | [] | no_license | <?php
//
//Connect to database
$db= new PDO("sqlite:$dbPath");
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); // Display errors.
//
// Create a select/option list of the articles
$stmt = $db->prepare('SELECT * FROM Article WHERE category = "article";');
$stmt->execute();
$res = $stmt->fetchAll(PDO::FETCH_A... | true |
e07acecf9c3ee1a54817fc9eae80aa798a6082b1 | PHP | jebranali/coalition | /app/common.php | UTF-8 | 1,211 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: jebram
* Date: 6/22/2019
* Time: 1:08 AM
*/
use \Illuminate\Support\Facades\Storage as Storage;
use Carbon\Carbon as Carbon;
function add_products($request)
{
$products = get_existing_products();
$data = $request->only(['product_name', 'quantity', 'price']);
... | true |
7ae31dfa0410cb11ddeef8bf75cf108f39c97df2 | PHP | directorjoelhayes/lawn-service-app | /core/classes/orders/Order.php | UTF-8 | 2,801 | 2.84375 | 3 | [] | no_license | <?php
class Order {
private $data;
private $date;
private function servicesActive($services){
foreach($services as $service){
if((int)$service['active']==1){
return true;
}
}
}
private function activeServices($services){
$active_services = [];
foreach($... | true |
0587f4845e210900db36d25cd88fd43547182b58 | PHP | adventurer19/PHP-HTML-CSS-basics | /php-String-Processing/Reverse-Strings.php | UTF-8 | 129 | 2.9375 | 3 | [] | no_license | <?php
while(($input = readline())!="end")
{
$reverseWord=strrev($input);
echo $input.' = '.$reverseWord.PHP_EOL;
}
?> | true |
49ba6ec614057cf1745c3c5da7a7164b36ad5412 | PHP | SOF3/simple-plugins | /ChatMarkdown/src/SOFe/ChatMarkdown/Pattern.php | UTF-8 | 1,298 | 2.78125 | 3 | [
"Unlicense"
] | permissive | <?php
/*
* simple-plugins
*
* Copyright (C) 2018 SOFe
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | true |
cf4ff50bbc7b5edb622d0232c6c0f335bc602782 | PHP | mkierczak/synop | /src/Decoder/GroupDecoder/IndexDecoder.php | UTF-8 | 731 | 2.9375 | 3 | [] | no_license | <?php
namespace Synop\Decoder\GroupDecoder;
/**
* Description of IndexDecoder
*
* @author Dmytriyenko Vyacheslav <dmytriyenko.vyacheslav@gmail.com>
*/
class IndexDecoder implements GroupDecoderInterface
{
private $raw_index;
public function __construct(string $raw_index)
{
... | true |
37ec81150f17584ee2233124411285e5738d64d5 | PHP | godiane/VidYouThinkPHP | /include/db/comment.php | UTF-8 | 5,510 | 2.796875 | 3 | [] | no_license | <?PHP
/**
* Comment
*
* @author DIGO
*/
require_once __DIR__ . '/../formvalidator.php';
require_once __DIR__ . '/../utils.php';
class CommentT
{
//----- Variables -------
var $video_id;
var $id;
var $yt_comment_id;
var $name;
var $comment;
var $insert_timestamp;
va... | true |
2ef575f09bc761f5ab7e52e25c30d4f70da7b2ad | PHP | shuvro-zz/presentator | /common/models/ScreenCommentForm.php | UTF-8 | 6,707 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
use yii\base\Model;
use yii\base\InvalidParamException;
use common\models\User;
use common\models\Project;
use common\models\ScreenComment;
/**
* ScreenComment form model.
*
* @author Gani Georgiev <gani.georgiev@gmail.com>
*/
class ScreenCommentForm extends Model
{
con... | true |
3b52892da18f6cd9c5543228bd86c4df319bf360 | PHP | xiaozouzyk1/Library | /图书管理系统程序文件/源程序/sql_add_user_level.php | UTF-8 | 1,368 | 2.546875 | 3 | [] | no_license | <?php
//获取表单
$user_level =$_GET["user_level"];
$sum_book = $_GET["sum_book"];
if($user_level==1){
if($sum_book >= 10){
$sql="UPDATE users SET user_level =user_level+1 WHERE user_account='$user_account'";
$result = execute_sql($link, "library2.0", $sql);
if($result){
echo "<h3 align='center'>升级成功<h3>";
... | true |
052675d268283bf542736d84cf799942d9f8264a | PHP | kentoje/php-project | /src/classes/Like.php | UTF-8 | 1,591 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
class Like {
private $id_like;
private $id_user;
private $id_event;
function __construct( $idLike, $idUser, $idEvent )
{
$this->id_like = $idLike;
$this->id_user = $idUser;
$this->id_event = $idEvent;
}
public function getIdLike()
{
return $this->id_like;
}
... | true |
b8263d3139e24648bd28cd729c7883cc0140be50 | PHP | hxxy2003/WelHair | /src/www/vendor/rych/phpass/src/PHPassLib/Hash.php | UTF-8 | 2,137 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP Password Library
*
* @package PHPassLib\Hashes
* @author Ryan Chouinard <rchouinard@gmail.com>
* @copyright Copyright (c) 2012, Ryan Chouinard
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
* @version 3.0.0-dev
*/
namespace PHPassLib;
/**
* Hashing Module Interfac... | true |
2e7b5900e71106b09030f277354bdc7cc6d8c9a3 | PHP | Johnderirol/Epidex | /src/Entity/CompEtoile.php | UTF-8 | 4,020 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use Cocur\Slugify\Slugify;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\CompEtoileRepository;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity(repositoryClass=CompEtoileRepository::class)
* @ORM\HasLifecycleCallbacks()... | true |
e00ffeadc04f50b91ba6d869436d9341b1702f86 | PHP | yongzhihuang/shrkcoAngular | /src/server/lib/hash.php | UTF-8 | 515 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
function hash_password($input, $rounds = 7)
{
$salt = "";
$salt_chars = array_merge(range('A','Z'), range('a','z'), range(0,9));
for($i=0; $i < 22; $i++) {
$salt .= $salt_chars[array_rand($salt_chars)];
}
return crypt($input, sprintf('$2a$%02d$', $rounds) . $salt);
}
function va... | true |
19e067d67228b4ff61c76c0e0517f5a5ac3c65fd | PHP | voximplant/apiclient-php | /src/Resources/Params/GetCallerIDsParams.php | UTF-8 | 1,102 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Voximplant\Resources\Params;
class GetCallerIDsParams
{
/** @var number The id of the callerID object to filter */
public $callerid_id;
/** @var string The phone number to filter */
public $callerid_number;
/** @var boolean The active flag to filter */
public $active;
/*... | true |
db6b3580f8075da55ecab079579caaac977eb204 | PHP | trong291990/bravo | /app/models/StaticPage.php | UTF-8 | 1,024 | 2.890625 | 3 | [] | no_license | <?php
class StaticPage extends Eloquent {
protected $table = 'static_pages';
public $timestamps = false;
protected $fillable = ['title', 'content', 'meta_keyword', 'meta_description'];
static $VALID_NAMES = [
'why-travel-with-us', 'terms-and-condition', 'faq',
'join-our-team', 'about-u... | true |
4c118cc42ace4db17a1cf183f7a81164cd2ca64a | PHP | NamTong1998/pure_php | /views/apps/home.php | UTF-8 | 3,529 | 2.640625 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title> Homepage </title>
<link rel="stylesheet" type="text/css" href="../../assets/style.css">
<script type="text/javascript" src="../../assets/form_validate.js"> </script>
<script type="text/javascript">
$(document).ready(function()
{
$('#dbtable')... | true |
cf23226b8703180a34951e5119532012f9a78029 | PHP | Nonju/WebbShop | /Webbshop/hiddenScripts/user/LoginUser.php | UTF-8 | 1,660 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: hannesalbinsson
* Date: 2015-03-18
* Time: 16:54
*/
require("../../hiddenScripts/DbLogin.php");
require("../../hiddenScripts/user/passwordCrypt.php");
if(isset($_POST['submit-logon-form']) && $_POST['submitUsername'] !== 'Användarnamn') {
$user_ID; //userID to be set ... | true |
c19d1e02d3f3ddbbefb6b244a4aefc907fd22290 | PHP | marquez-mollee-wm/last-project-2016 | /signup.php | UTF-8 | 2,798 | 2.9375 | 3 | [] | no_license | <?php
require_once('header.php')
?>
<head>
<link rel="stylesheet" href="css/signstyle.css">
</head>
<body>
<section>
<h1>Welcome to <em>Moviez</em></h1>
<p>Make an account to be able to make a page.</p>
</section>
<style>
#logBtn {
color: #b71c1c;
}
</style>
<?php
require_once('appvars... | true |
82be6adcd4e24d62b1e0cf1ccffd62e811050d6b | PHP | pabloeuy/motte | /src/misc/mteMail.class.php | UTF-8 | 8,707 | 2.828125 | 3 | [] | no_license | <?php
/**
* Clase para el manejo de mails (Wrapper para phpMailer)
*
* @filesource
* @package motte
* @subpackage misc
* @version 1.0
* @license http://opensource.org/licenses/gpl-license.php GNU Public license
* @author Pedro Gauna (pgauna@gmail.com) /
* Carlos Gagliardi (carlosgag@gmail.com) /
* Brau... | true |
0e5b12d9a88864f2daac2a6af7b1cb39346f41d3 | PHP | ualejandroc/first-lara | /database/seeds/ProductTableSeeder.php | UTF-8 | 1,167 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Product;
class ProductTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('product')->delete();
$arrayPeliculas = array(
array(
'name'=>'... | true |
731d3257fadc4340550e6129e4965517b92f07c7 | PHP | juliano-barros/serverAmount | /test/CalculatorTest.php | UTF-8 | 7,288 | 2.90625 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
use ServerAmount\Calculator;
use ServerAmount\Machine\ServerMachine;
use ServerAmount\Machine\VirtualMachine;
use ServerAmount\Exceptions\NoVirtualMachineException;
use ServerAmount\Exceptions\InvalidResourceException;
use ServerAmount\Exceptions\InvalidVirtualMachineException;
/... | true |
2135e69895c47dab149706c3f95b865030f09619 | PHP | jstewmc/interval | /src/Interval.php | UTF-8 | 11,735 | 3.59375 | 4 | [
"MIT"
] | permissive | <?php
/**
* The file for an interval
*
* @author Jack Clayton <clayjs0@gmail.com>
* @copyright 2016 Jack Clayton
* @license MIT
*/
namespace Jstewmc\Interval;
use InvalidArgumentException;
/**
* A numeric interval
*
* @since 0.1.0
* @since 0.2.0 add support for infinity
*/
class Interval
{
... | true |
8f0efadc39d0e6f039415c44c808b672c8ae78b4 | PHP | dungtran9/TH-Rectangle | /index.php | UTF-8 | 373 | 3.40625 | 3 | [] | no_license | <?php
include "rectangle.php";
$width = 10;
$height=20;
$rectangle = new Rectangle($width,$height);
echo $rectangle->width."<br>";
echo $rectangle->height."<br>";
$rectangle->height=30;
$rectangle->width=20;
echo $rectangle->height."<br>";
echo $rectangle->width."<br>";
echo $rectangle->getArea()."<br>";
echo $rectangl... | true |
497d99a67943cbcb7112d1942b00209531518743 | PHP | jin123456bat/home | /application/model/product.php | UTF-8 | 7,802 | 2.625 | 3 | [] | no_license | <?php
namespace application\model;
use system\core\model;
use system\core\filesystem;
/**
* 商品数据模型
* @author jin12
*
*/
class productModel extends model
{
/**
* 商品状态在销售
* @var unknown
*/
const ONSALE = 1;
/**
* 商品状态不在销售
* @var unknown
*/
const NOSALE = 2;
function ... | true |
7c1ed4511efcb417ed396267b0f77424bf3a0a91 | PHP | louisth63000/ppe2 | /ppe2_php/Louis/pages/ChoixSauce/ChoixSauceController.php | UTF-8 | 2,233 | 2.625 | 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.
*/
/**
* Description of ChoixSauceController
*
* @author utilisateur
*/
class ChoixSauceController {
public function inclu... | true |
c0ce93bc29c5f970a7f36eba246c451ef142907b | PHP | ajwgibson/destiny | /app/database/migrations/2016_06_08_185916_add_activity_choices_to_children.php | UTF-8 | 725 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddActivityChoicesToChildren extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('children', function(Blueprint $table)
{
$table->string('activity_c... | true |
c4b4a02eac9367e29da34d2cab1e0d1bbe5fa9b3 | PHP | megavanilla/miatests.ru | /test_task/mvc/controllers/Auth.php | UTF-8 | 1,232 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Mikhaylov I.A.
* Date: 05.09.2017
* Time: 14:21
*/
namespace mvc\controllers;
use mvc;
Class Auth
{
public function login($request = [])
{
$Request = new mvc\libs\Request();
$Auth = new mvc\models\Auth();
$login = $Request->getVariable($request, ['login'... | true |
a3f3d5b5668b07de09c8ff310555b00da5da041e | PHP | daosonit/admin | /app/Handlers/Events/SendEmailHotelBookingSuccessToCustomer.php | UTF-8 | 892 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Handlers\Events;
use App\Events\HotelBookingWasSuccessed;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldBeQueued;
use Mail;
class SendEmailHotelBookingSuccessToCustomer {
/**
* Create the event handler.
*
* @return void
*/
public function __construct()
{... | true |
df86f3f972340fab11d09a8862b6c67bcab3ae0f | PHP | DaniellaSapir/SeekingAlpha | /SeekingAlpha - DaniellaSapir Task/initialize.php | UTF-8 | 472 | 2.671875 | 3 | [] | no_license | <?php
require_once 'classes/db.php';
//Define the project CONSTANTS
define("COOKIE_NAME", "user_id");
//Files const
define("FILES_PATH", dirname(__FILE__));
//LOGIN - if no cookie show login page (enough to check if there is any cookie)
if(isset($_COOKIE[COOKIE_NAME])) {
$user_id = $_COOKIE[COOKI... | true |
b613bca39db173dd1fdc5f95a8ad4a08fc58000b | PHP | qaz734913414/PHP_Plugins | /plugin58.php | UTF-8 | 1,453 | 3.03125 | 3 | [] | no_license | <?php // 插件58:接收tweet消息
/***************
*Owner: 水木
*Licence: GPL
*Description:
*PHP功能插件开发应用
*Blog: www.4u4v.net
*Email: admin@4u4v.net
**********************/
$user = 'eminem';
$result = DOPHP_GetTweets($user);
echo "Viewing '$user':<br /><ul>";
if (!$result[0]) echo 'Failed';
else
for ($j = 0 ; $j < $... | true |
bc41ec7484561397fd4a0a3f91ccd2f1dfc20f65 | PHP | Bulveyz/bulvdrop | /classes/addons/Login.php | UTF-8 | 914 | 2.578125 | 3 | [] | no_license | <?php
use RedBeanPHP\R;
class Login
{
public function __construct()
{
$this->login = $_POST['login'];
$this->password = $_POST['password'];
$this->errors = [];
}
function login()
{
$load_user = R::findOne('users', 'login = ?', array($this->login));
if ($load_user)
{
if (passwo... | true |
f4ec27eac04632e5a4f8aaef0d7eddd97c959673 | PHP | fdiba/smallData | /small_data/php/retrieve_works.php | UTF-8 | 1,604 | 2.625 | 3 | [] | no_license | <?php
retrieve_works();
//-------------------------------- functions --------------------------------------//
function retrieve_works(){
require("../access/connexion.php");
//---------------
$sth = $dbh->query('SELECT imeb_music.award_year, imeb_music.award_price,
imeb_music.award_cat, imeb_music... | true |
e58ecb6633713f006362e54228e74b572cff8792 | PHP | akondratenkeo/myproject_ll | /www/main/library/Core/Http/AbstractController.php | UTF-8 | 2,507 | 2.640625 | 3 | [] | no_license | <?php
namespace Core\Http;
use BadMethodCallException;
use Illuminate\Container\Container;
use Rakit\Validation\Validator;
use Symfony\Component\Templating\Helper\SlotsHelper;
abstract class AbstractController
{
/**
* The container instance.
*
* @var \Illuminate\Container\Container
*/
pro... | true |
9524d2acfe829061bbb9e4e0b9b23624d87b8718 | PHP | glofru/Cinema | /MagicBoulevardCinema/Controller/CGestoreREST.php | UTF-8 | 2,397 | 2.828125 | 3 | [] | no_license | <?php
/**
* La classe GestoreREST contiene i metodi necessari a poter rendere l'app RESTFULL ritornando come risultato oggetti che verranno poi espressi in formato JSON.
* Class CGestoreREST
* @access public
* @author Lofrumento - Di Santo - Susanna
* @package Controller
*/
class CGestoreREST
{
/**
* Fu... | true |