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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4551dcfc55a9fc781bb4dec836ba759e9c885674 | PHP | dvandam/php | /php.php | UTF-8 | 1,386 | 3.09375 | 3 | [] | no_license | <?php
use Collection\Map;
use Collection\Set;
use Collection\String;
require_once __DIR__ . "/vendor/autoload.php";
//$words = new Set(file('http://lamp.epfl.ch/files/content/sites/lamp/files/teaching/progfun/linuxwords.txt', FILE_IGNORE_NEW_LINES));
$words = new Set(["dit", "zijn", "wat", "woorden"]);
$nummer = "34... | true |
8d25d44ca2412617a4f98b160b6973519e54ec17 | PHP | lidelin/phalapi-framework | /src/Foundation/DI.php | UTF-8 | 3,920 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace PhalApi\Foundation;
use ArrayAccess;
use Closure;
use PhalApi\Exceptions\InternalServerError;
/**
* Class DI
*
* @property \PhalApi\Foundation\Request $request 请求
* @property \PhalApi\Responses\Json $response 结果响应
* @property \PhalApi\Contracts\Crypt ... | true |
b0fd96ab974d3207f747bdc392b04bed9f8c2494 | PHP | slavkoss/fwphp | /fwphp/glomodul/z_examples/FLEX_minisite2017/YearlyCalendar.php | UTF-8 | 2,155 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
//https://drive.google.com/drive/folders/1P85zb07pu_cp0EdgSSuNZGyI74rYoRu2?usp=sharing
//2017.12.05
$show_year = date('Y'); //2020
if (isset($_GET['y'])) { $show_year = $_GET['y'] ;}
function make_month_html($month, $year)
{
$first_day = mktime(0, 0, 0, $month, 1, $year);
/*
// date() has lots... | true |
272269d2df13ac6963f1fc4ad3fcf5ccb6f9b298 | PHP | milsen/safeplace | /www/webfrontend.php | UTF-8 | 4,935 | 2.78125 | 3 | [] | no_license | <?php
include '../util.php';
include '../solver.php';
include '../reader.php';
include '../checklist.php';
function _encode($data)
{
return base64_encode(gzcompress(serialize($data)));
}
function _decode($data)
{
return unserialize(gzuncompress(base64_decode($data)));
}
class WebFrontend
{
private $solver;
pr... | true |
81ff249abdb0d8fae9f652329dfc7a60b57955fa | PHP | bitbluegit/dxadmin | /framework/src/Mysql.php | UTF-8 | 4,139 | 3.421875 | 3 | [] | no_license | <?php
namespace Framework;
use PDO;
use Exception;
use PDOException;
/**
* Class MySql
*
* Rather than working with native extension, we will use PDO. It provides a database
* abstraction layer so that we do not need learn vendor specific data-access
* techniques.
*/
class Mysql
{
/**
* @var Resource
*
... | true |
e9ad0a27a00d081c893993e2cea47a97f06c40ce | PHP | sohophp/schemaorg | /src/Thing/CreativeWork/Article/TechArticle.php | UTF-8 | 1,699 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Sohophp\SchemaOrg\Thing\CreativeWork\Article;
use Sohophp\SchemaOrg\Thing\CreativeWork\Article;
/**
* A technical article - Example: How-to (task) topics, step-by-step, procedural troubleshooting, specifications, etc.
* @see http://schema.org/TechArticle
* @package Sohophp\SchemaOrg\Thing\CreativeWork... | true |
8523adbb3301676831a1a1653828a3b952acbb7f | PHP | Wakkos/bm-pa-los-panas | /phpums_20/lib/inc/secure.php | UTF-8 | 1,485 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @name: secure.php
* @author: alessandro
* @version: 2.1
*/
class Secure
{
/* Function: Secure() !! Constructor !! *\
* Description: runs secureGET or securePOST to each entry in $_GET and $_POST. *
\* Parameters: $u... | true |
76f0dfca762e343bcd22da99ec387633011ef492 | PHP | filchakov/reffactoring_test | /Customer/CustomerInterface.php | UTF-8 | 100 | 2.640625 | 3 | [] | no_license | <?php
interface ICustomer
{
public function getEmail();
public function getCreatedAt();
} | true |
e9ef1162aaef029ba3e69fb26c4b31788ef56079 | PHP | andreskrey/tothebestof | /application/vendors/mjohnson/transit/src/Transit/File.php | UTF-8 | 9,239 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @copyright Copyright 2006-2013, Miles Johnson - http://milesj.me
* @license http://opensource.org/licenses/mit-license.php - Licensed under the MIT License
* @link http://milesj.me/code/php/transit
*/
namespace Transit;
use Transit\Exception\IoException;
use \Closure;
/**
* Handles the management ... | true |
4653c94a58a37966bf6fc5ea81d02cefcbb852b5 | PHP | iljandrejev/placet-homework | /symfony/tests/App/Tests/CalculatorTest.php | UTF-8 | 1,370 | 2.625 | 3 | [] | no_license | <?php
namespace App\Tests;
use App\Entity\Customer;
use App\Factory\CustomerFactory;
use App\Services\Scoring\ScoreCalculator;
use PHPUnit\Framework\TestCase;
class CalculatorTest extends TestCase
{
public function testScoreCalculator()
{
$customer = CustomerFactory::createCustomer(
"E... | true |
2c57ac31c5a1411b81ec1c72dec2480b39b5212b | PHP | isaacloud-getresults/www-locations | /templates/global.php | UTF-8 | 1,625 | 2.859375 | 3 | [] | no_license | <?php
/************************** display global statistics **********************************/
include ("./funkcje/statistics.php"); //include class Statistics
$obiekt= new Statistics;
$data= $obiekt->create_statistic($res1);
$obiekt1= new Statistics;
$visits= $obiekt1->amount_of_visits($resA);
/******************... | true |
3ee15ca30877adb16ca0bfc1a59910a0a43c5e15 | PHP | trasvz/PBKK_E | /app/models/User.php | UTF-8 | 1,529 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Models;
use Phalcon\Mvc\Model;
use App\Models\Resultset\custom;
class User extends Model
{
public $id;
public $name;
public $email;
/**
* Dipanggil sekali untuk digunakan seluruh instance
*/
public function initialize(){
// Untuk mengeset database service y... | true |
51d8f06e6b77d76fe2b73b7d3a735c67bd6634a4 | PHP | guillaume-jehanno/aztrek | /model/entity/sejour_entity.php | UTF-8 | 2,596 | 2.59375 | 3 | [] | no_license | <?php
function getEnAvantDeGuingamp()
{
/* @var $connection PDO */
global $connection;
$query = ' SELECT *
FROM sejour
WHERE sejour.en_avant = 1';
$stmt = $connection->prepare($query);
$stmt->execute();
return $stmt->fetchAll();
}
function getOneSejour(int $id)
{
/* @v... | true |
67b2968776fcfaa34345f842d9235a81fa3fe555 | PHP | KrishnaT26/php-intership | /day8/distable1.php | UTF-8 | 1,456 | 2.609375 | 3 | [] | no_license | <?php
echo "<p><center><p style='font-size:30px;'><a style='background-color:#00ff00' href='CRUD.php'>Add Record</a><br/></p></center>";
//display table
$conn=mysqli_connect("localhost","root","","day6");
$qry=mysqli_query($conn,"select * from tbl_student") or die(mysqli_error($conn));
echo "<center><table bor... | true |
a22012ec60d7c0c5e73b719ea6a1f7364ae6e197 | PHP | microsoftgraph/msgraph-beta-sdk-php | /src/Generated/Models/ItemPhone.php | UTF-8 | 3,986 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Microsoft\Graph\Beta\Generated\Models;
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
class ItemPhone extends ItemFacet implements Parsable
{
/**
* Instant... | true |
724abaaa018627055d4d8cca92044e44a7f12175 | PHP | dhw99/blog01 | /app/Http/Models/Link.php | UTF-8 | 763 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Models;
use Illuminate\Database\Eloquent\Model;
use Validator;
class Link extends Model
{
public $table = 'link';
protected $primaryKey = 'link_id';
protected $guarded = [];
//表单验证
public function check($data){
$rules = [
'link_name'=>'required|max:30'... | true |
d71aabf1f9cae3b73fbde20ff2ffc3ba9140ad93 | PHP | leychan/leetcode | /dynamic-program/climbing-stairs.php | UTF-8 | 987 | 4.0625 | 4 | [] | no_license | <?php
class Solution {
static $dp = [];
/**
* @param Integer $n
* @return Integer
*/
function climbStairs($n) {
self::$dp[1] = 1;
self::$dp[2] = 2;
if (isset(self::$dp[$n])) {
return self::$dp[$n];
}
self::$dp[$n] = $this->climbStairs($n ... | true |
6b5820eb64ba7ef375fab065b0e72ddc7dc203b0 | PHP | jqngomez91/cube-summation-test | /app/Http/Controllers/CubeController.php | UTF-8 | 2,452 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Request;
use App\Http\Controllers\Controller;
use App\Helpers\Punto;
class CubeController extends Controller {
public function summation(){
$input = Request::input('entrada');
$T = substr($input, 0,1); // N pruebas
$O = str_replace("\r... | true |
8c911582d76b0a132585b2de37407eed1970a16e | PHP | vgiselbrecht/composer-app-framework | /src/ComposerAppFramework/Logger.php | UTF-8 | 764 | 2.84375 | 3 | [] | no_license | <?php
/**
* Logger
*
* @copyright Copyright © 2018 Staempfli AG. All rights reserved.
* @author valentin.giselbrecht@staempfli.at
*/
namespace ComposerAppFramework;
class Logger
{
const ERROR = "error";
const NOTICE = "notice";
var $config = [];
/** @var Helper */
var $helper = null;
... | true |
f5232163d6a9079f7f14753f89b7c5323e4f30a8 | PHP | jontorregano/phpFoodSite | /Structure/update.php | UTF-8 | 6,227 | 3.078125 | 3 | [] | no_license | <!DOCTYPE HTML>
<html>
<head>
<title>PDO - Update a Record - PHP CRUD Tutorial</title>
<!-- Bootstrap -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="libs/bootstrap-3.3.7/css/bootstrap.min.css" />
<!-- HTML5 Shiv and Respond.js IE8 support of HTML5 elements and media que... | true |
3845394ded5ac051f2073c7cd4e4615fc035bd3c | PHP | patinthehat/new-php-project | /classes/CodeGeneration/PHPTestCodeGenerator.php | UTF-8 | 898 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace NPP\CodeGeneration;
class PHPTestCodeGenerator implements ICodeGenerator
{
public static function generate($project = null, $param = null)
{
$sourceFile = "$param";
$funcs = array();
$className = "";
if (file_exists($sourceFile)) {
$data = file_get_contents($sourceFile... | true |
1a9b52ff02638ddfe59b817055f2b9131a87ae8a | PHP | VoDuyNghia/cart_tons | /app/Http/Controllers/Admin/Auth/ForgotPasswordController.php | UTF-8 | 2,185 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin\Auth;
use App\User;
use App\Jobs\SendEmail;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use App\Mail\ForgotPasswordAdmin;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class Fo... | true |
26d6c341f0a6051da06073508c83510d43d92658 | PHP | orchestral/avatar | /src/Provider.php | UTF-8 | 930 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Orchestra\Avatar;
use Orchestra\Avatar\Contracts\Handler;
class Provider
{
/**
* Handler instance.
*
* @var \Orchestra\Avatar\Contracts\Handler
*/
protected $handler;
/**
* Construct a new avatar provider.
*/
public function __construct(Contracts\Handler... | true |
48a7dc04fd51fb5ead9622973033b5f2657801d6 | PHP | fruit/symfony1 | /lib/task/sfCommandApplicationTask.class.php | UTF-8 | 2,499 | 2.9375 | 3 | [
"BSD-3-Clause",
"ICU",
"MIT"
] | permissive | <?php
/*
* This file is part of the symfony package.
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Base class for tasks that depends on a sfCommandApplication ... | true |
051db90e4a4360d3a0d042b6bf81fb26abf94efd | PHP | 9mudontwork/tac-bot | /application/controllers/Auth.php | UTF-8 | 2,820 | 2.53125 | 3 | [] | no_license | <?php
defined('BASEPATH') or exit('No direct script access allowed');
class Auth extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->library('encryption');
$this->load->library('form_validation');
$this->load->model('Database_m... | true |
e8f5775a052aa82fa639531c132aaaf05a98aefa | PHP | kuuza/KuuzuCart | /Kuuzu/KU/Core/Session.php | UTF-8 | 1,146 | 2.5625 | 3 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla"
] | permissive | <?php
/**
* Kuuzu Cart
*
* @copyright (c) 2007 - 2017 osCommerce; http://www.oscommerce.com
* @license BSD License; http://www.oscommerce.com/bsdlicense.txt
*
* @copyright Copyright c 2018 Kuuzu; https://kuuzu.org
* @license MIT License; https://kuuzu.org/mitlicense.txt
*/
namespace Kuuzu\KU\Core;
use Kuu... | true |
e13bf103f6f69377e12c87ac8c7be68c33a9e5c6 | PHP | ShwetaS13/Ecommerce-Project--IncomeZing | /selected_events.php | UTF-8 | 939 | 2.859375 | 3 | [] | no_license | <?php
$dbuser = "root";
$dbpass = "your_password";
$dbhost = "localhost";
$dbname = "ECOMM";
$myusername = $_POST['username'];
$date = getdate("Y/M/D");
//create a connection
$connector = mysql_connect($dbhost,$dbuser,$dbpass);
if ($connector) echo "could connect with server";
els... | true |
4210c3007e04e6bdc4a59578d462cac8784d62d9 | PHP | hissy/kintone-php | /src/Object.php | UTF-8 | 1,702 | 2.859375 | 3 | [] | no_license | <?php
namespace Kintone;
use Kintone\Request;
use Kintone\Response;
class Object
{
const VERSION = '0.0.1';
protected $command = '';
/* @var Kintone\Request */
private $request;
/* @var GuzzleHttp\Message\Response */
private $response;
public function getCommand() { return $this-... | true |
216f3574a44270cc219094861b24862cc0a68ead | PHP | DannikInfo/eduWEB | /edu/files/pages/handler.php | UTF-8 | 13,427 | 2.640625 | 3 | [] | no_license | <?
function getCloudLink(){
require 'files/lib/db.php';
$query = "SELECT * FROM groups WHERE grup='".$_SESSION['group']."'";
$stmt = mysqli_query($connect, $query) or die(mysqli_error($connect));
$result = mysqli_fetch_assoc($stmt);
return $result['cloud'];
}
function thisDir(){
$cDir = getCwd();
$a... | true |
83ed2aa4704d55d68e11e9bf7c713276cea69c5e | PHP | Mordiq/hali-saha-app | /backend/bildirim-gonder.php | UTF-8 | 630 | 2.59375 | 3 | [] | no_license | <?php
require("sistem/baglan.php");
if ($_POST){ // Sayfada post olup olmadığını kontrol ediyoruz.
// Sayfa yenilendikten sonra post edilen değerleri değişkenlere atıyoruz
$kullanici_id=$_POST['kullanici_id'];
$mesaj = $_POST['mesaj'];
$takimid = $_POST['takimid'];
$tip = $_POST['tip'];
$kay... | true |
749dbf8a6d090f212423966bae02ef6d4661ad9b | PHP | kingston-enterprises/icarus-framework | /form/BaseField.php | UTF-8 | 1,629 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author kingston-5 <qhawe@kingston-enterprises.net>
* @package icarus\form
* @license For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace kingston\icarus\form;
use kingston\icarus\Model;
// TODO: Unit Test /form cl... | true |
5070e5208903be3ba1ff62057da218bb17d4e8eb | PHP | robert-vo/Bowling-Score-Tracking-System | /public_html/viewGame.php | UTF-8 | 18,422 | 2.921875 | 3 | [] | no_license | <?php
session_start();
include 'menuBar.php';
generateMenuBar(basename(__FILE__));
include 'databaseFunctions.php';
error_reporting(0);
include 'src/game.php';
include '../src/game.php';
error_reporting(E_ALL);
function printColumnLegend() {
echo '<tr>';
echo '<th colspan=12>Team and Player Name</th>';
fo... | true |
e9957d9b54a1286e8e783f5102b8375e962c9fbf | PHP | somkheart/ecompetency1 | /protected/controllers/PositionController.php | UTF-8 | 1,423 | 2.65625 | 3 | [] | no_license | <?php
class PositionController extends Controller
{
public function actionIndex()
{
$this->render('index');
}
public function actionCreate()
{
}
public function actionJson()
{
$position=UserPosition::model()->findAll();
$tmpData=arr... | true |
41937b17f63cf0b7a6690fdc044ffc0a87ddac10 | PHP | nanson/rzwebsys7 | /common/widgets/markitup/MarkItUp.php | UTF-8 | 2,346 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\widgets\markitup;
use yii\helpers\Html;
use yii\widgets\InputWidget;
/**
* Class MarkItUp
* Виджет редактора MarkItUp
* @package common\widgets\markitup
* @author Churkin Anton <webadmin87@gmail.com>
*/
class MarkItUp extends InputWidget
{
/**
* @var string идентификатор настроек... | true |
a400f1eb5aa4cd273c2bd64e95dad7dc6a77392c | PHP | electric-eloquence/fepper-drupal | /backend/drupal/core/lib/Drupal/Core/Entity/EntityTypeEventSubscriberTrait.php | UTF-8 | 2,326 | 2.671875 | 3 | [
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-other-copyleft",
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
namespace Drupal\Core\Entity;
/**
* Helper methods for EntityTypeListenerInterface.
*
* This allows a class implementing EntityTypeListenerInterface to subscribe and
* react to entity type events.
*
* @see \Symfony\Component\EventDispatcher\EventSubscriberInterface
* @see \Drupal\Core\Entity\EntityTypeLi... | true |
4246207358931693fa481aa1be32c317ab2556fe | PHP | alpody/crm | /app/Models/InstagramAccount.php | UTF-8 | 1,323 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\InstagramAccount
*
* @property int $id
* @property string|null $username
* @property string|null $password
* @property string|null $name_account
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate... | true |
68b711a26bd46891504f58da4e48dddb26c0a840 | PHP | timoffmax/ceragon | /common/models/GlobalTest.php | UTF-8 | 3,653 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "PHOSTESTGLOBALTEST".
*
* @property int $id
* @property string $FACILITY
* @property string $STATIONID
* @property string $UUTNAME
* @property string $PARTNUMBER
* @property string $SERIALNUMBER
* @property string $TECHNAME
* @... | true |
bebd6dbb4497c91538a40220d81cedd93af764fb | PHP | huxiaohe/api-framework | /app/library/Rudder/Validation/Validator/Ip.php | UTF-8 | 599 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Rudder\Validation\Validator;
use Phalcon\Validation\Message;
use Phalcon\Validation;
use Phalcon\Validation\Validator;
class Ip extends Validator {
public function validate(Validation $validation, $attribute) {
$value = $validation->getValue($attribute);
if (!filter_var($value, FILTER_VALID... | true |
9356338fb7c6057619ae57ab26bc034af39c4693 | PHP | renterisco8/TrabajoAyuntamiento | /control-acceso2.php | UTF-8 | 1,567 | 2.5625 | 3 | [] | no_license | <?php
/*Inicio de la sesión */
if (session_status()==PHP_SESSION_NONE) {session_start();}
$nif_rec = $_POST["nif_rec"];
$nombre_usu = $_POST["nombre_usu"];
$ape1_usu = $_POST["ape1_usu"];
$ape2_usu = $_POST["ape2_usu"];
require_once ('con1.php');
$mysqli->se... | true |
1cdaea7c0c099975be1561c392e76908ed4f31d7 | PHP | jimmyzheng2008/dynamicweb | /admin/functions/data.php | UTF-8 | 1,042 | 2.71875 | 3 | [] | no_license | <?php
function data_setting_value ($dbc, $id){
$query = "SELECT * FROM settings WHERE id = '$id'";
$result = mysqli_query($dbc, $query);
$data= mysqli_fetch_assoc($result);
return $data['value'];
}
function data_user($dbc, $id){
if(is_numeric($id)){
$q = "SELECT * FROM users WHERE id = '$id'";
}else{
$q =... | true |
21854df9e11c382658711cbfb46e8671432821bc | PHP | hanasoke/latihan_php | /tugas_2/index.php | UTF-8 | 4,052 | 3.8125 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Latihan PHP 2</title>
</head>
<body>
<h1>Berlatih Looping</h1>
<?php
echo "<h3>Soal No 1 Looping I Love PHP<... | true |
8d5d24276e32559f658591a90e20e9e7cc193545 | PHP | pivot-libre/tideman | /src/RankedPairsGraph.php | UTF-8 | 6,836 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace PivotLibre\Tideman;
use \DomainException;
use \Fhaculty\Graph\Graph;
use \Fhaculty\Graph\Vertex;
use \Fhaculty\Graph\Set\Vertices;
use \Graphp\Algorithms\Search\DepthFirst;
use Graphp\Algorithms\ShortestPath\BreadthFirst;
use PivotLibre\Tideman\Candidate;
class RankedPairsGraph
{
private $graph;
... | true |
123b2de4b74ff3281ae477df16af838b6e62d99c | PHP | mokhosh/jarbon | /src/JarbonUtils.php | UTF-8 | 770 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Mokhosh\Jarbon;
use Carbon\Carbon;
class JarbonUtils
{
public static function format(Carbon $carbon, string $format = null)
{
if (is_null($format)) {
$format = static::getDefaultFormat();
}
$date = CalendarUtils::strftime($format, $carbon);
return... | true |
e14d9a5e93c845004237933fd7ac5a906de687b6 | PHP | daffadev-mia/mchat-1 | /app/model/MsgMod.php | UTF-8 | 1,120 | 2.625 | 3 | [] | no_license | <?php
class MsgMod
{
private $db;
private $config;
private $tables;
function __construct()
{
$this->db = new Db();
$this->config = Config::get();
$this->tables = $this->config['tables'];
}
public function add($nick, $text)
{
$date = Date::get();
... | true |
39bcb228a153293ad08dd26b8073cb888374faa8 | PHP | stelewi/vp-test | /src/Data/PointOnMap.php | UTF-8 | 1,321 | 3.265625 | 3 | [] | no_license | <?php
namespace App\Data;
class PointOnMap
{
private Map $map;
private Coordinates $position;
/**
* PointOnMap constructor.
* @param Map $map
* @param Coordinates $position
*/
private function __construct(Map $map, Coordinates $position)
{
$this->map = $map;
... | true |
1628bba4c44a1ee4d7cb01df7eefa7ef7d48dfa1 | PHP | kambo-1st/Protocolx | /src/Client/Message/Utils.php | UTF-8 | 746 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Kambo\Database\Protocolx\Client\Message;
/**
* Encoding utils methods
*
* @package Kambo\Database\Protocolx\Client\Message
* @author Bohuslav Simek <bohuslav@simek.si>
* @license MIT
*/
class Utils
{
public function uInt32($i, $endianness = false)
{
$f = is_int($i) ? "pack" : "u... | true |
40fe2f2c8d14fafe60aa2dad4035b58682a94cd5 | PHP | tomsihap/exam-phpmysql | /list.php | UTF-8 | 2,615 | 2.71875 | 3 | [] | no_license | <?php
require_once('helper.php');
$bdd = dbConnect();
$request = "SELECT * FROM logement ORDER BY id_logement DESC";
$response = $bdd->query($request);
$logements = [];
while ($logement = $response->fetch()) {
$logements[] = $logement;
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
... | true |
185837c7bc347c8da3173b9d5ec1cd05020e1e58 | PHP | OSEvohe/OC-P5-Blog | /src/Controller/AdminController/BlogController.php | UTF-8 | 4,375 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Controller\AdminController;
use Core\Controller;
use Entity\Post;
use Entity\User;
use Models\CommentManager;
use Models\PostManager;
use Models\UserManager;
class BlogController extends Controller
{
const ADMIN_BLOG = '/admin/blog';
const ADMIN_COMMENTS_ALL = '/admin/comments/all';
/*... | true |
23d50e53c39198749fe98bafc64da32a5de2f120 | PHP | bryson-l/to-do-list | /app/Models/TaskLists.php | UTF-8 | 969 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class TaskLists extends Model
{
use HasFactory, Notifiable;
/**
* The table associated with the model.
*
* @var string
*/
... | true |
6c31f27be3e8f456f81278dad4b454b7da02f950 | PHP | samankassou/scbcourrier | /app/View/Components/Forms/label.php | UTF-8 | 723 | 2.796875 | 3 | [] | no_license | <?php
namespace App\View\Components\Forms;
use Illuminate\View\Component;
class label extends Component
{
/**
* The name of input.
*
* @var string
*/
public $for;
/**
* The display.
*
* @var string
*/
public $message;
/**
* Create a new component in... | true |
2ebb19a6bcbe3f80b8e397d4e6012d4a3d0cc440 | PHP | jcsj89/santana | /src/Domain/Mail/Data/MailData.php | UTF-8 | 1,249 | 3 | 3 | [] | no_license | <?php
namespace App\Domain\Mail\Data;
/**
* Mail Data
*/
class MailData
{
private $subject;
private $to;
private $from;
private $body;
function __construct()
{
$this->subject = 'Site Santana Quimica';
$this->to = ['santanaquimica@terra.com.br', 'jcs... | true |
1b9c45dc85e2d5769a2e6fd2b691f3e5dbcdcf53 | PHP | Faith-sol-tech-Dev/FST_contentsmonitoring | /v1/vendor/ContentsMonitor/Service/Data/ContentDetailTable.php | UTF-8 | 35,828 | 2.625 | 3 | [] | no_license | <?php
namespace ContentsMonitor\Service\Data;
use Zend\Db\Adapter\Adapter;
use Zend\Db\Adapter\AdapterAwareInterface;
use Zend\Db\TableGateway\TableGateway;
use Zend\Db\ResultSet\ResultSet;
use Zend\Db\Adapter\Driver\ResultInterface;
use Zend\Db\Exception\ErrorException;
use ContentsMonitor\Service\Entity\C... | true |
46646df59b13cd283d0389727ba900c9d4f55f1a | PHP | mirekmarek/php-jet | /_tools/studio/application/Classes/Modules/Pages.php | UTF-8 | 5,509 | 2.578125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
*
* @copyright Copyright (c) Miroslav Marek <mirek.marek@web-jet.cz>
* @license http://www.php-jet.net/license/license.txt
* @author Miroslav Marek <mirek.marek@web-jet.cz>
*/
namespace JetStudio;
use Jet\BaseObject;
use Jet\Form;
use Jet\Form_Field;
use Jet\Form_Field_Input;
use Jet\Form_Field_Select;... | true |
c5a2ea2583694501564154d9d8387007aca89f7f | PHP | nirvana-info/old_bak | /hawaiicustoms/admin/includes/exporter/class.exportfiletype.factory.php | UTF-8 | 1,553 | 2.78125 | 3 | [] | no_license | <?php
define("TYPE_ROOT", APP_ROOT . "/includes/exporter/filetypes/");
require_once APP_ROOT . "/includes/exporter/class.exportfiletype.php";
/**
* A factory class to get a list of available file types and to get a file type object
*
* @author Ray Ward <ray.ward@interspire.com>
*/
class ISC_ADMIN_EXPORTFILETYPE_FACTO... | true |
6e998381cb0c7c366a5f479b5e14ca7a14014166 | PHP | daniel-zahariev/music-codes | /src/Isrc.php | UTF-8 | 7,554 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
namespace DanielZ\MusicCodes;
class Isrc
{
const NO_DASH_PATTERN = '/^(ISRC[\W]*)?([A-Z]{2})([A-Z0-9]{3})([0-9]{2})([0-9]{5})([\W]*ISRC)?$/';
const DASHED_PATTERN = '/^(ISRC[\W]*)?([A-Z]{2})-([A-Z0-9]{3})-([0-9]{2})-([0-9]{5})([\W]*ISRC)?$/';
const PREFIX_PATTERN = '/^([A-Z]{2})-?([A-Z0-9]{3})$/';
... | true |
62ff0004b041467f45b5d9f3a8ba99e849d1919b | PHP | akeebismail/kibb-backup | /src/Databases/MySql.php | UTF-8 | 5,134 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: mac
* Date: 12/2/18
* Time: 1:04 PM
*/
namespace Kibb\Backup\Databases;
use Kibb\Backup\Databases\DbDumper\DbDumper;
use Kibb\Backup\Exceptions\CannotStartDump;
use Symfony\Component\Process\Process;
class MySql extends DbDumper
{
/** @var bool */
protected $sk... | true |
76952074a1d71ff2b32b2ff5f4bc3b11ef9b0c6f | PHP | os-rescue/api-user-bundle | /Util/PasswordUpdaterInterface.php | UTF-8 | 486 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace API\UserBundle\Util;
use API\UserBundle\Model\UserInterface;
/**
* @source https://github.com/FriendsOfSymfony/FOSUserBundle
*/
interface PasswordUpdaterInterface
{
/**
* Updates the hashed password in the user when there is a new password.
*
* The implement should be a no-op in ... | true |
f94042e00e64d377860ebbdd9004a15e314e0b8e | PHP | munatsimike/Haarlem-Festival-2021 | /Repositories/VolunteerRepo/VolunteerRepo.class.php | UTF-8 | 1,509 | 3.09375 | 3 | [] | no_license | <?php
class VolunteerRepo extends Repo
{
// Check if volunteer username exist
public function isEmailAvailable(Volunteer $volunteer) : bool
{
$stmt = $this->pdo->prepare("SELECT email FROM volunteer WHERE email = :email");
$stmt->execute([':email' => $volunteer->email]);
return $stmt->fetchColumn(... | true |
348cc795ad113579a5cb4c76edb5100df0842f42 | PHP | laravel-boilerplates/admin | /src/Admin.php | UTF-8 | 1,056 | 2.65625 | 3 | [] | no_license | <?php
namespace LaravelBoilerplates\Admin;
use Illuminate\Http\Request;
use Illuminate\Routing\UrlGenerator;
class Admin
{
/**
* Provide the currently configured User model for this application.
*
* @return \Illuminate\Database\Eloquent\Model
*/
public static function user() {
$user... | true |
8e1aaa382f5104e24a26c2637f9c99e5515724c0 | PHP | hiimlamxung/PHP0320E2 | /Buoi17_Toiuuhoaweb/index2.php | UTF-8 | 601 | 3.078125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cache</title>
</head>
<body>
<h1>Xin chào các bạn</h1>
<?php
// echo time()."<br>"; // Tỏng số giây từ 1970 đến thời điểm hiện tại
// echo fileatime('cache.php')."<br>";//Thời gian truy xuất file
if(time()-fileatime('cache.php')<10){
includ... | true |
570ed3e7f26f2f60cf73b90eb5e3e6dff3779a14 | PHP | Coercive/App | /Service/Escaper.php | UTF-8 | 4,122 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Coercive\App\Service;
/**
* Escaper
*
* @package Coercive\App\Service
* @author Anthony Moral <contact@coercive.fr>
*/
class Escaper
{
const CH = 'CH';
const DE = 'DE';
const EN = 'EN';
const ES = 'ES';
const FR = 'FR';
const GR = 'GR';
const IT = 'IT';
const NL = 'NL';
const PL = 'PL';
... | true |
72be348693d289b1804c91db2b7d43833cc607ca | PHP | thinkspill/Mondrian | /src/Visitor/State/AbstractState.php | UTF-8 | 1,379 | 2.734375 | 3 | [] | no_license | <?php
/*
* Mondrian
*/
namespace Trismegiste\Mondrian\Visitor\State;
use PhpParser\Node;
/**
* AbstractState is a abstract state
*/
abstract class AbstractState implements State
{
/** @var VisitorContext */
protected $context;
/**
* @inheritdoc
*/
public function setContext(VisitorCo... | true |
06082d42f2d09b44e2feee3e3df87e1b636ca506 | PHP | otengkwame/coroutine | /tests/parallel/closures/006.phpt | UTF-8 | 774 | 2.53125 | 3 | [
"MIT"
] | permissive | --TEST--
Check closures no nested declarations
--SKIPIF--
<?php if (((float) \phpversion() >= 8.0)) print "skip"; ?>
--FILE--
<?php
include 'vendor/autoload.php';
$runtime = new \parallel\Runtime;
$channel = \parallel\Channel::make("channel", 1);
try {
$channel->send(function(){
new class {};
});
$... | true |
c2543e58bdfa83af86251f8db3035733692bda7a | PHP | OpenConext/Stepup-Gateway | /src/Surfnet/StepupGateway/SamlStepupProviderBundle/Provider/ViewConfig.php | UTF-8 | 2,494 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2018 SURFnet bv
*
* 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 applicable law or agr... | true |
e84cda64f88b77209b17923bf15629b73ac89224 | PHP | briannur/18104006_BrianNurHilmawan | /Pertemuan 6/tugas/operators.php | UTF-8 | 618 | 3.765625 | 4 | [] | no_license | <?php
// deklarasi variabel
$x = 8;
$y = 10;
// operator aritmatika
echo $x + $y; // menjumlahkan nilai dalam variabel
echo "<br>";
// operator penugasan
$x = 100;
$x -= 50;
echo $x; // menampilkan hasil dari 100-50
echo "<br>";
// deklarasi variabel
$x = 100;
$y = "50";
var_dump($x !== $y); // op... | true |
62303cc3f4aa4c0a7500521def00d507d6c918e7 | PHP | GuldenPromotion/vrijstaat-web | /resources/plugins/simple-post-gallery/app/Models/PostGallery.php | UTF-8 | 1,967 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace PostGallery\Models;
use WPMVC\Cache;
use WPMVC\MVC\Traits\FindTrait;
use WPMVC\MVC\Models\OptionModel as Model;
/**
* PostGallery Settings model.
*
* @author Alejandro Mostajo <http://about.me/amostajo>
* @copyright 10Quality
* @package PostGallery
* @version 2.0.0
*/
class PostGallery extends... | true |
68c740aeab8613c53f35c4d84aba091651a3c01e | PHP | Putneg/kasten | /app/models/Pages1.php | UTF-8 | 4,763 | 2.640625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "pages".
*
* The followings are the available columns in table 'pages':
* @property integer $id
* @property integer $parent
* @property string $header_ru
* @property string $header_ua
* @property string $text_ru
* @property string $text_ua
* @property string $dat... | true |
a6e5bad362ceecf22d73eb0d4cbf4fda01b15463 | PHP | ntd10102000/BTL_ptudw_thayNgoc | /admin/brands.php | UTF-8 | 8,040 | 2.5625 | 3 | [] | no_license | <?php
require("../config/connect.php");
require("tele.php");
//thêm mới dữ liệu
if (isset($_POST["insert"])) {
//khai báo biến thực hiện câu truy vấn sql insert data
$sql_insert = "insert into tbl_hang(ID_DanhMuc,Ten_Hang,TrangThai) values('" . $_POST["ma_dm"] . "','" . $_POST["tenh"] . "',1)";
if (mysqli_... | true |
993bf55b787de087aec76a0333e8ec6ca63b7805 | PHP | dharmaelms/elmstest | /app/Model/RolesAndPermissions/Entity/Context.php | UTF-8 | 1,701 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Model\RolesAndPermissions\Entity;
use App\Model\Role;
use App\Model\Sequence;
use App\Model\RolesAndPermissions\Entity\Permission;
use Moloquent;
use Schema;
class Context extends Moloquent
{
/**
* The table/collection associated with the model.
*
* @var string
*/
prot... | true |
79545d643bdefa990c4962befc9d6716490a07f9 | PHP | limanweb/pg-ext | /src/Relations/ArrayRelation.php | UTF-8 | 1,682 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Limanweb\PgExt\Relations;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\Relation;
abstract class ArrayRelation extends Relation
{
/**
* [Description] TODO
*
* @var string
*/
protected $arrayFie... | true |
376429f16f4f7791a38e61dc3300048b72ef31f2 | PHP | gabrielrbl/vendasphpweb1 | /src/model/ItensVenda.php | UTF-8 | 1,257 | 2.875 | 3 | [] | no_license | <?php
class ItensVenda {
private $id;
private $idvenda;
private $idproduto;
private $quantidade;
private $valorunitario;
public function __construct($id, $idvenda, $idproduto, $quantidade, $valorunitario) {
$this->id = $id;
$this->idvenda = $idvenda;
$this->idprodut... | true |
3c4251f7570acbb947420e9a54296a026bd8fff0 | PHP | jdhamsaniya/booj-reading-list-jdhamsaniya | /app/Book.php | UTF-8 | 369 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Book extends Model
{
/**
* The attributes that are mass assignable.
* You can pass array to the create function of the model with the data you want to get assigned.
*/
protected $fillable = [
'isbn', 'title', 'author', ... | true |
4c8290c4fc1f9b608953227eb3f7960bfb7ec49f | PHP | QuantiCZ/MailQ-PHP-Library | /src/MailQ/Entities/v2/SenderEmailEntity.php | UTF-8 | 1,099 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace MailQ\Entities\v2;
use MailQ\Entities\BaseEntity;
/**
* @property integer $id
* @property string $email
* @property LinkEntity $company
*/
class SenderEmailEntity extends BaseEntity
{
/**
* @in
* @out
* @var integer
*/
private $id;
/**
* @in
* @out
* @var string
*/
private $... | true |
bcfef4b2b68ca3ae5aa20dbef344c4ea9d4bf484 | PHP | risa552/academicwoek | /public/test2.php | UTF-8 | 878 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
$user = array(
array("number"=>"01", "name"=>"ภัทรวดี", "sername"=>"ป๊อกเทิ่ง","age"=>"21"),
array("number"=>"02", "name"=>"พิชชาพร", "sername"=>"ทองคลัง","age"=>"21"),
array("number"=>"03", "name"=>"ริสา", "sername"=>"เบ็ญมูซา","age"=>"21"),
array("number"=>"04", "name"=>"เยาวเรศ", "sername"=>"ว... | true |
2d12b3a2784c0c8f6c2448edccb4e429f4458429 | PHP | FiveGen/stripe-political-donations | /lib/Loggly.php | UTF-8 | 1,494 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
/* How to use this Class from /www
*
* require_once(dirname(dirname(__FILE__))."/libraries/Loggly.php");
*
* $logg = new Loggly('fc1642f5-700c-4a01-8bcf-134ee8e750d5');
* $log_item = array("something"=>"value", "another_key"=>"value", "some_other_key"=>"value");
* $logg->ly($log_item, 'json');
*
* OR
... | true |
0a26c3c58b49cc79695e8139fdf010fb9331c25c | PHP | semishin/ariol | /modules/ariol/classes/CM/Field/Boolean.php | UTF-8 | 612 | 2.53125 | 3 | [] | no_license | <?php defined('SYSPATH') or die('No direct script access.');
/**
* @version SVN: $Id:$
*/
class CM_Field_Boolean extends CM_Field
{
protected $_value_class = 'CM_Value_Boolean';
public function render()
{
$attributes = $this->get_attributes();
$attributes['id'] = $this->get_name();
$attribute... | true |
b8202b4a09e35f0219ff474816415b92368ba818 | PHP | leelerlin/php | /demo/ListNode.php | UTF-8 | 4,210 | 3.65625 | 4 | [] | no_license | <?php
/*class A {
public function __construct($id, $name) {
$this->id = $id;
$this->name = $name;
}
public function tsssss() {
return $this->id;
}
}
$t = new A(1, 2, 3, 3, 3, 3, 3);
echo $t->tsssss();
die();
*/
//链表节点
class node {
public $id; //节点id
public $name; //节点名称
public $next; //下一节点
publ... | true |
5841c0e9a3b4b9f2fe782332228a99594eda63d5 | PHP | it-4-life/spiral-framework | /source/Spiral/Translator/Configs/TranslatorConfig.php | UTF-8 | 3,822 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Spiral Framework.
*
* @license MIT
* @author Anton Titov (Wolfy-J)
*/
namespace Spiral\Translator\Configs;
use Spiral\Core\InjectableConfig;
use Spiral\Support\Patternizer;
/**
* Translation component configuration.
*/
class TranslatorConfig extends InjectableConfig
{
/**
* Configura... | true |
e80154940e8c6c430ea4d8ff8c96f6ead5470ab8 | PHP | ionnutt/site | /signup.php | UTF-8 | 5,514 | 3.03125 | 3 | [] | no_license | <?php
require_once('./function.php');
$errors = [];
if (!empty($_POST)) {
/*
TODO creem un utilizator folosind datele furnizate
1. verificam daca adresa de email este valida
2. verificam daca nu adresa de email deja introdusa
3. securizam parola cu MD5
4. trimite un email de confirmare cu datele ... | true |
8f7727a6a5df262e438f6630fbaee99ffff1b06c | PHP | rafanthx13/college-projects | /Programação Internet/WebAlphaImobiliaria/src/bd/login.php | UTF-8 | 1,810 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
session_start();
require_once("./../utils/filter_input.php");
require_once("./connection.php");
function login_user($user, $password, $mysqli){
$SQL = "
SELECT cod_funcionario, login, senha
FROM Funcionario
WHERE login = ?
LIMIT 1;
";
try {
$user = filter_form($user);
$stmt = $m... | true |
d8f3d1176afa7002315f0cab9863b782f0e46e93 | PHP | noel1231/my-dentist-pal | /includes/box_patient_list.php | UTF-8 | 19,698 | 2.734375 | 3 | [] | no_license | <?php
$dentist_id=$_SESSION['id'];
include('config.php');
//include('/pagination/function.php');
/**
* @link: http://www.Awcore.com/dev
*/
function pagination($query, $per_page = 10,$page = 1, $url = ''){
$query = "SELECT COUNT(*) as `num` FROM {$query}";
$row = mysql_fetch_array(mysql_qu... | true |
c2581c1cb1ca05f2226b34bb58bef67433e9c6cc | PHP | moubAde/ESP_departement_social | /modele/modele.php | UTF-8 | 7,838 | 2.828125 | 3 | [] | no_license | <?php
ini_set("display_errors",0);error_reporting(0);//pour masquer les messages d'erreurs
session_start();
//echo $_SESSION['login'].' '.$_SESSION['password'];
if (isset($_SESSION['login']) && isset($_SESSION['password'])){
//inserer les infos dans la base de données
function insererEtudian... | true |
4bff38e1ce154d04b3bf7e02d763a717485fa5be | PHP | robtuley/knotwerk | /views/Xhtml/UrlList.php | UTF-8 | 1,929 | 2.96875 | 3 | [] | no_license | <?php
/**
* Contains the T_Xhtml_UrlList class.
*
* @package views
* @author Rob Tuley
* @version SVN: $Id$
* @license http://knotwerk.com/licence MIT
*/
/**
* A rendered URL list view.
*
* This class can be used as a visitor for a URL composite, and renders the
* result as a XHTML list.
*
* @package view... | true |
8c5c917fb1a362734f1da000ec2c345559f81f5a | PHP | fidenz-shanila/test1 | /fuel - Copy/app/modules/admins/classes/model/structure.php | UTF-8 | 11,621 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Admins;
/**
* Structure Model
* @author Namal
*/
class Model_Structure extends \Model_Base
{
public static function get_branches()
{
$sql = "SELECT B_BranchID_pk, B_Name_ind FROM t_Branch ORDER BY B_Name_ind ASC";
$stmt = \NMI::Db()->prepare($sql);
$stmt->execute()... | true |
3680b0b285919ee1836816b981e2bff7f320618b | PHP | moneshsridhar/church-website-using-php-and-mysql | /feedback.php | UTF-8 | 396 | 2.765625 | 3 | [] | no_license | <?php
if(isset($_POST['submit']))
{
$name=$_POST['name'];
$email=$_POST['email'];
$msg=$_POST['msg'];
$to='moneshofficial@gmail.com';
$subject='FeedBack Form';
$message="Name: ".$name."/n"."Wrote the following: "."\n\n".$msg;
$header="From= ".$email;
if(mail($to,$subject,$message,$header)){
echo<... | true |
7b339f87d373e1950de32c3a41667f1f086d945c | PHP | mehlah/li3_queue | /extensions/data/Queue.php | UTF-8 | 1,435 | 3.109375 | 3 | [] | no_license | <?php
namespace li3_queue\extensions\data;
use \lithium\core\Object;
abstract class Queue extends \lithium\core\Object {
/**
* Queue Constructor
*
* Sets parameters required by the queue adapter being used.
*
* @param array $config Configuration parameters.
* @return void
*/
public function __constr... | true |
c9ffd75c04b275119ef8f372fff40100e0bc1edb | PHP | God9ps/garimore | /classes/Admin.class.php | UTF-8 | 3,127 | 2.703125 | 3 | [] | no_license | <?php
namespace Admin;
require_once 'config.inc.php';
include_once 'BdMySQL.class.php';
use BDMySQL;
class Admin extends BDMySQL
{
public $bd;
private $name;
private $email;
private $phone;
private $level;
private $password;
private $photo;
private $active;
function __construct()
... | true |
bf18fbe194a8e7f1eeaf1e3118f7490e84d8d5c6 | PHP | TheTempusProject/TempusProjectFull | /Controllers/admin/logs.php | UTF-8 | 1,981 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
/**
* Controllers/Admin/.php
*
* This is the xxxxxx controller.
*
* @version 1.0
*
* @author Joey Kimsey <JoeyKimsey@thetempusproject.com>
*
* @link https://TheTempusProject.com
*
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Controllers;
use TempusPr... | true |
150f8ef3f05febf47fe8a3acb26cb362bdd28d01 | PHP | binho/laravel | /system/session/sweeper.php | UTF-8 | 187 | 2.8125 | 3 | [
"Unlicense"
] | permissive | <?php namespace System\Session;
interface Sweeper {
/**
* Delete all expired sessions.
*
* @param int $expiration
* @return void
*/
public function sweep($expiration);
} | true |
366fbdb485de5f586b15f19e6d55a1fe0211d6c3 | PHP | walerus/short_url | /classes/_class.config.php | UTF-8 | 1,540 | 2.53125 | 3 | [] | no_license | <?php
/**
* Create short URL project
*
* PHP version 5
*
* @category PHP
* @package PHP_Walerus
* @author Walerus Walik <waleruscool@gmail.com>
* @copyright 2016-2017 Walerus Walik
* @license Walerus Walik Licence
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
/**
* MyClass Doc Comment... | true |
b85ea75bb2681690e493151e8dd86e9118b21a1d | PHP | kuell/antigo | /escala/model/mEscala.php | UTF-8 | 2,894 | 2.515625 | 3 | [] | no_license | <?php
require_once '../Connections/conn_novo.php';
require_once 'core/Escala.php';
class mEscala extends Conecction {
private $id = null;
private $data = null;
private $corretor = null;
private $qtdBoi = 0;
private $qtdVaca = 0;
private $qtdNov = 0;
private $qtdTouro = 0;
... | true |
952e5805b1663662ee702a363a4a2a9a39221da0 | PHP | Leonti/fitmaestroweb | /application/models/measurement.php | UTF-8 | 5,654 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php defined('SYSPATH') or die('No direct script access.');
class Measurement_Model extends Model {
public $userId;
public function __construct($userId){
parent::__construct(); // assigns database object to $this->db
$this->userId = $userId;
}
public function addType($data){
... | true |
915ca3caadeb5b5401b2eb233bffe10dc8eb0544 | PHP | frankito42/sistema-motel-shhh | /motel version 1/chimichurri/verhab1viejo.php | UTF-8 | 4,222 | 2.59375 | 3 | [] | no_license | <?
include_once('conn.php');
/** para que no guarde en el cache del APACHE */
/* header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 1 Jul 2000 05:00:00 GMT"); */ // Fecha en el pasado
/* hasta aca */
//$id= $res['habitacion'];
$id= $_GET['id']; // es la habitacion
$cero='00:00:00';
/... | true |
d44e50336691f3e2d42257b45df7707ea2504be6 | PHP | fdmahmud/detailedPHP | /file type detector.php | UTF-8 | 530 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
body, h1, p, h3 {
padding: 0;
margin: 0;
}
</style>
</head>
<body>
<?php
if (isset($_GET['submit'])) {
$post_image = $_GET['image'];
//echo $post_image;
$name_to_detect = (explode('.', $post_image));
$a = array_pop($name_t... | true |
83f65f6c41c13f0080c60bc546a0ab791ed7e797 | PHP | Hasnain-js/Pm_adminpannel | /php/inboxview.php | UTF-8 | 961 | 2.625 | 3 | [] | no_license | <?php
require "conn.php" ;
$query = "SELECT id , name , email , subject , category , message , date FROM contact " ;
$result = $conection->query($query);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
?>
<tr>
<td class="">
<!-- used in label input tag checked="" -->
... | true |
1f76ccec385181524ff5a906b865e02196191a08 | PHP | rbello/GDO | /test/protected/gdo.protectedimage.php | UTF-8 | 2,364 | 2.53125 | 3 | [] | no_license | <?php
$gdo_protectedimage = array(
'img_folder' => 'images/',
'cache_folder' => 'cache/',
'query_var' => 'getimg',
'copyright_text' => 'Copyright mon truc',
'jpeg_quality' => 90
);
function gdo_protectedimage_html($target, $description='') {
$width = 0;
$height = 0;
$srcImg = ''; // this file with query... | true |
4760cf7fe60e676f762a3eb6421c6b256bebd4c5 | PHP | caojingfei/yii2-easy-admin | /app/migrations/m180604_065513_init_rbac_data.php | UTF-8 | 1,356 | 2.59375 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Class m180604_065513_init_rbac_data
*/
class m180604_065513_init_rbac_data extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$auth = Yii::$app->authManager;
$sub = $auth->createRole('subscriber');
$sub->description ... | true |
1da935b817cc8cdd206ab29baec66653a5d68e4d | PHP | quchuanbao/jktest | /app/modules/mywork/models/DepartmentForm.php | UTF-8 | 605 | 2.703125 | 3 | [] | no_license | <?php
/**
* 部门 * @author bao
*
*/;
class DepartmentForm extends CFormModel
{
public $id; //自增ID
public $name; //部门名称
public $parentId; //父部门ID
/**
* 验证规则
*/
public function rules()
{
return array(
array('name,parentId',
'required',
'message'=>'不能为空',
),
... | true |
7a46b18c55e049685f9744e36a493875c8bdb330 | PHP | bloqhead/bowling-site | /wp-content/plugins/coral-locations/src/Services/Cache.php | UTF-8 | 650 | 2.765625 | 3 | [] | no_license | <?php
namespace Coral\Locations\Services;
class Cache
{
private $cachePath = "";
public function __construct()
{
$this->cachePath = apply_filters("coralLocations__cachepath", CORAL_LOCATIONS_PATH . "data/");
}
private function getFile($key)
{
return "{$this->cachePath}{$key}.... | true |
a07f189fcf122d4198f7fe44dee9e914187c2138 | PHP | mtopuzov2/JoyOfPHP | /TheJoyOfPHP/SQL Test 1.php | UTF-8 | 2,603 | 3.0625 | 3 | [] | no_license | <?php
/**
* Joy of PHP sample code
* Demonstrate how to create a database, create a table and insert records
*/
$db_name = 'cars2';
$mysqli = new mysqli('localhost', 'root', '');
if (!$mysqli) {
die('Could not connect:' . mysqli_error($mysqli));
}
echo('Connected Successfully to the MySQL Database.<BR>');
/*... | true |