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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2657cbf9f0a5936e6696bcbd9a0c57d72760bdd1 | PHP | emanuellopes/snape.ecosystem.wp | /src/CarbonFields/CarbonFieldsFactory.php | UTF-8 | 417 | 2.53125 | 3 | [] | no_license | <?php
namespace Snape\EcoSystemWP\CarbonFields;
use Snape\EcoSystemWP\Contracts\ICarbonFieldsFactoryInterface;
class CarbonFieldsFactory implements ICarbonFieldsFactoryInterface
{
/**
* Return the container from carbonfields.
*
* @param callable $callback
*/
public function create(callabl... | true |
20607d4d8c05357b9b8d2cbcf8372c0b66d6c339 | PHP | bluware/frame | /active-record/ActiveRecord.php | UTF-8 | 7,198 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Bluware PHP Lite & Scaleable Web Frame.
*
* @author Eugen Melnychenko
*/
namespace Frame;
use Frame\ActiveRecord\Query;
abstract class ActiveRecord extends Query
{
/**
* @param array $data
*
* @return mixed
*/
public static function create(array $data)
{
... | true |
30472c3e8f4e2bb2ff394870240d570bf5bbe165 | PHP | mvc5/view | /src/Compiler/Verbatim.php | UTF-8 | 3,084 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Portions copyright (c) Taylor Otwell https://laravel.com
* under the MIT License https://opensource.org/licenses/MIT
*/
namespace View5\Compiler;
use View5\Template;
use function array_push;
use function preg_replace_callback;
use function str_replace;
use function strpos;
final class Verbatim
{
... | true |
31e5d04163d4f922ef52e43dec4e3d3078ef042a | PHP | wanggn/tp3_my_question | /ThinkPHP/Library/HttpTool.class.php | UTF-8 | 1,018 | 2.84375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Library;
/**
* Created by JoLon.
* User: JoLon
* Date: 2018/4/3
* Time: 9:12
*/
class HttpTool{
/**
* 判断请求URL是否有效
* @param $url
* @return bool
*/
public static function checkUrlIsValid($url){
$result = get_headers($url,1);
if(preg_match('/200/',$resul... | true |
0253875dd755c0e4737b4da12487b69769d8ac45 | PHP | Kebumen-Grey-Hat/ChatBot | /latihan.php | UTF-8 | 578 | 3.375 | 3 | [] | no_license | <?php
// Variabel
/*
$nama = "ARJUN-NEWBIE";
$umur = 15;
$hobi = "NGODING";
echo "NAMA : ".$nama."\n";
echo "UMUR : ".$umur."\n";
echo "HOBI : ".$hobi."\n";
// kondisi
$uang = 5000;
if ($uang >= 10000){
echo "UANG ANDA MASIH SISA";
}else{
echo "UANG ANDA KURANG";
}
// input dan output
echo "MASUKAN... | true |
00d6db43d5b9efc6e81b4ba4860b5dc7f73fc923 | PHP | mdash131/student-registry | /app/Http/Controllers/StudentsController.php | UTF-8 | 4,699 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Students;
use DB;
class StudentsController extends Controller
{
public function showstudentform(Request $request)
{
$name = $request->name;
$studentNum = $request->studentNum;
$course = $request->course;
... | true |
f6e579cefa404a45c378fc203c94b9eb96242cc6 | PHP | clem96/GestionGarage | /PHP/CONTROLLER/TestPierre.php | UTF-8 | 458 | 2.71875 | 3 | [] | no_license | <?php
function ChargerClasse($classe)
{
require $classe.".Class.php";
}
spl_autoload_register("ChargerClasse");
//VEHICULES
$v = new Vehicules (["idVehicule" => 1 ,"marqueVehicule"=>"Opel","modeleVehicule" => "Corsa C", "immatriculationVehicule" => "AT-178-CP", "klmVehicule" => 257325]);
echo "\n";
//INTERVE... | true |
c96a0e86afeb74aad969aeaa5d295571ccf06019 | PHP | niebezsensu/InfoWro | /uwierzytelnianie.php | UTF-8 | 1,577 | 2.546875 | 3 | [] | no_license |
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<title>Uwierzytelnianie</title>
<link rel="stylesheet" href="css/uwierzytelnianie.css" type="text/css"/>
</head>
<body>
<?php
session_start();
$users = array('bolek' => 'mandarynka1', 'lysy' => '123kot', 'ruda' => 'tablica');
$_SESSION['isLo... | true |
ccc386c879f256be8afff2b6afaa4ff8cb81e48e | PHP | Monserrat-Martinez/boutiquev3 | /proyecto_bulma/boutique3/purchases.php | UTF-8 | 2,599 | 2.96875 | 3 | [] | no_license | <?php
require_once "header.php";
function filtrado($datos){
$datos = trim($datos); // Elimina espacios antes y después de los datos
$datos = stripslashes($datos); // Elimina backslashes \
$datos = htmlspecialchars($datos); // Traduce caracteres especiales en entidades HTML
r... | true |
b53e1a75bb635eca65ddf863f89203a04a7d0790 | PHP | remk-wadriga/adloud-yii-project | /protected/forms/UserRestorePasswordForm.php | UTF-8 | 2,406 | 2.765625 | 3 | [] | no_license | <?php
/**
* RestorePasswordForm class.
* RestorePasswordForm is the data structure for keeping
* user restore password form data. It is used by the 'restorePassword' action of 'SiteController'.
*/
class UserRestorePasswordForm extends CFormModel {
public $email;
public function attributeLabels()
{
... | true |
3fa4ec4acbbbf930effc29171f92ebf68d4adf7f | PHP | phu-bui/learn_php_web- | /week3/week3.3.php | UTF-8 | 488 | 2.5625 | 3 | [] | no_license | <html>
<head>
<title>
</title>
</head>
<body>
<?php
$value = $_POST["value"];
$money = $_POST["money"];
$kq = rand(0,99);
print("Ket qua sinh ngau nhien la: $kq");
if($value==$kq){
$money=$money*80;
print("Ban nhan duoc so tien la: $money");
}
else {
$money = $mon... | true |
2c833aee28c23815a2eff76f9fbf263028f0f6ab | PHP | PatrickLef/hamsterpaj4 | /classes/group.class.php | UTF-8 | 4,042 | 2.609375 | 3 | [] | no_license | <?php
class Group extends HP4
{
function exists()
{
return ($this->id > 0) ? true : false;
}
function fetch($search, $options)
{
global $_PDO;
$query = 'SELECT l.groupid, l.owner, l.take_new_members, l.name, l.description, l.presentation, l.not_member_read_presentation';
$que... | true |
4affc6a65c21c0ef476cbb3623345ba7ca29aed3 | PHP | ubx-alex/vivaorganica | /webserver/www/libreria.php | UTF-8 | 67 | 2.578125 | 3 | [] | no_license | <?php
function sumar($a,$b)
{
$suma=$a+$b;
return $suma;
}
?> | true |
b77ab1a2e0f2b0b0fca7139c7598ec7534200548 | PHP | sodapop351/SPARC-Website | /ASP/filestorage/folder.php | UTF-8 | 1,665 | 3.453125 | 3 | [] | no_license | <?php
class Folder {
private $name = "";
private $folderurl = "";
private $files = array();
private $folders = array();
public function __construct($in_name, $in_folderurl) {
$this->name = $in_name;
$this->folderurl = $in_folderurl;
// echo "Creating folder " . $this->name ... | true |
d227487db7d2d71f33d07971ee4510fd764f775a | PHP | voranon/central_thelist | /Central_TheList/application/models/device_commands/routeros/getinterfacevlanid.php | UTF-8 | 1,834 | 2.8125 | 3 | [] | no_license | <?php
//exception codes 20600-20699
class thelist_routeros_command_getinterfacevlanid implements Thelist_Commander_pattern_interface_idevicecommand
{
private $_device;
private $_interface;
private $_vlan_id=null;
public function __construct($device, $interface)
{
//$interface
//object = int... | true |
511f6b388baf22fce205216fb68395e3b92f623a | PHP | sunkejl/artisan | /Gitbook/programming/PHP_5_Power_Programming/examples/08/examples/parse2b.php | UTF-8 | 439 | 2.625 | 3 | [
"curl",
"LicenseRef-scancode-unknown-license-reference",
"JSON"
] | permissive | <?php
$dom = new DomDocument();
$dom->load('test2.xml');
$root = $dom->documentElement;
process_children($root);
function process_children($node)
{
$children = $node->childNodes;
foreach ($children as $elem) {
if ($elem->nodeType == XML_ELEMENT_NODE) {
if ($elem->nodeName == 'body') {
... | true |
5cf1e045040719bfd542f4ba998f2b5ecb395915 | PHP | michaeldouglas/laravel-pagseguro | /tests/unit/Address/TerritoryInfoTest.php | UTF-8 | 2,620 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace laravel\pagseguro\Tests\Unit\Address;
/**
* Address Validation Test
* @author Isaque de Souza <isaquesb@gmail.com>
*/
class TerritoryInfoTest extends BaseValidationRules
{
/**
* District Data Provider
* @return array
*/
public function districtProvider()
{
return... | true |
8c663a5543b3f3fc2ed35475912773a213b11b61 | PHP | andrear28/cursosphpvideos | /lenguaje/for.php | UTF-8 | 250 | 3.015625 | 3 | [] | no_license | <?php
for ($i=5; $i <=20 ; $i++) {
echo "hace".$i."vaces que paso por aqui <br>";
}
echo "la operacion a finalizado <br>";
for ($i=1; $i <=10 ;$i=$i+2) {
echo "hace".$i."vaces que paso por aqui <br>";
}
echo "la operacion a finalizado <br>";
?> | true |
4a3a15c2e3bd5979ab53680f6778f921e45baeaf | PHP | jartau/vending-machine | /src/tests/Unit/VendingMachine/ProductDispenserTest.php | UTF-8 | 3,275 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Unit\VendingMachine;
use App\Exceptions\ProductException;
use App\Models\Product;
use App\Repositories\ProductRepository;
use App\VendingMachine\ProductDispenser;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ProductDispenserTest extends TestCase
{
use Refres... | true |
ea0cc694a307777b95e7aa04267ef844858d167a | PHP | ad3n/Openloyalty-Framework | /lib/OpenLoyalty/Bundle/TransactionBundle/Validator/Constraints/TransactionReturnDocumentValidator.php | UTF-8 | 4,195 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright © 2018 Divante, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace OpenLoyalty\Bundle\TransactionBundle\Validator\Constraints;
use OpenLoyalty\Component\Transaction\Domain\ReadModel\TransactionDetails;
use OpenLoyalty\Component\Transaction\Domain\ReadModel\TransactionDet... | true |
e515b7702e72c5f6ebea7d222f1de9d8e6fc8703 | PHP | LuisGVV/indicadores | /app/Controller/Component/PRC001_16Component.php | UTF-8 | 3,215 | 2.765625 | 3 | [] | no_license | <?php
App::uses('Component', 'Controller');
App::uses('FirePHP', 'Vendor');
/**
* Calculates a specific chart information
*/
class PRC001_16Component extends Component {
/**
* Constructor
*/
public function __construct() {
$this->University = ClassRegistry::init('University');
$th... | true |
4be956b94db13ea9364b0760b5319fb1ae435425 | PHP | poojakarthik/my-work | /html/management/classes/payments/payments_new.php | UTF-8 | 2,799 | 2.53125 | 3 | [] | no_license | <?php
//----------------------------------------------------------------------------//
// Payments_new.php
//----------------------------------------------------------------------------//
/**
* Payments_new.php
*
* Contains the class that gets information about payments
*
* Contains the class that gets ... | true |
0406449816b02d52d7a56b7094a3d6295710aac4 | PHP | Shuvayatra/migration-web | /app/Nrna/Repositories/Post/PostRepositoryInterface.php | UTF-8 | 2,148 | 2.625 | 3 | [] | no_license | <?php
namespace App\Nrna\Repositories\Post;
/**
* Class PostRepositoryInterface
* @package App\Nrna\Repository\Post
*/
interface PostRepositoryInterface
{
/**
* Save Post
*
* @param $data
*
* @return Post
*/
public function save($data);
/**
* @param $filter
* @pa... | true |
a90dc3b14c7d59e9190f12c981932fb96d501be6 | PHP | hbliang/blog | /app/Services/Markdown/Markdown.php | UTF-8 | 1,031 | 3.015625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Ben
* Date: 2017/2/7
* Time: 下午4:49
*/
namespace App\Services\Markdown;
use League\HTMLToMarkdown\HtmlConverter;
class Markdown implements MarkdownInterface
{
protected static $instance;
/**
* Markdown To Html
* @var \Parsedown
*/
protected $t... | true |
124dc0aa0eb30592ca6afa992135ad8bcc8be8ce | PHP | zhangjiquan1/phpsourcecode | /zhaojianhui/swoolewechat/apps/classes/WechatHandler/Event/EventScan.php | UTF-8 | 751 | 2.765625 | 3 | [] | no_license | <?php
namespace App\WechatHandler\Event;
use Swoole;
use App\WechatHandler\Base;
use App\WechatHandler\InterfaceHandler;
/**
* 扫描带参数二维码事件消息处理.
*/
class EventScan extends Base implements InterfaceHandler
{
/**
* 创建二维码时的二维码
*
* @var
*/
private $sceneId;
/**
* 主入口方法.
*/
p... | true |
d3488033f6d1d408ea7c5ecad748d86dbe59409c | PHP | L3o-pold/Wumpa | /vendor/wumpa/Wumpa/Component/Model/Model.php | UTF-8 | 9,023 | 3.21875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace Wumpa\Component\Model;
use Wumpa\Component\App\App;
/**
* Provide query methodes for model classes.
*
* @author Bastien de Luca <dev@de-luca.io>
*/
abstract class Model implements ModelInterface {
const ASC = "ASC";
const DESC = "DESC";
const LIKE = "LIKE";
const NOTLIKE = "NOT LIKE";
con... | true |
b4a170bdc2cfe362fc78190c0439e0421c8b3847 | PHP | Sheikhasadde/emerdency | /php/login.php | UTF-8 | 1,851 | 2.609375 | 3 | [] | no_license | <?php
require("../includes/db_connect.php");
session_start();
function login($email,$password){
$db = dbConnect();
$hash = '';
$stmt = $db->prepare("SELECT id, email_address, password, type, confirmed FROM Users WHERE `email_address` = ?;");
$stmt->bind_param("s", $email);
$stmt->execute();
$result = $stmt->get... | true |
e7d24cf2aff295d7a9db2752397a4997d4bc32c4 | PHP | DEVinicius/Api_Laravel | /app/Models/Patrimonio.php | UTF-8 | 1,051 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\Ambiente;
use App\Models\Empresa;
class Patrimonio extends Model
{
public $timestamps = false;
protected $fillable = [
'nome_patrimonio',
'descricao',
'id_ambiente',
'codigo_patrimonio',
... | true |
0386fe0b0cc229df52d0e4bc54663978cb3a4d6b | PHP | camilo8/pc | /class/date.php | UTF-8 | 1,221 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace pc;
require_once('conexion.php');
class Date{
/*atributos de form*/
public $fecha;
public $grado;
public $nombre;
public $HN;
public $HF;
public $VD;
public $portatil ;
public $videobeam;
public $extencion;
private $cone;
public $id = NULL;
public function __construct (){
$thi... | true |
066a97c0be2d80c9dfdc7c91d2b9a963774c3ea0 | PHP | timekit-io/findtime-io | /app/Findtime/WitResponse.php | UTF-8 | 3,821 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Findtime;
use App\Exceptions\ConfidenceTooLowException;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
use SplPriorityQueue;
class PQtest extends SplPriorityQueue
{
public function compare($priority1, $priority2)
{
if ($priority1 === $priority2) return 0;
return ... | true |
ded3099ca3f4d80fb914e515accc3e9f5b03aee2 | PHP | wenxiaoqing/anyitou | /protected/models/UserCashOut.php | UTF-8 | 3,989 | 2.625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "user_cash_out".
*
* The followings are the available columns in table 'user_cash_out':
* @property string $id
* @property string $user_id
* @property integer $bank_id
* @property string $card_no
* @property string $cash_out_amount
* @property string $get_cash
* ... | true |
8fced31161cf4694f6e228c3be4dc30614f76604 | PHP | alanly/soen341-scheduler | /app/database/seeds/DatabaseSeeder.php | UTF-8 | 2,677 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
class DatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Eloquent::unguard();
$this->call('UserTableSeeder');
$this->call('ProgramTableSeeder');
$this->call('ProgramOptionTableSeeder');
$this->call('SchoolSessionTableSeeder');... | true |
be7bf24ef2b614bebb37730340e3736937ae4b39 | PHP | wuxiaoji12345/last-project | /api/models/ResultNode.php | UTF-8 | 2,521 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace api\models;
use Yii;
/**
* This is the model class for table "sys_result_node".
*
* @property int $id 主键id
* @property int $rule_output_node_id 检查项id
* @property int $store_id 售点id
* @property int $fail_count 失败次数
* @property int $total_count 检查总次数
* @property int $tool_id 执行工具id
* @property... | true |
c1c690abb922fc84d850890374634125fe775ffe | PHP | alejandrososa/twitter-shouter | /src/Domain/Tweet/TweetCollection.php | UTF-8 | 742 | 3.328125 | 3 | [] | no_license | <?php
namespace App\Domain\Tweet;
class TweetCollection implements \IteratorAggregate
{
private $tweets;
public function __construct(Tweet ...$tweets)
{
$this->tweets = $tweets;
}
public static function fromArray(array $tweets): self
{
$collection = new self();
foreac... | true |
068a4473b5a6b64cbdd985277d5c99ad82760bc7 | PHP | sydorenkovd/kohana | /modules/pagination/classes/Pagination.php | UTF-8 | 1,143 | 2.921875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php defined('SYSPATH') or die('No direct script access.');
/**
* Class Pagination
* @property $items_per_page
* @property $offset
*/
class Pagination extends Kohana_Pagination {
/**
* @var array
*/
public $meta_robots = ['index', 'follow'];
/**
* @var null|string
*/
public $p... | true |
2b78847c37f0dac13d1235374ccb7cc4b5679ddd | PHP | jonataneriksson/kirby-vimeo-field | /vimeo-field.php | UTF-8 | 1,457 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Put your plugin code here
*/
class VimeoField extends TextField {
static public $assets = array(
'js' => array(
'vimeo.js'
),
'css' => array(
'vimeo.css' // /path/to/field/assets/css/styles.css
)
);
public function element() {
$element = parent::eleme... | true |
8352690833803b52a9d370530a2c4b6232c20d05 | PHP | binarycabindevelopment/moving-service-portal | /app/Estimate.php | UTF-8 | 1,112 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use BinaryCabin\LaravelUUID\Traits\HasUUID;
use Illuminate\Database\Eloquent\Model;
class Estimate extends Model
{
use HasUUID;
protected $fillable = [
'uuid',
'source',
'first_name',
'last_name',
'email',
'phone',
'pickup_address... | true |
895fe7f6a6e42e7329bf467ef190a670b322e40d | PHP | Merokai/Simple-MVC-application-using-PHP-7.4 | /core/Error.php | UTF-8 | 380 | 3.375 | 3 | [] | no_license | <?php
namespace Core;
class Error
{
private $status, $message;
public function __construct(int $status, string $message)
{
$this->status = $status;
$this->message = $message;
}
public function getStatus(): int
{
return $this->status;
}
public function getMe... | true |
fa3c1c9a088ef89fbd6074a2f42338948f43b100 | PHP | ngokiet1121/thuvien | /User/change-passwd.php | UTF-8 | 3,987 | 2.515625 | 3 | [] | no_license | <?php
session_start();
require_once "../model/setting.php";
if(isset($_SESSION["session_user_id"])){
$user_id = $_SESSION["session_user_id"];
$query = "SELECT * FROM tbl_user WHERE id='$user_id'";
$result = mysql_query($query) or die ("Lay du lieu bi loi:".mysql_error());
$row = mysql_fetch_array($result);
}
i... | true |
4054e2f41c831506992933fb5ece79fbb7086452 | PHP | THUHUONG1998/PHP | /OPP/demo.php | UTF-8 | 176 | 2.546875 | 3 | [] | no_license | <?php
class User{
var $username;
var $passwork;
var $role;
function printUser(){
echo "username : $this -> username, "
}
}
$phanso1
?> | true |
a74dae6b0d45187401377f51046427f63517496d | PHP | srmishra/ci3_hmvc_boilerplate | /system/libraries/Template.php | UTF-8 | 9,285 | 2.71875 | 3 | [] | no_license | <?php (defined('BASEPATH')) or exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 4.3.2 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2006, EllisLab, Inc.
* @license http://codeigniter.com/u... | true |
ca71cf0bad0276a3f1f51f9101384b7a9e8687cf | PHP | omozokelvin/tiny-blog | /src/libs/RouteMatcher.php | UTF-8 | 1,877 | 2.90625 | 3 | [] | no_license | <?php
namespace tiny\libs;
use Exception;
class RouteMatcher {
private static string $PATH_NAME_PATTERN = "/\{(\w+)\}+?/";
private static string $PATH_VARIABLE_PATTERN = "([\w@\.\-\s\_]+)";
public array $pathParams = [];
public function match(string $appRoute, string $httpRoute): bool {
// t... | true |
b274934f9742b41b2f1f9ce900cd929387c4b478 | PHP | thatdixie/thatdixie.com | /musicbrainz/include/model/RecordingModel.php | UTF-8 | 5,344 | 2.984375 | 3 | [] | no_license | <?php
require_once "MusicbrainzDB.php";
require "Recording.php";
/********************************************************************
* RecordingModel inherits MusicbrainzDB and provides functions to
* map Recording class to musicbrainz.
*
* @author megan
* @version 190704
********************************... | true |
1568bd98e6ff9518217ba788ab035e27414e66bf | PHP | haideralise/sms | /app/Models/Staff.php | UTF-8 | 585 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Models;
use App\User;
use Illuminate\Database\Eloquent\Builder;
/**
* Class Staff
* @package App\Models
*
* @property int $id
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
*/
class Staff extends User
{
protected $table = 'users';
protected $attribu... | true |
0a3e96383a21b121d9c935cfae5ddb4f74401146 | PHP | AntoniaWeb19/GSR-600 | /Practica_2/ejercicio#1/mult_1.php | UTF-8 | 230 | 3.046875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<?php
$a=$_GET['a'];
$b=$_GET['b'];
echo "La multiplicacion de $a por $b es ",$a * $b;
?>
</body>
</html> | true |
30a2e0551efb98812b31e500ab86876bb4783fc1 | PHP | PrincetonAfeez/kommerce-core | /src/ActionHandler/Option/DeleteOptionHandler.php | UTF-8 | 1,076 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace inklabs\kommerce\ActionHandler\Option;
use inklabs\kommerce\Action\Option\DeleteOptionCommand;
use inklabs\kommerce\EntityRepository\OptionRepositoryInterface;
use inklabs\kommerce\Lib\Authorization\AuthorizationContextInterface;
use inklabs\kommerce\Lib\Command\CommandHandlerInterface;
final class De... | true |
07fbc0ac40e20542f6846c7b1816e8ca3790d4ed | PHP | neetjn/guard-sdk-php | /src/tools/utility.php | UTF-8 | 375 | 2.625 | 3 | [] | no_license | <?php namespace Tools;
class Utility {
public static function request($parameters) {
$loc = DRIVER_LOC;
foreach( $parameters as $p=>$key ):
$loc .= "&$p=$key";
endforeach; // loop through param nodes
return json_decode( file_get_conte... | true |
6687d8018eb6de2476ac7b67dcf9907a6878dcdc | PHP | raikata93/miniProject | /database/migrations/2017_12_18_210038_create_work_plots_table.php | UTF-8 | 982 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWorkPlotsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('work_plots', ... | true |
128aa250a1607843dbbb46fbb8cc595ab4a2c401 | PHP | paulatsd/php | /Modulo 04/for.php | UTF-8 | 1,777 | 3.578125 | 4 | [] | no_license | <!DOCTYPE>
<html>
<head>
<title> </title>
<meta charset="utf-8"/>
</head>
<body>
<?php
$pessoas = [
'iCroft' => [ 'name' => "Lara Croft", 'job' => 'Developer'], //linha
['name' => "Lara", 'job' => 'Designer'],
];
//
// for($i = 0; $i < count($pessoas); $i... | true |
c584e6b13429fcb9f2755348b5e7486df9311bba | PHP | dbould/davework | /src/Command/Slim/CreateFileCommand.php | UTF-8 | 1,598 | 2.78125 | 3 | [] | no_license | <?php
namespace Dbould\Davework\Command\Slim;
use Dbould\Davework\Service\CreateFileService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CreateFileComma... | true |
d37e84b262a1b2631088d3c21a9731be6ec51a70 | PHP | labelexe/PHP-Challenges | /List Of Challenges/70. Find the unique number.php | UTF-8 | 605 | 3.90625 | 4 | [] | no_license | <?php
/* 70. Find the unique number
>There is an array with some numbers. All numbers are equal except for one. Try to find it!
It’s guaranteed that array contains at least 3 numbers.
EXAMPLE:
findUniq([ 1, 1, 1, 2, 1, 1 ]) === 2
findUniq([ 0, 0, 0.55, 0, 0 ]) === 0.55
NOTES:
... | true |
c69d1a01a44810e01df16af61f5c6f662b16676b | PHP | RTechSoft/iLigtas | /php_files/genkml.php | UTF-8 | 5,436 | 2.671875 | 3 | [
"CC-BY-4.0"
] | permissive | <?php
require('db.php');
// Opens a connection to a MySQL server.
$connection = mysql_connect($server, $username, $password);
if (!$connection) {
die('Not connected : ' . mysql_error());
}
// Sets the active MySQL database.
$db_selected = mysql_select_db($database, $connection);
if (!$db_selected) {
die('Ca... | true |
49ee451da62e5f6fb3b992209ccdd50d49ba789d | PHP | Saskarc-Dev/saptz | /application/controllers/admin.php | UTF-8 | 19,565 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class admin extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model('admin/madmin');
$this->session->set_userdata(array('viewType' => 'admin'));
}
public function index(){
if(isset($_SESS... | true |
d55b0c6d6643e95c1c5fc9597ac1a93a61060c66 | PHP | designertuan95/VNDGroup | /module/Admin/src/Admin/Model/Entity/ProductImagesEntity.php | UTF-8 | 652 | 2.734375 | 3 | [] | no_license | <?php
namespace Admin\Model\Entity;
class ProductImagesEntity {
public $product_image_id;
public $image;
public $sort_order;
public $product_id;
public function exchangeArray($data)
{
$this->product_image_id = (!empty($data['product_image_id'])) ? $data['product_image_id'] : null;
$this->product_id = (!emp... | true |
5cfe64d712f963867aa783def3bfccdaef67a09f | PHP | zhuxuanME/swoole | /server.php | UTF-8 | 978 | 2.78125 | 3 | [] | no_license | <?php
$ws = new swoole_websocket_server('0.0.0.0',8091);
function broadcast(swoole_websocket_server $ws, $msg, $me = null) {
foreach($ws->connections as $fd) {
if($fd != $me) {
$ws->push($fd, $msg);
}
}
}
// 监听WebSocket连接打开事件
$ws->on('open', function (swoole_websocket_s... | true |
2fae5b29c8ff81c52a37cbf21a5a1963637ec3f3 | PHP | koala-framework/koala-framework | /Kwf/User/EditRow.php | UTF-8 | 10,902 | 2.5625 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
class Kwf_User_EditRow extends Kwf_Model_Proxy_Row
implements Kwc_Mail_Recipient_TitleInterface
{
protected $_changedPasswordData = array();
protected $_changedOldMail = null;
protected $_sendDeletedMail = null;
protected $_saveDeletedLog = false;
protected $_additionalRolesCache = null;
... | true |
315f5a555a93bdaa4b2b8f8251b68474dd7acafc | PHP | wschalle/kagsb | /KAGClient/Client.php | UTF-8 | 10,486 | 2.671875 | 3 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | <?php
/**
* KAG REST API Client V0.2
*
* author: William Schaller
* contact: wschalle@gmail.com
* Copyright (c) 2012, William Schaller
* License: http://www.gnu.org/copyleft/gpl.html GNU GENERAL PUBLIC LICENSE (GPLv3)
*/
namespace KAGClient;
/**
* KAG REST API Client V0.2
*
*/
class Client {
private $base... | true |
da8c33fece40392c4d0111641b2591dbdee8cce8 | PHP | zhangjiquan1/phpsourcecode | /guiqvv/Phplus/src/extends/Debug.php | UTF-8 | 565 | 2.75 | 3 | [
"WTFPL"
] | permissive | <?php
/**
* Some useful extend tools for PHP
*/
namespace zendforum\Phplus;
/**
* for PHP Debug
*/
class Debug {
public static function vd (...$params) {
var_dump(...$params);
echo self::eol();
}
public static function vdd (...$params) {
var_dump(...$params);
echo self:... | true |
f897a05ccce8205aa55506f99750817cdf654763 | PHP | Armstrong1992/SonataAdminBundle | /src/Util/FormBuilderIterator.php | UTF-8 | 2,816 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\AdminBundle\Util;
us... | true |
86e617ad319df073e44b10abf9666d949e5312a3 | PHP | limingshang/liangbang | /application/common/model/Jobcv.php | UTF-8 | 1,419 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\common\model;
use think\Model;
class Jobcv extends Model
{
public $page_info;
/**
* 添加简历
* @param unknown $condition
* @return boolean
*/
public function addJobcv($data)
{
return db('jobcv')->insert($data);
}
/*
* 编辑职位
... | true |
13f04ad88931d4bd29ada4c75ae643313650a1cf | PHP | jqhph/dcat-account | /packages/dcat-admin/src/Widgets/Chart/Bar.php | UTF-8 | 1,200 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Dcat\Admin\Widgets\Chart;
/**
* @see https://www.chartjs.org/docs/latest/charts/bar.html
*/
class Bar extends Chart
{
use ScaleSetting;
protected $type = 'bar';
/**
* Percent (0-1) of the available width each bar should be within the category width. 1.0 will take the whole categor... | true |
2782e04eada73b83fcf5ad305379152c26cd2add | PHP | kodjunkie/lumen-starter | /helpers/helpers.php | UTF-8 | 438 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use App\Models\User;
use Ramsey\Uuid\Uuid;
if (!function_exists('unique_api_token')) {
/**
* Generate unique API token
* @return mixed|string
* @throws Exception
*/
function unique_api_token()
{
$token = Uuid::uuid1()->toString();
if (!is_null(User::whereApiToken(... | true |
ea43d4141b65a63116883e13f41cfc170b4e65c7 | PHP | shawnlindstrom/adventofcode | /src/day1.php | UTF-8 | 1,963 | 3.515625 | 4 | [] | no_license | <?php
/*
* --- Day 1: Not Quite Lisp ---
* Santa is trying to deliver presents in a large apartment building, but he can't find the right floor - the directions
* he got are a little confusing. He starts on the ground floor (floor 0) and then follows the instructions one
* character at a time.
*
* An opening pare... | true |
f06e523c5a58b55b340ca68fd9685deb22ecd683 | PHP | TPei/WebPresentationTool | /src/renderer/HtmlRenderer.php | UTF-8 | 1,163 | 3.1875 | 3 | [] | no_license | <?php
/**
* converts xml string into html string
* @author Thomas Peikert
*/
namespace renderer;
use db\objects\Slide;
use DOMDocument;
use XSLTProcessor;
class HtmlRenderer
{
/**
* returns hmtl string from slide
* @param Slide $slide
* @param $template
* @return string
... | true |
5a4bc1099300b416e52073c2681f7d1b5f852b09 | PHP | jflarm/cajero | /api/controllers/Controller_Cuenta.php | UTF-8 | 199 | 2.515625 | 3 | [] | no_license | <?php
class Cuenta{
public function getCuenta($id){
return json_encode(array('status'=>'OK','message'=>'metodo getCuenta: busca getCuenta con id = '.$id));
}
}
$class = new Cuenta; | true |
07bc8bac739a70b15d393e54c242adcb5c3f918e | PHP | zhaoshengloveqingqing/App-Download | /application/Models/DeviceModel.php | UTF-8 | 2,583 | 2.515625 | 3 | [] | no_license | <?php namespace Pinet\AppDownload\Models; in_array(__FILE__, get_included_files()) or exit("No direct script access allowed");
use Clips\Libraries\DBModelV2;
/**
* Model to manipulate table devices
*
* @author Jake
* @version 1.0
* @date Mon Jul 6 18:10:29 2015
*
* @Clips\Model({"gateway"})
*/
class DeviceMo... | true |
12127f980d984e54f1cf8bde8ea984b83cdf4552 | PHP | mvhenten/Nano | /library/Nano/Db/Schema/Pager.php | UTF-8 | 4,546 | 2.75 | 3 | [] | no_license | <?php
/**
* library/Nano/Db/Schema/Pager.php
*
* @author Matthijs van Henten <matthijs@ischen.nl>
* @package Nano
*/
error_reporting(E_ALL | E_STRICT);
/**
*
*
* @file Nano/Db/Schema/Pager.php
*
* Wrapper around Nano_Db_Schema that handles query logic for paginated
* results ( e.g. sets the offset/limits ... | true |
d1b2e48809474373501b089a62e448762e9ea99e | PHP | cory011202/loginSystem | /testrecursion2.php | UTF-8 | 6,836 | 2.984375 | 3 | [] | no_license | <?php
require_once('includes/db.php');
$connection = new inc_dataBase();
//connect to the db
$connection->connect();
/**
* Created by JetBrains PhpStorm.
* User: cory
* Date: 2/22/12
* Time: 2:48 PM
* To change this template use File | Settings | File Templates.
*/
?><pre><?php
//recurseDir("/mnt/web... | true |
dcf524e0d8310ccdee8248dbe449fb2d2290af77 | PHP | siegigor/todo | /project/src/FetchModel/Task/Sort.php | UTF-8 | 903 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\FetchModel\Task;
use Webmozart\Assert\Assert;
class Sort
{
private const SORT_OPTIONS = ['created_at', 'finished_at', 'priority'];
private const DIRECTION_OPTIONS = ['asc', 'desc'];
private const DEFAULT_SORT_BY = 'created_at';
private const DEFAULT_DIREC... | true |
f6e94fd3769a9f4d550a878013033c47ea55d673 | PHP | sunjingyustudent/vipchannel | /common/sources/write/teacher/IWorktimeAccess.php | UTF-8 | 1,466 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: huangjun
* Date: 2017/1/3
* Time: 下午4:05
*/
namespace common\sources\write\teacher;
interface IWorktimeAccess {
/**
* @param $teacherId
* @param $week
* @param $timeBit
* @param $timeExecute
* @return mixed
* @author xl... | true |
887b9458a67fac8aba610db6b892ef16280cbd41 | PHP | jaguilar992/ExpedienteMedico | /BackEnd/services/Persona.php | UTF-8 | 1,536 | 2.515625 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
include_once('./utils/date.php');
include_once('../class/Conexion.php');
include_once('../class/Persona.php');
if(isset($_POST['accion'])){
$conexion = new Conexion();
switch ($_POST['accion']) {
case 'listarOcupacion':
$persona=new Persona();
echo $persona->listarOcu... | true |
09cc4f3807004b7fbb4026994fd453b494712015 | PHP | JeremsB/sorbet | /View/viewFriend.php | UTF-8 | 5,002 | 2.515625 | 3 | [] | no_license | <title><?php echo $_SESSION['user']['login']; ?> ! </title>
<?php ob_start(); ?> <!--Stocke le code de la page dans la variable $contenu appelée dans le gabarit-->
<h3>C'est un test et ça marche!</h3>
<h4>Bienvenue <?php echo $_SESSION['user']['login']; ?> ! Votre couleur est <span style="color: <?php echo $_SESSION[... | true |
75056b61d381936c5a45959e21591b57e046bae4 | PHP | armphp/arm_php | /src/arm/utils/geometry/ARMPoint.class.php | UTF-8 | 275 | 3.171875 | 3 | [] | no_license | <?php
/**
* Classe que simboliza um ponto 2D
*
* @author renatomiawaki
*
*/
class ARMPoint{
/**
*
* @var number
*/
public $x ;
/**
*
* @var number
*/
public $y ;
public function __construct( $x, $y ){
$this->x = $x * 1 ;
$this->y = $y * 1 ;
}
} | true |
57a70feb88abded1ea0c38159b383a471e07596a | PHP | amaldonadoec/mcrmira | /protected/extensions/Validations/CampoRucCedula.php | UTF-8 | 1,595 | 2.515625 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
class CampoRucCedula extends CCompareValidator {
protected function validateAttribute($object, $attribute) {
... | true |
6b4288fb6bd991f7cbac35aa5051e2f79fa21454 | PHP | polishdeveloper/design_patterns | /src/Patterns/Proxy/ImageProxy.php | UTF-8 | 548 | 3.015625 | 3 | [] | no_license | <?php
namespace Proxy;
class ImageProxy extends AbstractImage {
/**
* @var AbstractImage
*/
private $_realImage;
public function __construct($path) {
$this->_path = $path;
list ($this->_width, $this->_height) = getimagesize($path);
}
protected function _lazyLoad() {
... | true |
c1c06130be0cd1c38978cc7fb22968612e71ee32 | PHP | deepakraj01/Smartclothings | /admin/categories.php | UTF-8 | 7,647 | 2.609375 | 3 | [] | no_license | <?php require_once('inc/top.php');
if (!isset($_SESSION['username'])) {
header('location: login.php');
}
else if (isset($_SESSION['username']) && $_SESSION['role'] == 'author') {
header('location: index.php');
}
if (isset($_GET['del']) && isset($_SESSION['username'])) {
$del_id = $_GET['del'];
... | true |
e45ca3deea975868b3052a3e792e1ba2f90a15e3 | PHP | Getsidecar/googleads-php-lib | /src/Google/Api/Ads/Common/Util/AdsUtilityRegistry.php | UTF-8 | 1,964 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* A registry for usage of ads utilities.
*
* PHP version 5
*
* Copyright 2016, Google Inc. All Rights Reserved.
*
* 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
*
* ht... | true |
c4e52151bd3deee217066959717bacdb069d9b95 | PHP | minhvb/CC_test_02 | /module/Application/src/Application/Entity/Repository/AnswersRepository.php | UTF-8 | 2,933 | 2.578125 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace Application\Entity\Repository;
use Application\Utils\ApplicationConst;
use Application\Utils\DateHelper;
use Doctrin... | true |
0b8cff7b177ef4fcb0658712099c4bdcf0c675e1 | PHP | San7iiago/MyRepo | /Scripts_ejemplos/Taller/punto2.php | UTF-8 | 3,461 | 3.671875 | 4 | [] | no_license | <?php
echo "Punto Numero 2: Mostrar numeros del 1 al 10";
echo "<table border = 1><tr>";
$i = 1;
while($i<=10) {
if ($i%2==0){
echo "<td bgcolor=#2bcbba>".$i."</td>";
} else {
echo "<td bgcolor=yellow>".$i."</td>";
}
$i++;
}
echo "</tr></table>";
echo "<br>Punto Numero 3: Mostrar ... | true |
37d06a9cdd4e411ff0048ee39d87a7e67647da30 | PHP | vramirez-astvinc/ediets-local-test | /core/packages/modoauth-1.0-beta9/modCategory/c46f7bfd75f6e57402de3c407ed8056b/1/modoauth/model/modoauth/request.class.php | UTF-8 | 1,978 | 2.703125 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
OAuth2_Autoloader::register();
/**
* Extend Request class to handle outh params stored in session
*
* @author vramirez
*/
class ModoAuthRequest extends OAuth2_Request{
/**
* Creates a new request with values from PHP's super globals and using $_SESSION to retriev... | true |
0fbe56a6e23079bd6be41d4f1b7c4ffac315a495 | PHP | LouisDreamsDev/projet-5-projet-personnel | /src/DAO/CoinDAO.php | UTF-8 | 3,850 | 2.765625 | 3 | [] | no_license | <?php
namespace App\src\DAO;
use App\src\model\Coin;
class CoinDAO extends DAO
{
public function buildObject($row)
{
$coin = new Coin();
$coin->setId($row['coinId']);
$coin->setCoinName($row['coinName']);
$coin->setSymbol($row['symbol']);
$coin->setSlug($row['slu... | true |
15d6b689f4127f43aa35bfe2b59052aedfed663e | PHP | vilbur/laravel-package-commander | /src/Events/EventGenerator.php | UTF-8 | 311 | 2.515625 | 3 | [] | no_license | <?php
namespace Vilbur\CommanderEvents;
trait EventGenerator
{
protected $pendingEvents = [];
/**
*/
public function raise($events)
{
$this->pendingEvents = $events;
}
/**
*/
public function releaseEvents()
{
$events = $this->pendingEvents;
$this->pendingEvents = [];
return $events;
}
} | true |
3c3210704ae1ae5b28f380db509adee23f0b7cc9 | PHP | TungLA99/PHP_Project | /admin/brand/admin_add_brand.php | UTF-8 | 1,139 | 2.59375 | 3 | [] | no_license | <?php
session_start();
if (!(isset($_SESSION["admin"]) && isset($_SESSION["role"]))) {
header("location:../admin_log_in.php");
exit();
}
?>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h2>Add Brand</h2><hr/>
<form>
<p>Name Brand</p>... | true |
f042abef749c5515bd73d487a4b79688d09bcf4e | PHP | pkresic/rnwa | /DZ/DZ003_003_1/client.php | UTF-8 | 2,448 | 2.71875 | 3 | [] | no_license | <?php
$id = null;
$status = null;
$db_result = "";
if (isset($_POST["id"])) {
$id = $_POST["id"];
}
if (isset($_POST["status"])) {
$status = $_POST["status"];
}
function get_status_string($status)
{
if ($status == 4) {
return "Paid";
}
if ($status == 1) {
return "Shipped";
}
... | true |
0b44308a9cd31a25c6f35019fc0da53d308ed1db | PHP | miguelfreelancer56577/baseProyectCodeIgniter | /application/libraries/Cssjs.php | UTF-8 | 3,053 | 2.84375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Cssjs {
var $css;
var $js;
var $path_css;
var $path_js;
function Cssjs() {
$this->path_css = base_url() . 'recursos/styles/';
$this->path_js = base_url() . 'recursos/script/';
$this->clear(... | true |
3112ea6458d021c78b72b4b7853552e670841e3d | PHP | jamesvweston/easypost-php | /src/Models/Requests/CreateEasyPostCustomsItem.php | UTF-8 | 2,384 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace jamesvweston\EasyPost\Models\Requests;
use jamesvweston\EasyPost\Traits\SimpleSerialize;
class CreateEasyPostCustomsItem implements \JsonSerializable
{
use SimpleSerialize;
/**
* "T-Shirt"
* @var string
*/
protected $description;
/**
* 1
* @var int
*/... | true |
a8e16866ea28194743ef269af066472c41f8a777 | PHP | peter918/ppo | /Planik/index.php | UTF-8 | 1,735 | 2.578125 | 3 | [] | no_license | <?php
require "./vendor/autoload.php";
use Scheduler\Models\Lecture; // wykład
use Scheduler\Models\Schedule; // godziny / dni
use Scheduler\Models\Laboratory; //lab
use Scheduler\Models\Exercises; // ćw
use Scheduler\Models\WF; // wf
use Scheduler\Models\event_1; // rektorskie
$twig = new Twig_Environment(new Twig... | true |
7c950b6354d16049483d60f455cdd4cb3491b05b | PHP | hunnycode/Runa-CCA | /lib/Runa_CCA/Model/TwilioToken.php | UTF-8 | 1,538 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* TwilioToken Class
*
* @author rutoru
* @package Runa-CCA
*/
namespace Runa_CCA\Model;
class TwilioToken {
/**
* Object Variables
*/
private $capacity;
/**
* Constructor
*
*/
public function __construct(){
}
/**
* Verify
*
* @... | true |
6f05ace5710cbc100e8646dba29d5ce83e4f89a4 | PHP | Ridji/EDBlogBundle | /Util/EDEncryption.php | UTF-8 | 1,466 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace ED\BlogBundle\Util;
class EDEncryption {
private $salt;
public function safe_b64encode($string) {
$data = base64_encode($string);
$data = str_replace(array('+', '/', '='), array('-', '_', ''), $data);
return $data;
}
public function safe_b64decode($string) {
$data = str_rep... | true |
5eb35faee375b735239f526ea2966a4e011d6b88 | PHP | mdsharifremon/MVC-PHP | /app/libraries/Database.php | UTF-8 | 2,020 | 3.40625 | 3 | [] | no_license | <?php
/**
* Database file
*
*/
class Database
{
private $db_host = DB_HOST;
private $db_user = DB_USER;
private $db_pass = DB_PASS;
private $db_name = DB_NAME;
private $statement;
private $handler;
private $error;
// Create Connection
public function __construct(){... | true |
3ffcdbc958ece2bc90ea55179664f00b1e711286 | PHP | mambax7/advform | /advform/fields/colorselector.class.php | UTF-8 | 2,464 | 2.75 | 3 | [] | no_license | <?php
// $Id: colorselector.class.php 11036 2013-02-12 04:03:30Z bitc3r0 $
// --------------------------------------------------------------
// AdvancedForm plugin for Common Utilities
// Improves rmcommon forms by adding new fields and controls
// Author: Eduardo Cortés <i.bitcero@gmail.com>
// Email: i.bitcero@gmail.... | true |
0c766ccb2192765a13d5bc18e4cd5c8a68568947 | PHP | SkillGG/gamelist | /db/index.php | UTF-8 | 9,866 | 2.90625 | 3 | [] | no_license | <?php
$games = [];
// db connection
$conn = new mysqli("localhost", "gamelist", "", "games");
if ($conn->connect_error)
die("Couldn't connect to the database!");
if (isset($_POST['updateStatus'])) {
$uS = $_POST['updateStatus'];
preg_match("/(?<id>\d+),(?<status>\d)/", $uS, $m);
if ($m["id"] && $m["... | true |
b86c7a79a8359fd88e9aabdf8e091f359b5ed0f8 | PHP | mxm001/UNLaM | /Programacion Web II/Otros/extrasReproductor/playlist/importar.php | UTF-8 | 1,327 | 2.875 | 3 | [] | no_license | <!DOCTYPE HTML>
<html>
<head></head>
<body>
<a href="/">Volver</a><br/>
<form enctype="multipart/form-data" method="post">
<input type="file" name="subir"></input><br/>
<input type="submit" name="importar" value="Importar"></input><br/>
</form>
</body>
</html>
<?php
if(isset($_POST['importar'])){
$target_d... | true |
fc9898f16250fbb8a8f8e4dd689526fa19e380d2 | PHP | harshmavani/webtutorial-website | /output_file/bin/storing-values-in-different-variables5b5f.php | UTF-8 | 236 | 3.34375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<title>PHP Arrays</title>
</head>
<body>
<?php
$color1 = "Red";
$color2 = "Green";
$color3 = "Blue";
echo $color1;
echo "<br>";
echo $color2;
echo "<br>";
echo $color3;
?>
</body>
</html> | true |
71c7e16121e93b2fac21c2a8593ca6e0311e74d3 | PHP | miyuki-kuwabara/river_codeigniter | /application/views/values/single_value.php | UTF-8 | 3,061 | 2.765625 | 3 | [] | no_license | <?php
$value_key = "{$value_type}_value";
$flags_key = "{$value_type}_flags";
$unit_varname = "{$value_type}_unit";
// 最新の有効なデータ
$latest = null;
foreach ($measured_data as $row) {
if (is_measured_value_enable($row[$value_key], $row[$flags_key])) {
$latest = $row;
break;
}
}
?>
<h1><?php eh($me... | true |
c43a526a0c9fa3833afc2b9bffcb21ba8ef177c4 | PHP | Twixx1987/CS313-php | /web/assignments/project1/rdiverifylogin.php | UTF-8 | 756 | 2.640625 | 3 | [] | no_license | <?php
//start the session
session_start();
// check to see if the user is logged in
if (isset($_SESSION['username']) && isset($_SESSION['user_id'])) {
// set the user_id and username variables
$user_id = $_SESSION['user_id'];
$username = $_SESSION['username'];
} else {
... | true |
eed40a99800f33a30ac6c354a94422077ae5880a | PHP | gabcool123/lab_3_MVC | /modèle/Message.class.php | UTF-8 | 1,461 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php
/**
* L'id, le texte, la date, les sous-message et
* l'id du message parent seront get et set
*
* @author Gabriel Morin et Nicolas Bouchard
*/
class Forum {
private $id;
private $texte;
private $date;
private $sous_message;
private $id_message_parent;
public function __con... | true |
ca6237dbafaddf1bccf7e93d01ea0c5275cc8938 | PHP | Lora-Uroshlieva/php_oop | /tasks_devionity/WaterCar.php | UTF-8 | 568 | 3.28125 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include_once "Car.php";
class WaterCar extends Car
{
private $waterSpeed;
/**
* WaterCar constructor.
* @param $waterSpeed
* @param $brand
* @param $model
* @param $year
* @param User2 $driver
*/
public functio... | true |
a9913cd1c74af6f3ff2c35c2ac978b37a5288ef0 | PHP | kounta/omipay-php-sdk | /softbread/OmiPay/MakeScanOrderQueryData.php | UTF-8 | 965 | 2.65625 | 3 | [] | no_license | <?php
namespace Softbread\OmiPay;
/**
* Class MakeScanOrderQueryData
*
* @package Softbread\OmiPay
*/
class MakeScanOrderQueryData extends MakeOrderQueryData
{
/**
* Set QR code for payment
* 设置付款码
*
* @param string $value
**/
public function setQRCode($value)
{
$this-... | true |
c06f7a1bddaaca1f27862019b083f3586514fb3e | PHP | robbycostales/edit-distance-visualizer | /old.php | UTF-8 | 5,181 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html>
<!-- THIS FILE IS WHEN I WENT CRAZY AND DECIDED TO DO IT IN PHP INSTEAD -->
<html>
<head>
<title>RC - Edit Distance</title>
<meta name="description" content="Robby Costales">
<?php
// HEAD STUFF
$toHome = "../..";
include("$toHome/com/sub-head.php");
?>
</head>
... | true |