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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0549074f74378135a26b36b96e6b2eb1da78425d | PHP | u95306/course | /Ch12/MyMime.php | UTF-8 | 1,164 | 3.171875 | 3 | [] | no_license | <?php
require_once('Mail/mime.php'); // 引用 PEAR::Mail_Mime
class MyMime extends Mail_Mime {
function headers($headers) {
$from = $headers['From']; // 先保留原始的內容
$hdrs = parent::headers($headers); // 呼叫父類別的方法
// 呼叫自訂的 encode_email() 方法將寄件者欄位重新編碼
$hdrs['From'] = MyMime::encode_em... | true |
63498a1f23d88c3df9e63e160ff02d33f5e746a1 | PHP | dgrodzinskieengine/posrednik_allegro | /trunk/lib/Core/SMSApi.php | UTF-8 | 6,400 | 2.625 | 3 | [] | no_license | <?php
define('CORE_SMSAPI_LIB_PATH', dirname(__FILE__).'../../smsapi');
class Core_SMSApi {
public static $eco_price = 0.07; //cena smsa w pakiecie eco
public static $instance = null;
public static function getEcoPrice()
{
return self::$eco_price;
}
public static function getInstance() {
if (self::$instance ... | true |
3b815fd3db9e277d9a4641bddd84a5f259502d99 | PHP | cerveau08/transfert-argent | /src/Controller/StatusController.php | UTF-8 | 1,837 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\User;
use App\Repository\UserRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class StatusController extends AbstractController
{
/**
* @Route("/api/users/status/{id}", name="status", ... | true |
168b39351cfb51343837cc5666ad6ef88486ce4d | PHP | KevinAsher/DataLoaderTraitExample | /app/GraphQL/DataLoader/EloquentRelationHelper.php | UTF-8 | 3,876 | 2.53125 | 3 | [] | no_license | <?php
namespace App\GraphQL\DataLoader;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illumi... | true |
46e5b1d6aeada731fe2d2f55302d9e66eab572bb | PHP | zhiachong/firehound-blob | /src/PaperG/FirehoundBlob/Facebook/FacebookAdSet.php | UTF-8 | 3,791 | 2.890625 | 3 | [] | no_license | <?php
namespace PaperG\FirehoundBlob\Facebook;
use FacebookAds\Object\Values\OptimizationGoals;
use FacebookAds\Object\Values\PageTypes;
class FacebookAdSet
{
const OPTIMIZATION_GOAL = "optimizationGoal";
const LIFETIME_BUDGET = "lifetimeBudget";
const BID_AMOUNT = "bidAmount";
const PLACEMENTS = "... | true |
f5502de872fa247d2362abf0b58d591745613de2 | PHP | jaxman020/workfun | /tryinsert.php | UTF-8 | 1,478 | 2.921875 | 3 | [] | no_license | <?php
if(isset($_POST['insert'])){
require_once('config.php');
$con = DB_TYPE .":host=".DB_HOSTNAME .";dbname=". DB_NAME . ";charset=". DB_CHARSET;
try{
$db =new PDO($con, DB_USERNAME, DB_PASSWORD);
}catch (PDOException $e) {
echo $e->getMessage();
}
$eid = $_POST['eid'];
... | true |
2b715cc20a2816dba4bb8f2439e9911e31d98885 | PHP | addshore/addframe | /includes/Mediawiki/Family.php | UTF-8 | 3,729 | 3 | 3 | [] | no_license | <?php
namespace Addframe\Mediawiki;
use Addframe\Mediawiki\Api\SitematrixRequest;
use UnexpectedValueException;
/**
* Class Family, representing a sitematrix of sites
*/
class Family extends Site {
/** @var SiteList sites in the family */
protected $siteList;
protected $siteIndex;
/**
* This should general... | true |
9f1ac7480d9ce653d460271c6a3ae7c9bacdd14e | PHP | boantdake/MVCstarter | /app/controllers/Contact.php | UTF-8 | 214 | 2.546875 | 3 | [] | no_license | <?php
// echo "hello from contact.php controller";
class Contact{
public function index(){
echo "Now im the contact controller";
}
public function message(){
echo "Called the message";
}
}
?> | true |
a8728a1b20f7f0bb940f590c71c3f9236981c9f3 | PHP | UHIN/laravel_api | /src/Helpers/RabbitBuilder.php | UTF-8 | 8,332 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace uhin\laravel_api;
use RuntimeException;
use PhpAmqpLib\Channel\AMQPChannel;
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Wire\AMQPTable;
/**
* Class RabbitBuilder
*
* @package uhin\laravel_api
*/
class RabbitBuilder
{
/** @var null|string */
protected $exchange = null;
... | true |
14d3909ebed321615bda9595c71eb89d51b25143 | PHP | jpaholik/spevnik-backend | /src/Efata/Bundle/SongbookApiBundle/Entity/Version.php | UTF-8 | 914 | 2.65625 | 3 | [] | no_license | <?php
namespace Efata\Bundle\SongbookApiBundle\Entity;
/**
* Version
*/
class Version
{
/**
* @var string
*/
private $module;
/**
* @var integer
*/
private $version;
/**
* Set module
*
* @param string $module
*
* @return Version
*/
public ... | true |
17b45b643433035529d75c462e2638a82c328013 | PHP | AlexDpy/kebab-kata | /bin/kata.php | UTF-8 | 321 | 2.59375 | 3 | [] | no_license | <?php
require_once __DIR__ . '/../vendor/autoload.php';
use Kata\Ingredient;
use Kata\Kebab;
$kebab = new Kebab([
new Ingredient\Pain,
new Ingredient\Salade,
new Ingredient\Tomate,
new Ingredient\Oignon,
new Ingredient\Boeuf,
]);
echo($kebab->removeOignons());
//dump($kebab->isVegetarian());... | true |
9f69b23d9f2b255ca1b84d798d2f8c720d373ffd | PHP | ricardofiorani/oembed | /src/OEmbed/Result/AbstractResult.php | UTF-8 | 1,468 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace RicardoFiorani\OEmbed\Result;
use RicardoFiorani\OEmbed\Result\State\State;
abstract class AbstractResult implements ResultInterface
{
private State $state;
public function setState(State $state): void
{
$this->state = $state;
}
public function g... | true |
832623b31884ca09dda21bc23f9d3e790f5693d7 | PHP | 1int/rockstars | /models/InviteForm.php | UTF-8 | 2,541 | 2.765625 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
use yii\base\Model;
use yii\web\HttpException;
class InviteForm extends Model
{
public $name;
public $username;
public $password;
public $password_repeat;
public $rememberMe;
/**
* @return array the validation rules.
*/
public function rul... | true |
108c2b207b96cfc7b083a15c1f9be9eec66b2350 | PHP | parsleysoup/BlogNoFrameworkMVC | /src/Model/BlogManager.php | UTF-8 | 4,714 | 3.1875 | 3 | [] | no_license | <?php
class BlogManager
{
/**
* @var mysqli
*/
private $db;
public function __construct($dbConnection)
{
if ($dbConnection instanceof mysqli) {
$this->db = $dbConnection;
} else {
throw new Exception('Connection injected should be of Mysqli object');... | true |
17ba7c84363478f54a8c106f717d7234f3637e8e | PHP | AviralBhatnagar/restaurant-website | /checkout/online_book.php | UTF-8 | 1,692 | 2.796875 | 3 | [] | no_license | <html>
<head>
<style>
table{
border:2px solid black;
}
td{
border:2px solid black;
padding:1vw;
}
button{
margin-top:1vw;
}
</style>
<?php
$name=$_POST["name"];
$email=$_POST["email"];
$phone=$_POST["phone"];
$address=$_POST["address"];
$city=$_POST["city"];
$zip=$_PO... | true |
c3f4e73f6d077895521864b0043ae4053daf65e5 | PHP | WenRuige/CoreService | /cron.php | UTF-8 | 1,084 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: gewenrui
* Date: 2017/3/6
* Time: 下午6:45
*/
//如果是cli模式下
if (php_sapi_name() == 'cli') {
require __DIR__ . '/vendor/autoload.php';
function serviceAutoload($className)
{
$nameArr = explode('\\', $className);
if ($nameArr[0] == 'cron') {
... | true |
e486ecafd4ca533f0e55f7bd6fdd85e2849d15d9 | PHP | darrynten/watson-personality-insights-php | /src/PersonalityInsights.php | UTF-8 | 2,707 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace DarrynTen\PersonalityInsightsPhp;
use DarrynTen\AnyCache\AnyCache;
/**
* Watson Personality Insights Client
*
* @category Library
* @package PersonalityInsightsPhp
* @author Darryn Ten <darrynten@github.com>
* @license MIT <https://github.com/darrynten/watson-personality-insights-php/LICENS... | true |
967f69b14047e645cadf67903a4a75cf2f1dbcb6 | PHP | healerz/chubbyphp-deserialization | /tests/Accessor/PropertyAccessorTest.php | UTF-8 | 1,872 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Chubbyphp\Tests\Deserialization\Accessor;
use Chubbyphp\Deserialization\Accessor\PropertyAccessor;
use Chubbyphp\Deserialization\DeserializerLogicException;
use PHPUnit\Framework\TestCase;
/**
* @covers \Chubbyphp\Deserialization\Accessor\PropertyAccessor
*/
class Property... | true |
94015f5126c4b85cd8bbb16215eb192c0b3a6490 | PHP | flyingcatok/ecommerce | /src/tables/create_order_table.php | UTF-8 | 430 | 2.671875 | 3 | [] | no_license | <?php
//Author: Libby Ferland
//Date: 11/2/2013
//Last Edited: Feiyu Shi
//Date: 11/5/2013
//create order table
$create_order_table = "CREATE TABLE Orders
(POrderID INT NOT NULL, PRIMARY KEY (POrderID),
Status VARCHAR(10) NOT NULL
)";
if (mysqli_query($con, $create_order_table))
{
echo "Table O... | true |
88d83bcc296d2057c04c96ace1fb1017119afcec | PHP | Guillaumo/Symfony-training-2021-guestbook | /src/Entity/Speaker.php | UTF-8 | 2,680 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\SpeakerRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SpeakerRepository::class)
*/
class Speaker
{
/**
* @ORM\Id
* @ORM\Generated... | true |
322f58b8cd14027a77b32fe6a918b3deb7ec56f1 | PHP | luisrovirosa/KataPotter-PHP | /src/groups/GroupGeneratorStrategy.php | UTF-8 | 237 | 2.515625 | 3 | [] | no_license | <?php
namespace KataPotter\Groups;
use KataPotter\Books;
use KataPotter\BooksGroup;
interface GroupGeneratorStrategy
{
/**
* @param Books $books
* @return BooksGroup[]
*/
public function generate(Books $books);
} | true |
f5b2db5ad757f3d55b0630c1adb919ae6fd6af09 | PHP | almazovelnar/rssaz | /core/entities/Customer/Website/Rss.php | UTF-8 | 2,663 | 2.859375 | 3 | [] | no_license | <?php
namespace core\entities\Customer\Website;
use core\queries\RssQuery;
use kak\clickhouse\ActiveRecord;
/**
* Class Rss
* @package core\entities\Customer\Website
*
* @property int $id
* @property int $website_id
* @property string $lang
* @property string $rss_address
* @property bool $valid
* @property... | true |
d7475de18923ed7ed53b3d9ec275825fd91a4362 | PHP | rashtell/Ex_Files_PHP_Date_Time | /Exercise Files/ch05/05_05/interval_format.php | UTF-8 | 173 | 3.03125 | 3 | [] | no_license | <?php
$duration = new DateInterval('P1001D');
echo $duration->format('%y years %m months %d days') . '<br>';
echo "$duration->y years $duration->m months $duration->d days"; | true |
39c24a39e2aa04f1ffe6899e2f02fab24d941e09 | PHP | phprao/data_script | /action/redis/playeremoticonredistask.php | UTF-8 | 2,070 | 2.59375 | 3 | [] | no_license | <?php
/**
* 玩家互动表情
* Created by PhpStorm.
* User: Administrator
* Date: 2018/4/8
* Time: 13:39
* @author Zhanghui
*/
class playeremoticonredistask extends basicredistask {
public function __construct()
{
parent::__construct();
$this->init_redis_fields();
$thi... | true |
a0ea6aaacda5d2962efd1875c3ca53bdfdce8799 | PHP | shanerogers/ecotone | /src/Messaging/Endpoint/PollingConsumer/PollerTaskExecutor.php | UTF-8 | 2,024 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Ecotone\Messaging\Endpoint\PollingConsumer;
use Ecotone\Messaging\Endpoint\InboundGatewayEntrypoint;
use Ecotone\Messaging\Endpoint\NullAcknowledgementCallback;
use Ecotone\Messaging\Handler\NonProxyGateway;
use Ecotone\Messaging\MessageHeaders;
use Ecotone\Messaging\PollableC... | true |
e0ebb68906526f21cfd0a2c80c63cd2d7afdbf51 | PHP | Rohitbadgujar/basic_PHP_operation_code | /htdocs/property-insert.php | UTF-8 | 9,518 | 2.53125 | 3 | [] | no_license | <!DOCTYPE HTML>
<html style="background-color:#f0f0f0;">
<head>
<style>
.error {color: #FF0000;}
.button {
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;... | true |
fcb265492d48a2096886013fc866718f4e03e20d | PHP | Blueprint-Marketing/fhs-1 | /pagely/memcache-tester.php | UTF-8 | 2,524 | 2.5625 | 3 | [
"GPL-1.0-or-later",
"GPL-2.0-only",
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
// define some vars
define( 'OMEMCACHED_SERVERS', 'p9-cache-object-s.tftue1.0001.use1.cache.amazonaws.com:11211' ); // object cache
define( 'PMEMCACHED_SERVERS', 'p9-cache-page.tftue1.0001.use1.cache.amazonaws.com:11211'); // page cache
ini_set('s... | true |
bddc8502f172e1b67086e871a3d281fd362b291d | PHP | kinGshaifat/NewskinG-mobile-app | /admin/index.php | UTF-8 | 1,521 | 2.78125 | 3 | [] | no_license | <?php include('connection.php') ?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Admin Panel</title>
<h1 align="center"><font color="Blue">Admin Panel</font></h1>
</head>
<body>
<h1 align="center"><font color="green">Log In</font></h1>
<form method="post" >
<div align="center">
<table>
<tr>
... | true |
0abc2f86dfe5b49747b18ea366147f81eb7e486f | PHP | nrwtaylor/stack-agent-thing | /agents/account.php | UTF-8 | 7,126 | 2.796875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
//require '../vendor/autoload.php';
require '/var/www/html/stackr.ca/vendor/autoload.php';
ini_set("allow_url_fopen", 1);
class Clerk {
public $var = 'hello';
function __construct(Thing $thing) {
//function __c... | true |
fe87f69b3c75054ed5f8c74722670bda5b22b3c9 | PHP | HyeonsikCho/chongmu_erp | /engine/EngineCommonFunc.php | UTF-8 | 2,074 | 2.984375 | 3 | [] | no_license | <?
/**
* @file EngineCommonFunc.php
*
* @brief 엔진에서 넘긴 작업을 실제로 분배하는 클래스
*/
include_once(dirname(__FILE__) . '/common/EngineCommon.php');
class EngineCommonFunc {
/**
* @var const array CLASS_NAME
*
* @brief 작업구분에 따른 실제 동작 파일명을 저장하는 배열<br/>
* 엔진이 추가될 경우 작업명과 파일명 추가요망
*/
const CLASS... | true |
f987b08e8cd71d547f702c3cb473fa7b76a4435c | PHP | lextira/pureftpd | /web/src/app/Http/Requests/CreateAccountRequest.php | UTF-8 | 1,163 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use App\Data\Repositories\Interfaces\AccountRepository;
use App\Rules\UniqueLogin;
use Illuminate\Foundation\Http\FormRequest;
class CreateAccountRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*... | true |
62631183de1f2906ba40756c4f28e68af1d10431 | PHP | MaxGoryunov/chem-proj | /dbQueries/IQuery.php | UTF-8 | 299 | 3.4375 | 3 | [] | no_license | <?php
namespace DBQueries;
/**
* Interface for queries to DB
*/
interface IQuery {
/**
* Returns a query string created by QueryBuilder class
*
* @return string
*/
public function getQueryString():string;
} | true |
a40df22da0bfa1d0e2f0090c2cabfa328e2aed0d | PHP | rueduphp/octo | /lib/closures.php | UTF-8 | 4,752 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Octo;
class Closures
{
private static $callbacks = [];
private $id;
public function listen(\Closure $callback)
{
$ref = new \ReflectionFunction($callback);
$file = new \SplFileObject($ref->getFileName());
$file->seek($ref... | true |
0de53d37f0adbbcb96ceb7e6b5294e23889828a4 | PHP | Airwalker7/arrays_loops_tasks | /22.php | UTF-8 | 359 | 3.140625 | 3 | [] | no_license | <?php
//<p>22. Нарисуйте пирамиду, как показано на рисунке, воспользовавшись циклом for или while.<br><br>
//xx<br>
//xxxx<br>
//xxxxxx<br>
//xxxxxxxx<br>
//xxxxxxxxxx</p>
$n=5;
$a = 'xx';
$i=1;
while ($i<=$n) {
for ($j=1;$j<=$i;$j++) {
echo "$a";
}
echo '</br>';
$i++;
} | true |
26b991dc04fb873a13878b049901d155366d36b9 | PHP | Alexbeet/concept | /app/Controller/TrackersController.php | UTF-8 | 4,768 | 2.640625 | 3 | [] | no_license | <?php
App::uses('AppController', 'Controller');
/**
* Trackers Controller
*
* @property Tracker $Tracker
*/
class TrackersController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$this->Tracker->recursive = 1;
$options = array('Instrument.instrument_type_id' => 2... | true |
2c184fc0a3b9423886247bbdf948dfbbb7e57f08 | PHP | apcloic/YetiForceCRM | /app/Fields/Integer.php | UTF-8 | 1,714 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Tools for Integer class.
*
* @copyright YetiForce Sp. z o.o
* @license YetiForce Public License 3.0 (licenses/LicenseEN.txt or yetiforce.com)
* @author Tomasz Kur <t.kur@yetiforce.com>
*/
namespace App\Fields;
/**
* Integer class.
*/
class Integer
{
/**
* Function to display number in user... | true |
8ccafa72cbe2d2bf03175c3b82936009fe8b4b8f | PHP | jilenloa/botman-sample | /app/BotManDrivers/TwilioWhatsAppLocationDriver.php | UTF-8 | 1,563 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\BotManDrivers;
use BotMan\BotMan\Interfaces\DriverEventInterface;
use BotMan\BotMan\Messages\Attachments\Contact;
use BotMan\BotMan\Messages\Attachments\Location;
use BotMan\BotMan\Messages\Incoming\IncomingMessage;
class TwilioWhatsAppLocationDriver extends TwilioWhatsAppDriver
{
const DRI... | true |
15752cf2df2e03dd5535b8d6c1064b5a842d8240 | PHP | ryan-mahoney/Helper | /src/Helper/app/helpers/AudioJS.php | UTF-8 | 622 | 2.5625 | 3 | [] | no_license | <?php
namespace Helper;
class AudioJS
{
public function render(Array $args, Array $options)
{
$file = $args[0];
$buffer = '';
if (!isset($_SERVER['AudioJS-Included'])) {
$_SERVER['AudioJS-Included'] = true;
$buffer .= '
<script src="/js/audiojs/au... | true |
8b495340fe22608f4dcf7e6e57422f03bfd0d7e8 | PHP | abutan/zooshop | /store/forms/shop/order/DeliveryForm.php | UTF-8 | 1,329 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace store\forms\shop\order;
use store\entities\shop\DeliveryMethod;
use yii\base\Model;
use yii\helpers\ArrayHelper;
use store\helpers\PriceHelper;
class DeliveryForm extends Model
{
public $method;
public $address;
public $index;
private $_price;
private $_weight;
public funct... | true |
eaeb0b78d009725a525649ba2cacd0e6f88cfaf0 | PHP | VarelaVargasLeandro18/TP_Restaurante_Prog_3D | /app/controllers/UsuarioController.php | UTF-8 | 5,692 | 2.765625 | 3 | [] | no_license | <?php
namespace Controllers;
require_once __DIR__ . '/CRUDAbstractController.php';
require_once __DIR__ . '/../models/UsuarioModel.php';
require_once __DIR__ . '/../models/TipoUsuarioModel.php';
require_once __DIR__ . '/../POPOs/Usuario.php';
require_once __DIR__ . '/../files/CSVFileLoad.php';
use Psr\Http\Message\S... | true |
e23948c6dc157cb129bdcda0ca493cebfac4c4e5 | PHP | Angamar/IT-Bootcamp | /20 __ construct/index.php | UTF-8 | 5,482 | 3.171875 | 3 | [] | no_license | <html>
<head>
<link type="text/css"
rel="stylesheet" href="style.css">
<style>
div
{
padding: 10px;
background: gray;
width: 200px;
color: white;
}
.row:before,
.row:after {
clear:both;
display:table;
content:"";
}
img
{
float: left;
width: 100px;
clear: left;
}
</style>... | true |
5e867362f4d1a3c18380d4679047b8386b45f326 | PHP | enygma/stormpath | /tests/ConfigTest.php | UTF-8 | 1,192 | 2.59375 | 3 | [] | no_license | <?php
class ConfigTest extends \PHPUnit_Framework_TestCase
{
private $config;
public function setUp()
{
$this->config = new \Stormpath\Config();
}
/**
* Test that loading additional values through the constructor works correctly
* @covers \Stormpath\Config::load
* @covers \... | true |
13197b197fab8ab6cde99773b741c83acc3f3e3e | PHP | Deutsche-Squad-Gemeinschaft/BeyondTheWire-RCON-PHP | /tests/Feature/LiveServerTest.php | UTF-8 | 4,741 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace DSG\BeyondTheWireRCON\Tests\Feature;
use DSG\BeyondTheWireRCON\Data\ServerConnectionInfo;
use DSG\BeyondTheWireRCON\BeyondTheWireServer;
class LiveServerTest extends \DSG\BeyondTheWireRCON\Tests\TestCase {
private BeyondTheWireServer $btwServer;
/**
* This method is called before each t... | true |
2fa35036ae1d647190d7331ba4f70388fc86b38e | PHP | AiPacino/dev-server | /system/library/zuji/order/WeixiuStatus.php | UTF-8 | 2,407 | 2.71875 | 3 | [] | no_license | <?php
/**
* 维修申请单状态
* @access public
* @author Chenchun <Chenchun@huishoubao.com.cn>
* @copyright (c) 2017, Huishoubao
*
*/
namespace zuji\order;
/**
* WeixiuStatus 退货申请单状态类
*
* @author Chenchun <Chenchun@huishoubao.com.cn>
*/
class WeixiuStatus{
const WeixiuInvalid = 0;
/**
* @var int 已申请(生成维修单... | true |
b10cbfea36d84c05ae599e5befad92a63cc6c13e | PHP | rodrigototaniguchi/php | /operadores/exemplo-06.php | UTF-8 | 167 | 3.15625 | 3 | [] | no_license | <?php
$a = 10;
$b = NULL ;
$c = 20 ;
echo $a ?? $b ?? $c; // ?? php 7.0 - verifica se variável está nula, exibindo a primeira variável não nula
?> | true |
42d6f6bf4913dc4026edf9bd1aceb7df7a0444fe | PHP | minimarcel/vanilla | /src/vanilla/mail/MimeAttachment.class.php | UTF-8 | 3,065 | 2.8125 | 3 | [] | no_license | <?php
import('vanilla.io.File');
import('vanilla.io.FileReader');
import('vanilla.mail.MimeContentType');
import('vanilla.mail.MimeContentDisposition');
class MimeAttachment
{
private $fileName;
private $handler;
private $contentId;
private $dispositionType;
// ---------------------------------------... | true |
8bbf4e16b09111438be25353073da2b17cca37cb | PHP | DirkieDurky/DeSplinterRekenen | /Code/gradeAssignment.php | UTF-8 | 1,796 | 2.875 | 3 | [] | no_license | <?php
require_once "DB_Connection.php";
session_start();
$sth1 = $pdo -> prepare("SELECT * FROM `questions` WHERE assignmentID = ?");
$sth1 -> execute([$_SESSION['activeAssign']]);
$row1 = $sth1 -> fetch();
$correctAnswers = array();
do {
switch ($row1['type']) {
case 1:
$sth2 = $pdo -> prep... | true |
e6a61fefff4cd06e39b6c11b90c33faca408af0c | PHP | richardhj/contao-epost-writer | /src/EPost/Helper/HybridRecipientFactory.php | UTF-8 | 1,669 | 2.65625 | 3 | [] | no_license | <?php
/**
* E-POSTBUSINESS API integration for Contao Open Source CMS
*
* Copyright (c) 2015-2016 Richard Henkenjohann
*
* @package E-POST
* @author Richard Henkenjohann <richard-epost@henkenjohann.me>
*/
namespace EPost\Helper;
use EPost\Api\Metadata\Envelope\Recipient\Hybrid as HybridRecipient;
/**
* Cl... | true |
3ed0826ebefd815b598da75e215268cfe927a359 | PHP | savicmi/tasks | /Task 8/delete.php | UTF-8 | 596 | 2.671875 | 3 | [] | no_license | <?php
function delete_query(Db_Mysql $db) {
$id = 15;
$stmt = "DELETE FROM user
WHERE user_id = '{$id}'";
// query result
$result = $db->query($stmt);
if (!$result) {
echo $db->errno() . ' ' . $db->error();
}
else {
// gets the number of affected rows
... | true |
fc2b87d01fe5630afcdb0d2a184bb091b526a0f8 | PHP | lisaejiro/iduwini | /last_seen.php | UTF-8 | 2,777 | 3.109375 | 3 | [] | no_license | <?php
function relativeTime($time, $short = false){
$SECOND = 1;
$MINUTE = 60 * $SECOND;
$HOUR = 60 * $MINUTE;
$DAY = 24 * $HOUR;
$MONTH = 30 * $DAY;
$before = time() - $time;
if ($before < 0)
{
return "not yet";
}
if ($short){
if ($before < 1 * $MINUTE)
... | true |
601ba4855fb68ee8588926114c8b903f9c1709f7 | PHP | ssscassio/BoaIniciativa | /database/MaterialDAO.php | UTF-8 | 4,518 | 3.203125 | 3 | [] | no_license | <?php
require_once($_SERVER["DOCUMENT_ROOT"]."/BoaIniciativaV3/"."model/MaterialDoado.php");
require_once('ConexaoDB.php');
require_once("Sql.php");
/**
*Classe MaterialDAO
* Classe referente a manipulação de um material no banco de dados
*/
class MaterialDAO
{
private static $instance;
public function __const... | true |
5cb30ca4fb64f6430d3d085dc5e755a9f8cf9ca6 | PHP | chenser9/ctf_unserialize | /pop_nssctf/exp.php | UTF-8 | 704 | 2.671875 | 3 | [] | no_license | <?php
class w44m{
private $admin = 'aaa';
protected $passwd = '123456';
public function __construct()
{
$this->admin='w44m';
$this->passwd='08067';
}
public function Getflag(){
if($this->admin === 'w44m' && $this->passwd ==='08067'){
include('flag.php');
... | true |
f5a9775743dde23663f54d28b87e44a557afddbc | PHP | joshforbes/divvy | /app/Commands/ProcessAvatarUploadCommand.php | UTF-8 | 1,016 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Commands;
use App\Avatar;
use App\Commands\Command;
use App\Http\Requests\Request;
use App\Repositories\AvatarRepository;
use App\Repositories\ProfileRepository;
use Illuminate\Contracts\Bus\SelfHandling;
class ProcessAvatarUploadCommand extends Command implements SelfHandling {
/**
* Create ... | true |
d70f0bf96440aa95fd2b3767013fbed87d5ceea7 | PHP | AndrianinaH/journal | /fonction/UserDB.class.php | UTF-8 | 859 | 2.890625 | 3 | [] | no_license | <?php
require_once('User.class.php');
class UserDB
{
var $con;
public function __construct($con)
{
$this->con=$con;
}
public function testSignUp($mail,$passw)
{
$ret = false;
$log = ($mail?$mail:'');
$pass = ($passw?$passw:'');
try{
$pdos = $this->con->prepare("SELECT COUNT(*) AS res FROM user WHER... | true |
62256eb393913e77773c35a7b556829b6e260e27 | PHP | Brelock/m_b_p | /capital.full/database/migrations/2019_10_28_144309_add_street_type_to_offices_table.php | UTF-8 | 778 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddStreetTypeToOfficesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('offices... | true |
c35d1174aa09e2bd2abe260e4c3dde918b9bed23 | PHP | boythn3693/Vue_MitsuyoRai | /application/helpers/assets_helper.php | UTF-8 | 1,088 | 3 | 3 | [
"MIT"
] | permissive | <?php
/*
* Method to load css files into your project.
* @param array $css
*/
if ( ! function_exists('load_css'))
{
function load_css($css)
{
if ( ! is_array($css))
{
$css = (array) $css;
}
$return = '';
foreach ($css as $c)
{
$filemtim... | true |
2c5d09da739635219f23078b518321e07f8e37fe | PHP | milejko/mmi | /tests/Mmi/Filter/AsciiTest.php | UTF-8 | 1,590 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Mmi Framework (https://github.com/milejko/mmi.git)
*
* @link https://github.com/milejko/mmi.git
* @copyright Copyright (c) 2010-2017 Mariusz Miłejko (mariusz@milejko.pl)
* @license https://en.wikipedia.org/wiki/BSD_licenses New BSD License
*/
namespace Tests\Mmi\Filter;
use Mmi\Filter\Asc... | true |
250200be16080404a997313fd7f42d85209b8150 | PHP | pepebe/gson-php | /src/ClassMetadata.php | UTF-8 | 827 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright (c) Nate Brunette.
* Distributed under the MIT License (http://opensource.org/licenses/MIT)
*/
namespace Tebru\Gson;
use Tebru\Gson\Internal\Data\AnnotationSet;
/**
* Class ClassMetadata
*
* Represents a class an its annotations
*
* @author Nate Brunette <n@tebru.net>
*/
interface Clas... | true |
96686f8fa07afdad371edb491ea55aaa272a1a22 | PHP | twknab/learning_lamp | /05-php-MVC/assignments/13-beltprep-book-review/application/views/view_book.php | UTF-8 | 2,348 | 2.625 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Add a Book and Review</title>
<link rel="stylesheet" href="<?php echo base_url('assets/css/style.css'); ?>">
</head... | true |
192035f5cb43e398197155298ebd90ce482516e2 | PHP | jackbittiner/KG-Jack-Bittiner-PHP | /src/dealer.php | UTF-8 | 1,532 | 3.296875 | 3 | [] | no_license | <?php
require('deck.php');
require('player.php');
class Dealer
{
public $deck;
public $players;
public $able_to_deal;
public function __construct()
{
$this->deck = new Deck;
$this->able_to_deal = false;
$this->players = array();
$i = 0;
$number_of_players = 4;
while($i++ < $number_... | true |
729bf027137087efb4844ffc02a6415e450d6f73 | PHP | xLAMBIEx/insta | /server/designs/uploadImage.php | UTF-8 | 589 | 2.59375 | 3 | [] | no_license | <?php
$filename = $_FILES['file']['name'];
$location = "../../media/designs/".$filename;
$uploadOk = 1;
$imageFileType = pathinfo($location, PATHINFO_EXTENSION);
$valid_extensions = array("jpg");
if( !in_array(strtolower($imageFileType), $valid_extensions) ) {
$uploadOk = 0;
}
$filename = mt_rand... | true |
87a17f19097f5c2976a4a2afc90d781e3ef2d407 | PHP | MaikHo/web_and_more | /module/notizblock/notizblock.php | UTF-8 | 10,847 | 2.90625 | 3 | [] | no_license | <?php
/*
* notizblock.php (utf-8)
* - https://werner-zenk.de
*/
session_start();
if (!isset($_SESSION["login"])) {
header("Location: ../index.php");
exit;
}
// Pfad zur Datenbank
//$datenbank = "notizen.sqt";
$datenbank = $_SESSION["benutzer"].".sqt";
// Datenbank-Datei erstellen
if (!file_exists($datenbank)) {
... | true |
4bd3071063a1d91508dc6e172720b2bd56b2b9c2 | PHP | mario-rivera/ElasticRecipes | /app/Recipes/RecipeUpdater.php | UTF-8 | 1,346 | 2.625 | 3 | [] | no_license | <?php
namespace App\Recipes;
use App\Recipes\iRecipeUpdater;
use Elasticsearch\Client;
use RecipeSearch\Util;
use RecipeSearch\Constants;
use Elasticsearch\Common\Exceptions\Missing404Exception;
use Elasticsearch\Common\Exceptions\InvalidArgumentException as ElasticInvalidArgumentException;
use App\Recipes\RecipeNot... | true |
02129626dc30b04b33afdc3eb7af001573acdd37 | PHP | adnduweb/app-ci4 | /app/Modules/ci4-medias/src/Config/Medias.php | UTF-8 | 5,229 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Adnduweb\Ci4Medias\Config;
use CodeIgniter\Config\BaseConfig;
class Medias extends BaseConfig
{
/**
* Whether to include routes to the Files Controller.
*
* @var bool
*/
public $routeFiles = true;
/**
* View file aliases
*
* @var string[]
*/
pu... | true |
bf5fecf9dc286d2837aa0c6f38787d7b73914c2f | PHP | william31212/NISRA2020_enlightened | /xss_ctf/board/src/Addddddddddddddmin.php | UTF-8 | 560 | 2.515625 | 3 | [] | no_license | <?php
if($_COOKIE['USERSESSID'] !== $_ENV['ADMIN_COOKIE']) {
die("You're not admin!");
} else {
require_once('db_connection.php');
$stmt = $conn->prepare('select id, content, user from comment where `isread`=0 limit 1');
$stmt->bind_param('i', $_GET['id']);
$check = $stmt->execute();
if ( $chec... | true |
20d4ec0ea26a5acfa97d75c73ab3ef4f755d8944 | PHP | geekdevs/EmailTemplateBundle | /Template/EmailTemplate.php | UTF-8 | 1,574 | 3.03125 | 3 | [] | no_license | <?php
namespace Sfk\EmailTemplateBundle\Template;
/**
* EmailTemplate
*
*/
class EmailTemplate implements EmailTemplateInterface
{
/**
* From email address
*
* @var string
*/
protected $from;
/**
* Cc email address
*
* @var string
*/
protected $cc;
/... | true |
83e63a835ee4615fcf95566c49b8f54ff1cbf687 | PHP | aliimrankhanshirani/radsys | /includes/utilities.php | UTF-8 | 717 | 2.5625 | 3 | [] | no_license | <?php
function find_all_files($dir, $pattern='.php')
{
$result = Array();
if (! ($root = @scandir($dir)))
return $result;
foreach ($root as $value)
{
if ($value === '.' || $value === '..' || $value==='.git') {continue;}
... | true |
2c1ced4971c0f4a9d7d0dddccf9e25978b66cc27 | PHP | ksalayon/php_design_patterns | /Adapter/NZAdapter.php | UTF-8 | 465 | 2.6875 | 3 | [] | no_license | <?php
namespace Adapter;
require_once 'INzd.php';
require_once 'IDollar.php';
use Adapter\NZ\INzd;
class NZAdapter implements IDollar
{
private $nzd;
public function __construct(INzd $nzd)
{
$this->nzd = $nzd;
}
public function requestCalc($productNow,$serviceNow)
{
return $t... | true |
d24d397203f11c4544fe163250d8f4fa49fd897f | PHP | dreamcommerce/app-ceneo-xml-exporter | /src/CeneoBundle/Services/ExportStatus.php | UTF-8 | 5,717 | 2.59375 | 3 | [] | no_license | <?php
namespace CeneoBundle\Services;
use CeneoBundle\Entity\Export;
use Doctrine\ORM\EntityManager;
use DreamCommerce\ShopAppstoreBundle\Model\ShopInterface;
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Component\Stopwatch\StopwatchEvent;
use Symfony\Component\Stopwatch\StopwatchPeriod;
class ExportStatus... | true |
28565551449581230e2e510827538b1fd7582e97 | PHP | xalilov/magento-social-network | /app/code/community/Phi/Socnet/Lib/Vendor/google-php-client/auth/apiP12Signer.php | UTF-8 | 2,330 | 2.90625 | 3 | [] | no_license | <?php
/*
* Copyright 2011 Google Inc. 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 agreed to in writing, so... | true |
05b04e5b0dfced339fe4925c165a140d26957fa4 | PHP | goodking4/pet | /data/InitDb.php | UTF-8 | 1,593 | 3.015625 | 3 | [] | no_license | <?php
class mysqlDB
{
private $link;
static private $_instance;
private function __construct($host,$username,$password,$database)
{
$this->link=mysqli_connect($host,$username,$password,$database);
if(!$this->link){
die("连接失败!");
}
mysqli_query($this->link,"set names utf8;");
}
... | true |
04475944c1b12d404a2fa911496b567fb63adb8a | PHP | SZUE/webedition-code-autoimport | /webEdition/we/include/we_classes/listview/we_listview_base.class.php | UTF-8 | 22,311 | 2.515625 | 3 | [] | no_license | <?php
/**
* webEdition CMS
*
* $Rev$
* $Author$
* $Date$
*
* This source is part of webEdition CMS. webEdition CMS is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, ... | true |
7c419487f799016cb95c5564648724cde211966c | PHP | ChisWill/ep2 | /src/Command/Service/ServeService.php | UTF-8 | 1,803 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Ep\Command\Service;
final class ServeService extends Service
{
private string $address;
private string $port;
private string $docroot;
private string $router;
/**
* {@inheritDoc}
*/
protected function configure(): void
{
$options... | true |
81a3907edb54c33ff96521477611fee4788dd591 | PHP | PhuongBkap/test | /Admin/order-detail.php | UTF-8 | 3,673 | 2.53125 | 3 | [] | no_license | <?php include 'header.php';
include'../config_db/connect.php';
include '../cart-function.php';
if(isset($_GET['id'])){
$id_order = $_GET['id'];
$order_query = mysqli_query($connect,"SELECT * FROM orders WHERE id = $id_order");
$order = mysqli_fetch_assoc($order_query);
$id_account = $order['id_account'];
$account_... | true |
e1790c63531e21c5073ec636b934ac9aecc8e198 | PHP | TripleSD/moring-bridge | /app/Http/Middleware/BridgeLogs.php | UTF-8 | 506 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use App\Http\Controllers\Api\Bridge\BridgeLogsController;
use Closure;
class BridgeLogs
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @param $next
* @return string... | true |
c444acfa5a2e3d6c73904daaac7e838d66bd5ad6 | PHP | xtremeonecoder/courier-database-search | /models/DbTable/Companies.php | UTF-8 | 3,965 | 2.671875 | 3 | [] | no_license | <?php
/**
* Search Engine for Finding Courier Services
*
* @category Application_Core
* @package courier-search-engine
* @author Suman Barua
* @developer Suman Barua <sumanbarua576@gmail.com>
*/
/**
* @category Application_Core
* @package courier-search-engine
*/
class Application_Model_DbTab... | true |
1467a21ca019faeca5742456017109e882b21b16 | PHP | shimooka/PhpDesignPattern | /Builder/Director/NewsDirector.php | UTF-8 | 490 | 2.921875 | 3 | [] | no_license | <?php
namespace DoYouPhp\PhpDesignPattern\Builder\Director;
use DoYouPhp\PhpDesignPattern\Builder\Builder\NewsBuilder;
/**
* Directorクラスに相当する
*/
class NewsDirector
{
private $builder;
private $url;
public function __construct(NewsBuilder $builder, $url)
{
$this->builder = $builder;
... | true |
67d7014808023348976e66121e4f1ad4dcdde3d8 | PHP | viktor-br/article_import | /src/BVN/Import/WriterInterface.php | UTF-8 | 218 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace BVN\Import;
use BVN\Entity\ArticleCollection;
interface WriterInterface
{
/**
* @param \BVN\Entity\ArticleCollection $article
*/
public function write(ArticleCollection $article);
} | true |
0169dce026fdfea290dffe740d83d9a6f99dcd94 | PHP | zeddic/webdkp | /www/core/main/site.php | UTF-8 | 4,587 | 2.78125 | 3 | [] | no_license | <?php
include_once("main/framework.php");
include_once("main/siteStatus.php");
include_once("main/page.php");
include_once("main/folder.php");
include_once("main/theme.php");
include_once("security/security.php");
include_once("util/util.php");
include_once("util/xmlutil.php");
include_once("lib/dkp/dkpUtil.php");
cla... | true |
0688108256e44748cac9edd72de705c2586ac845 | PHP | thomasdion/bands | /lib/SesControl.php | UTF-8 | 7,872 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
class SesControl {
private $tokenId='';
CONST _COOKIE_EXPIRE_ = 3600; //Cookies' expiration time 1 hour
CONST _SESSION_NAME_ = 'aossessid'; //Change from the default PHPSESSID name
CONST _SESSION_CONFIRMATION_ = '_LOGED_IN_AOS'; //If session==true user is loged
CONST _SESSION_EN... | true |
d44cbfaecba307a3258f1c224b76b7e0e98948e9 | PHP | Mrkebubun/nickelbot | /adapters/btc-e/btc-e_adapter.php | UTF-8 | 11,196 | 2.765625 | 3 | [
"MIT"
] | permissive | <?PHP
class BtceAdapter implements CryptoExchange {
public function __construct($Exch) {
$this->exch = $Exch;
}
public function get_info() {
return [];
}
public function withdraw( $account = "exchange", $currency = "BTC", $address = "1fsdaa...dsadf", $amount = 1 ) {
return [];
}
... | true |
81bc4bf5a53d2cf6cb961044cf9e58e4ad087efe | PHP | ranjan1703/HPEassignmentcode | /reverse.php | UTF-8 | 483 | 2.96875 | 3 | [] | no_license | <html>
<body>
<h2>reverse string </h2>
<h3><h3>
<form action="" method="post">
<input type="text" name="number" />
<input type="submit" />
</form>
</body>
</html>
<?php
//ini_set('xdebug.max_nesting_level', 256);
$num=$_POST['number'];
function reverse_string($str1)
{
$num = strlen($str1);
if($num == 1)
{
... | true |
80778ac68a81a511314cc77f7416bfc8b5e9b0f6 | PHP | tringuyen623/Module2 | /Inheritance/Baitap/Triangle/Shape.php | UTF-8 | 232 | 3.75 | 4 | [] | no_license | <?php
class Shape {
private $name;
public function __construct(string $_color)
{
$this->color = $_color;
}
public function show(){
return "I am a triangle. My color is $this->color ";
}
}
?> | true |
de25b815a2a3b9e024ee842fe49037a9e7653634 | PHP | diamonjack/belajar-php | /coba-encrypt-decrypt-oop.php | UTF-8 | 1,919 | 3.09375 | 3 | [] | no_license | <h2>Coba Encryption & Decryption OOP PHP</h2>
<?php
class MY_Encryption {
var $skey = "3JtYFFmFYByQYseg4ZGWmv7w"; // kata kunci bisa di ganti sesuai keingginan kita
public function safe_b64encode($string) {
$data = base64_encode($string);
$data = str_replace(array('+', '/', '='),array('-... | true |
1d63ebd292bfec586b986d8d076eb623d04d73ac | PHP | markemer/macports-base | /vendor/tcllib-1.21/modules/transfer/include/dsource_options.inc | UTF-8 | 1,317 | 2.625 | 3 | [
"BSD-2-Clause",
"TCL"
] | permissive | [opt_def -string [arg text]]
This option specifies that the source of the data is an immediate
string, and its associated argument contains the string in question.
[opt_def -channel [arg handle]]
This option specifies that the source of the data is a channel, and
its associated argument is the handle of the chann... | true |
799a975b62b0e133d155db1d151b20d836b1c088 | PHP | digitalgrease/PHP-Library | /hubstaff | UTF-8 | 7,317 | 2.640625 | 3 | [] | no_license | #!/usr/bin/env php
<?php
$filename = validate($argv);
$data = loadDataFromCsv($filename);
$projectColumn = getColumnIndex($data, "Project");
$taskColumn = getColumnIndex($data, "Task");
$timeColumn = getColumnIndex($data, "Time");
$activityColumn = getColumnIndex($data, "Activity");
$data = removeRow($data, 0);
$dat... | true |
289208939cebbf522eadc36fb2a9b5ad438dcebc | PHP | zchowdhury2/webprogramming | /inclassphp.php | UTF-8 | 186 | 3 | 3 | [] | no_license | <html>
<head>
<title> inclass php </title>
</head>
<body>
<?php
$x = 5+3;
$y = $x+2;
$z = $y+$x+29;
$a=$z+56;
echo " x= ". $x ." y= ". $y ." z= ". $z . " a= ". $a ;
?>
</body>
</html> | true |
6f4d1ca03d92e2f421673e8618eea4334fd702fc | PHP | splinbl4/7Skills-test | /src/Module/Sale/QueueBroker/Producer/ReceiptGenerateProducer.php | UTF-8 | 781 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Module\Sale\QueueBroker\Producer;
use App\Module\Sale\Command\Create\Command;
use JMS\Serializer\SerializerInterface;
use OldSound\RabbitMqBundle\RabbitMq\Producer;
/**
* Class ReceiptImportProducer
* @package App\Module\Sale\QueueBroker\Producer
*/
class ReceiptGener... | true |
9514f3ac0ff722488f6e6fd26c303301856f369f | PHP | StephanEll/Logit | /application/models/gpsTools.php | ISO-8859-1 | 586 | 2.875 | 3 | [] | no_license | <?php
class Application_Model_gpsTools
{
public static function toFloat ($gpsArray)
{
print_r($gpsArray);
$posTrenner = strpos($gpsArray['2'], '/');
$sekunden = (int)substr($gpsArray['2'], 0, $posTrenner) / (int)substr($gpsArray['2'], $posTrenner+1);
return (((($sekunden/60) + (int)$gpsArray['1'])/60)+(int)... | true |
94e695565ffff3013d944de36701214796eab478 | PHP | YafiAzka/ujikom_laundry | /app/Models/OutletModel.php | UTF-8 | 419 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use CodeIgniter\Model;
class OutletModel extends Model
{
protected $table = 'tb_outlet';
protected $useTimestamps = false;
protected $allowedFields = ['id', 'nama', 'alamat', 'tlp'];
public function getOutlet($id = false)
{
if ($id == false) {
... | true |
cbe7098f45e53e6612227db5f3b1a747b0c716bc | PHP | Thomas1601/ConnectLife | /Models/Manager.php | UTF-8 | 214 | 2.59375 | 3 | [] | no_license | <?php
namespace CESI\ConnectLife;
class Manager
{
protected $db;
public function __construct()
{
$this->db = new \PDO('mysql:host=localhost;dbname=ConnectLife;charset=UTF8','root');
}
} | true |
46e80eaaa4112b53364507d32eb4fccd67b402ff | PHP | cjsjtec/HandsOn-php-4501 | /HandsOn/Cap7/exemploFinal/index.php | UTF-8 | 458 | 2.9375 | 3 | [] | no_license | <?php
function __autoload($class)
{
$file = __DIR__ . '/'.str_replace('\\', '/', $class) . '.php';
//echo $file;
require $file;
}
$clienteService = new Model\Service\Cliente();
//Insercao
$clienteService->insert(array(
'nome' => 'Marisa',
'cpf' => '123.456.789-00'
));
//Busca
// foreach ($clienteService->... | true |
84081b0369a502df39a26bdf9fda17d8b6309d6b | PHP | samysab/Sporters | /libs/php/settings_check.php | UTF-8 | 2,583 | 2.703125 | 3 | [] | no_license | <?php
include('../functions/functions.php');
include('db/db_connect.php');
if (!isConnected()) {
header('Location: ../../login.php');
}
// Fonction d'assainissement des inputs
function check_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
//... | true |
604f228c33fff5737884091c1114ec46ff3aae30 | PHP | mingchungou/practice_mix | /php/hello.php | UTF-8 | 528 | 3.21875 | 3 | [] | no_license | <?php
//Different way to comment in php_check_syntax
//This allow to show info in the screen
#echo "Hello world";
/*
This seems really easy
*/
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHP</title>
<meta charset="utf-8">
<meta name="viewport" content="wid... | true |
d1ba674c1e09025951d4529be1d0b93793eea475 | PHP | MouseZver/McBanner | /Aero/Low/Lerma/Placeholders.php | UTF-8 | 1,290 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Aero\Low\Lerma;
trait Placeholders
{
protected $pattern = '/(\?|:[a-z]{1,})/'; # Поиск плейсхолдеров в запросе
protected $matches; # Placeholders
/*
- Поиск ':', замена placeholders на '?'
*/
public function replaceHolders( $sql ): string
{
$this -> matches = [];
... | true |
6e6baf67f9e2977e97161e2f51200a91faf3240a | PHP | yobijoss/cursos | /php-manejo-datos/src/ejercicios/extraccion-datos.php | UTF-8 | 922 | 3.21875 | 3 | [] | no_license | <?php
$data = 'Estudio PHP';
echo "$data[0] | {$data{0}}";
$post = 'Lorem ipsum dolor, sit amet consectetur adipisicing elit. Exercitationem odio labore reiciendis, at animi blanditiis perspiciatis voluptatibus quasi nihil quo, repellendus amet suscipit nisi eos distinctio dolor consequatur, eveniet velit?';
$extra... | true |
b0ab048b9e0ea930a574e6b0ba3352cb0deb0a67 | PHP | Marco410/campestre | /application/models/campestre/Rol.php | UTF-8 | 1,361 | 2.703125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
*
*/
class Rol extends CI_Model
{
function __construct()
{
parent::__construct();
}
public function getAll() {
return $this->db->get('roles');
}
public function save($data, $id = null ,$type = false) {
$permisos_rol = array();
$this->db->trans_start();
//insert
if( !$type ) {
... | true |
b9705d0730c77ce6f6e5417766fdc8d60c3b2823 | PHP | Aviii06/library-sdslabs | /app/controllers/user.php | UTF-8 | 308 | 2.5625 | 3 | [] | no_license | <?php
namespace Controller;
session_start();
class User{
public function get()
{
if((isset($_SESSION["id"])) && ($_SESSION["role"]=="user"))
echo \View\Loader::make()->render("templates/user.twig");
else
{
header("Location: /loginUser");
}
}
} | true |
f668312519952fd7a8c037f01a02dea6081f8622 | PHP | AmiluA/CollageMaker | /SendMail.php | UTF-8 | 3,138 | 2.53125 | 3 | [] | no_license | <?php require_once 'SupportingFiles/PHPFunctions.php'; require_once "Classes/Facebook_Login.class.php"; ?>
<!DOCTYPE html>
<html>
<head>
<title>Create Collage</title>
<?php include 'SupportingFiles/RequiredSources.html'; ?>
</head>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByT... | true |
e8e66da048a88715ce69d7335a3c8f5253812fb5 | PHP | jpyrat/vertsparis2008 | /plugins/squelette_general/exec/postconfig.php | UTF-8 | 11,702 | 2.609375 | 3 | [] | no_license | <?php
//
// Configurateur de mots clefs et de rubriques bas'e sur
// Configurateur Squelette Epona - 2004 Nov 10 - Marc Lebas.
// Realisation : Achille : achille@artisandelatoile.com, merci jacques ;p
//
function refus($msg) {
echo "<b><font color=red>$msg</font></b><br>";
echo "Action non commenc�e; rectifier les... | true |