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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2825de6bd76442f3b63e7fb395f903c56a253844 | PHP | eiwuert/Myrepo | /vendorapi_www_root/ecash-services/olp_lib/tests/OLPBlackbox/RuleCollectionTest.php | UTF-8 | 6,771 | 2.609375 | 3 | [] | no_license | <?php
/**
* Test the rule collection class.
*
* @author Dan Ostrowski <dan.ostrowski@sellingsource.com>
* @package OLPBlackbox
*/
class OLPBlackbox_RuleCollectionTest extends PHPUnit_Framework_TestCase
{
/**
* A factory which produces common fixtures for the EventBus subpackage.
*
* @var OLPBlackbox_Test_E... | true |
2338464344d935efc3a8235d1811725d0727f84d | PHP | masterpowers/tienda-online | /app/models/sucursal.php | UTF-8 | 862 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
class sucursal extends Eloquent
{
protected $table = 'sucursales';
protected $guarded = array(); //Permite guardar en la base de datos
public $errors;
private function isValid($data)
{
$rules = array(
'nombre' => 'required'
);
$validator = Validator::... | true |
2c6f94dd190fa72a0e3dfb012efd44af2877ef24 | PHP | pawelchodzba/projects | /rehabilitacja/bilans/records.php | UTF-8 | 4,735 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
session_start();
if(!isset($_SESSION['zalogowany']))
{ header('Location:../index.php');
exit();}
require_once "../lacznosc_rezerwacja.php";
$polaczenie = new mysqli($host, $db_user, $db_password, $db_name);
$polaczenie->set_charset("utf8");
function create_form($rozpoz='',$data='', $check_date='', $sex='',... | true |
f9c298e447918622230ecad6637a2a8673546dc9 | PHP | digital-wossen/digitals-project3 | /app/Observers/ProjectObserver.php | UTF-8 | 1,019 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Observers;
use App\Project;
class ProjectObserver
{
/**
* Handle the project "created" event.
*
* @param \App\Project $project
* @return void
*/
public function creating(Project $project)
{
if(!$project){
return back()->withInput()->with(... | true |
e8485eeaa06e03032ee8966b18802929081cec90 | PHP | Zerolone/mybbs | /manage/article/snatch_content_one.php | UTF-8 | 5,278 | 2.609375 | 3 | [] | no_license | <?php
require('common.php');
set_time_limit(60);
/* 时间:2006年10月25日
// 作者:Zerolone
// 功能:采集内容并且入库
//*/
//--------------------------------------
//-------------函数部分-----------------
//--------------------------------------
/**
* 得到一个字符串中的某一部分
* @param $Url 需要抓取的地址
* @param $ArticleId 入库文章编号
* @param $ContentStart... | true |
67f2e02a1ebc238a37673d5afe8d354f96dc085e | PHP | marfinsol/marfinsol.com | /english/mail.php | UTF-8 | 2,032 | 3.125 | 3 | [] | no_license | <?php
if( $_REQUEST['human'] ) {
header('Location: error.html' );
}
// Data cleaning function from http://www.digital-web.com/articles/bulletproof_contact_form_with_php/
function clean_data($string) {
if (get_magic_quotes_gpc()) {
$string = stripslashes($string);
}
$headers = array(
"/to\:/i",... | true |
fe74c906f99685fc8a3b3ed344a308825fdb8d37 | PHP | moesoha/xml-database | /XmlDatabase/Expression/Operator.php | UTF-8 | 1,873 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
namespace SohaJin\Toys\XmlDatabase\Expression;
require_once 'misc.php';
class Operator implements Operand {
private Operand $left;
private Operand $right;
private string $operator;
private function __construct(mixed $left, string $operator, mixed $right) {
$this->left = forceOperand($left);
$this->rig... | true |
d39e100cb232baf5653fc0883bff0ec2a187c187 | PHP | TonyBogdanov/tb-framework | /.migrate/old/Util/__Color.php | UTF-8 | 2,178 | 3.109375 | 3 | [] | no_license | <?php
/**
* @package Tundra
* @author Tony Bogdanov <support@tonybogdanov.com>
* @license ThemeForest Standard License https://themeforest.net/licenses/standard
* @copyright Copyright (c) 2017. www.tonybogdanov.com. All Rights Reserved.
*/
/**
* Class TB_Util_Color
*/
class TB_Util_Color
... | true |
e65411fca40cd6d4d045e09025a842c85371927a | PHP | nikic/php-src | /ext/standard/tests/strings/sprintf_star.phpt | UTF-8 | 1,788 | 3.265625 | 3 | [
"GD",
"IJG",
"Zlib",
"LicenseRef-scancode-other-permissive",
"TCL",
"BSD-3-Clause",
"BSD-4-Clause-UC",
"OLDAP-2.8",
"ISC",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"PHP-3.01"
] | permissive | --TEST--
Star width and precision in sprintf()
--FILE--
<?php
$f = 1.23456789012345678;
$fx = 1.23456789012345678e100;
var_dump($f, $fx);
printf("%.*f\n", 10, $f);
printf("%.*G\n", 10, $f);
printf("%.*g\n", -1, $fx);
printf("%.*G\n", -1, $fx);
printf("%.*h\n", -1, $fx);
printf("%.*H\n", -1, $fx);
printf("%.*s\n", 3,... | true |
068059938147d84d197d3d169f28f0b9f6618e9f | PHP | vbuzanov/laravel-d | /app/Traits/Sluggable.php | UTF-8 | 247 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
use Illuminate\Support\Str;
trait Sluggable{
public function setSlugAttribute($value)
{
$this->attributes['slug'] = $value ? Str::slug($value, '-') : Str::slug($this->attributes['title'], '-');
}
} | true |
14fe890cd3689be09fe8718763f54f6109bb4aa2 | PHP | haya-sann/IM | /dev/phpTest/mySQL/connectDB.php | UTF-8 | 703 | 2.859375 | 3 | [] | no_license | <?php
try {
$dbh = new PDO('mysql:host=mysql700.db.sakura.ne.jp;dbname=mochimugi_monitor;charset=utf8','mochimugi','matsutanaka3',
array(PDO::ATTR_EMULATE_PREPARES => false));
print('接続に成功しました。<br>');
// SELECT文を変数に格納
$sql = "SELECT * FROM test1";
// SQLステートメントを実行し、結果を変数に格納
$stmt = $dbh->query($sql);
// foreach文で配列... | true |
c37f6ec173258d844ac1e6aa528eb6d270cb01f5 | PHP | tevez15/wp_coredesignz_basic_theme | /functions.php | UTF-8 | 3,172 | 2.59375 | 3 | [] | no_license | <?php
/* WIDGETS */
function register_widget_areas() {
// Widget code goes here...
register_sidebar([
'name' => 'Sidebar',
'id' => 'sidebar',
'before_widget' => '<div class="widget">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>'... | true |
9763163fd4ad8ed7e10ea61dbb1c3cecef0a3612 | PHP | flysion/swoolaravel | /src/Swoole/WebSocket/Server.php | UTF-8 | 540 | 2.578125 | 3 | [] | no_license | <?php
namespace Flysion\Swoolaravel\Swoole\WebSocket;
/**
* @link https://wiki.swoole.com/#/websocket_server
* @mixin \Swoole\WebSocket\Server
*/
class Server extends \Swoole\WebSocket\Server
{
use \Flysion\Swoolaravel\Swoole\ServerTrait;
/**
* @param \Illuminate\Events\Dispatcher|null $events
*... | true |
8992aea2aa7cdb3c908845366053ece3f84ab740 | PHP | bastienjacoud/projet_site | /Includes/statistiques.php | UTF-8 | 4,083 | 2.96875 | 3 | [] | no_license | <aside id="statistiques">
<h1 id="Titre_stats1">STATISTIQUES</h1>
<?php
if(isset($_POST['Trier_par'])) // si le bouton de tri des statistiques a été soumis
{
$valeur=mysqli_real_escape_string($connexion,$_POST['choix_tri']);
// récupération de la valeur du bouton
if(isset($_POST['choix_tri'])==0) // valeur pa... | true |
fb0fe9d651c5e1f04061fabd6e42a01bed8feb0c | PHP | asotog/cradlecore-ioc | /src/ioc/checkers/PropertyChecker.php | UTF-8 | 3,534 | 3.171875 | 3 | [] | no_license | <?php
/*
* This file is part of the cradlecore For PHP package.
* (c) Alejandro Soto Gonzalez. <asotog88@yahoo.es>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* PropertyChecker validate if the property is vali... | true |
9a79d46de0a8a83c172000cd6cd719b9ac67eede | PHP | omnithoper/projects | /enrollment/controllers/SettingsController.php | UTF-8 | 416 | 2.5625 | 3 | [] | no_license | <?php
class SettingsController extends BaseController {
public function indexAction() {
date_default_timezone_set("Asia/Manila");
$date = date("Y-m-d");
$settingObject = new Settings();
$result = $settingObject->getViewTotalPayment();
$semester = $settingObject->getViewAllSemester();
$this->assign('res... | true |
59208a4742495681466d2544781bd71735b9e391 | PHP | alejandrocayssials/patterns | /app/chapter2/Statistics.php | UTF-8 | 484 | 3.171875 | 3 | [] | no_license | <?php
namespace App\chapter2;
class Statistics implements Observer, DisplayElement
{
public $weatherData;
public function __construct(Subject $subject)
{
$this->weatherData = $subject;
$subject->registerObserver($this);
}
public function update($temp, $humidity, $pressure)
... | true |
6dc86fa4bd2cf43421cb001109ef195b28daf603 | PHP | Sara-Ghanem/Online-courses | /uploade_course_to_courses_tabel.php | UTF-8 | 3,716 | 2.609375 | 3 | [] | no_license | <?php
session_start();
//make sure the admin is logged in.
if(isset($_SESSION['admin_id'])){
//include the shared files.
require_once('shared/head.php');
require_once('shared/header.php');
require_once('shared/connect_to_database.php');
require_once('shared/appvar.php');
if(isset($_POST['submit'])){
$co... | true |
a067282ad7dc57a78951c3363491efca62720354 | PHP | kudejwiktor/code-challenge | /boats-service/src/Model/Query/AgeLessThan.php | UTF-8 | 422 | 3.03125 | 3 | [] | no_license | <?php
namespace Zizoo\BoatsService\Model\Query;
use Zizoo\BoatsService\Model\Boat;
class AgeLessThan extends Query
{
/**
* @var int
*/
private $age;
public function __construct(int $age)
{
$this->age = $age;
}
/**
* @param Boat $boat
* @return bool
*/
... | true |
a85b9b65dcb68233be4665228e917a97a5915546 | PHP | fullstackdevgm/Todo-backend | /www/todo_root/TodoOnline/classes/TDOContext.php | UTF-8 | 20,430 | 2.75 | 3 | [] | no_license | <?php
// TDOContext
// Used to handle all user data
// include files
include_once('AWS/sdk.class.php');
include_once('TodoOnline/base_sdk.php');
define ('CONTEXT_NAME_LENGTH', 72);
class TDOContext
{
private $_name;
private $_contextid;
private $_userid;
private $_deleted;
private $_lastmodified; ... | true |
ad96812dbc3aeca96bcb54880c08f3fbb9b1f5d0 | PHP | anklimsk/internal-ldap-based-phonebook | /app/Plugin/CakeExtendTest/Vendor/PHPHtmlParser/paquettg/string-encode/src/stringEncode/Encode.php | UTF-8 | 2,087 | 3.46875 | 3 | [
"MIT"
] | permissive | <?php
namespace stringEncode;
class Encode {
/**
* The encoding that the string is currently in.
*
* @var string
*/
protected $from;
/**
* The encoding that we would like the string to be in.
*
* @var string
*/
protected $to;
/**
* Sets the default charsets for thie package.
*/
public fun... | true |
3e5b59f950ca14a7b94005357e0068b20eed0afe | PHP | Yimpor/app | /app/App.php | UTF-8 | 1,261 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\Foundation\Config;
use Tree6bee\Cf\Foundation\Application;
use Tree6bee\Cf\Http\Request;
class App extends Application
{
public function __construct()
{
//构造config对象
/* @var $config \Tree6bee\Cf\Contracts\Config */
$config = new Config(__DIR__ . '/config')... | true |
609648770ff672e5fef35e717a9236b985265e89 | PHP | MadisMaisalu/php_alused | /Ülesanne 8/yl8.php | UTF-8 | 891 | 3.15625 | 3 | [] | no_license | <?php
echo date('d.m.Y G:i' , time())."<br>";
$synniaasta = 1999;
echo 'Kasutaja vanus on '.(date('Y') - $synniaasta)."<br>";
$praegu = new DateTime('2021-02-06');
$koolilopp = new DateTime('2021-06-06');
$paevad = $koolilopp->diff($praegu)->format('%a');
echo "Kool lõppeb ".$paevad." päeva pärast.".'<br>';
echo... | true |
dfae2485dc0b89bc86da65d4e46036f0a09c9d40 | PHP | PriitTiganik/html_naidised | /y7_php_algus/loeng.php | UTF-8 | 1,152 | 3.015625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Priit
* Date: 01/04/2016
* Time: 19:19
*/
echo "Tere tali!";
echo "<br>";
$muutuja1="11";
$muutuja2="22";
echo $muutuja1 . $muutuja2;
echo "<br>";
echo $muutuja1 + $muutuja2;
echo "<br>";
$tekst= "mul on
<b>$muutuja1</b>
ja
${muutuja2}-ed";//muutuja on loogelistes, et kohe... | true |
17fef4f38d123b8d7c158c62e75050af9a3ca2e0 | PHP | ethercreative/titch | /models/Titch_SettingsModel.php | UTF-8 | 585 | 2.546875 | 3 | [] | no_license | <?php
namespace Craft;
class Titch_SettingsModel extends BaseModel {
protected function defineAttributes()
{
return [
'apiKey' => [ AttributeType::String, 'required' => true ],
'lastRun' => [ AttributeType::String ]
];
}
public function rules()
{
$rules = parent::rules();
$rules[] = ['apiKey', 'v... | true |
857c1e9ff8f724e7c5f94f008a699c18f6566185 | PHP | anaskhafegui/framework | /src/Routing/RouteHandler.php | UTF-8 | 1,610 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Core\Routing;
use Core\Routing\Exceptions\RoutingException;
class RouteHandler
{
private $dispatcher;
public function __construct(RouteDispatcher $dispatcher)
{
$this->dispatcher = $dispatcher;
}
public function handle($routesList)
{
$uri = app('request')->ur... | true |
7927e9c1227f1a5c1b3cf992053e2fe19c80b7f8 | PHP | wang-liang/test | /class-jiu ye/day32/dom_delete2.php | UTF-8 | 695 | 3.09375 | 3 | [] | no_license | <?php
//[需求1]:删除所有书籍的year元素
$dom = new DOMDocument('1.0','utf-8');
//载入
$dom->load('bookstore1.xml');
$years = $dom->getElementsByTagName('year');//找到所有的year节点
/*
//循环删除之
foreach ($years as $year){
$year->parentNode->removeChild($year);
}
*/
//第一步,保存所有找到的year节点
$temp = array();
foreach ($years as $year){
$temp[] = $y... | true |
b492e05e2ebdf5271aadb3fe3abd8c5e93c5eade | PHP | MihaiBlebea/laravel-blog-project | /app/Http/Middleware/TrackMiddleware.php | UTF-8 | 326 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use App\Models\Track;
class TrackMiddleware
{
public function handle($request, Closure $next)
{
$path = $request->path();
$track = Track::firstOrCreate(['link' => $path]);
$track->increment('count');
return $next($request);
... | true |
3a704b6cc5869bbc05fb6b7bd340fc09934c734c | PHP | tiffany-philippi/cont-pw | /session-exer.php | UTF-8 | 329 | 2.59375 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION)) {
session_start();
}
$_SESSION['nameUser'] = 'tiffany_philippi';
$_SESSION['passUser'] = '1q2w3e4r';
$_SESSION['email'] = 'tiffany@email.com';
echo "<br>";
foreach($_SESSION as $key => $valor){
echo "{$key} - {$valor}<br>";
}
echo "<a href='session-get.php'>Retomar s... | true |
746c18342c4e87a3f250a5650ec4068cd84ecccf | PHP | bva100/authmyapp | /application/classes/Controller/Pay.php | UTF-8 | 15,942 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php defined('SYSPATH') or die('No direct script access.');
/**
* Make and manage payments
*
* @author BRIAN ANDERSON
*/
class Controller_Pay extends Controller_Home {
public function action_planStripeProcess()
{
$stripeToken = (string) post('stripeToken', '');
$plan_id = (int) post('plan_id', 0);... | true |
a280ebfcab12de525690e0d0fc4bf01cfdcd156f | PHP | LautaroAp/zf3-project | /module/Usuario/src/Service/UsuarioManager.php | UTF-8 | 8,125 | 2.828125 | 3 | [] | no_license | <?php
namespace Usuario\Service;
use DBAL\Entity\Usuario;
use DBAL\Entity\Cliente;
use Zend\Paginator\Paginator;
use DoctrineModule\Paginator\Adapter\Selectable as SelectableAdapter;
/**
* Esta clase se encarga de obtener y modificar los datos y usuarios adicionales.
*
*/
class UsuarioManager {
/**
* ... | true |
4ace8d01bde45616a4d472de9b403ba51be182a1 | PHP | fernandoenad/lrms | /admin/mod/my/controller.php | UTF-8 | 1,562 | 2.5625 | 3 | [] | no_license | <?php
class Controller{
function countElement($data){
global $conn;
$result = null;
$table = $data['0']['1'];
$sql = "SELECT * FROM $table";
$rs = $conn->query($sql);
if(!$rs){
$result = array(-1, $conn->error);
} else if($rs->num_rows == 0){
$result = array(0, "0 ... | true |
803ab4882b69eccbf4e7a6d496cdeeb99f880f11 | PHP | FramtidsGustaf/contactsphp | /DB.php | UTF-8 | 1,641 | 3.28125 | 3 | [] | no_license | <?php
class DB
{
private $servername = "localhost";
private $username = "root";
private $password = "root";
private $db = "contactdb";
private $conn;
public function __construct()
{
$this->conn = new PDO("mysql:host=" . $this->servername . ";dbname=" . $this->db, $this->username, $this->passwor... | true |
5581baf94da67c9a3391b4b4ea26af9c08c360ab | PHP | vkabachenko/yii2-eer | /common/actions/YearAction.php | UTF-8 | 828 | 2.625 | 3 | [] | no_license | <?php
namespace common\actions;
use common\helpers\YearHelper;
use common\models\YearForm;
use Yii;
use yii\base\Action;
class YearAction extends Action
{
public function run($to=null) {
if ($to) {
$this->newYear($to);
}
else {
$model = new YearForm();
... | true |
f4d2fef9ad0cbdaf69afe2f17cb15fc3fff28df1 | PHP | carlosalessandre/curso-php7-hcode | /operadores/exemplo-04.php | UTF-8 | 433 | 3.5625 | 4 | [] | no_license | <?php
$a = 55.0;
$b = 55;
var_dump($a > $b); // retorna
echo "<br>";
var_dump($a < $b); // retorna
// echo "<br>";
// var_dump($a = $b); // = atribui valor
echo "<br>";
var_dump($a == $b); // = compara valor
echo "<br>";
var_dump($a === $b); // = compara os valores e o tipos de dados
echo "<br>";
var_du... | true |
200eaecf1ee08ec6f1624f26bb8c4931eb5e8987 | PHP | gmtfonseca/angularjs-cmmi-mpsbr | /api/nivel_capacidade/delete.php | UTF-8 | 690 | 2.609375 | 3 | [] | no_license | <?php
include_once '../config/database.php';
include_once '../objects/nivel_capacidade.php';
$database = new Database();
$db = $database->getConnection();
$nivelCapacidade= new NivelCapacidade($db);
$data = json_decode(file_get_contents("php://input"));
$nivelCapacidade->id = $data->id;
... | true |
12b4d54f551ca9e6fc8bad140e0afdfa5e6c5f32 | PHP | Dimiona/emarsys-hw | /index.php | UTF-8 | 399 | 2.671875 | 3 | [] | no_license | <?php
use App\Classes\Factory\DueDateCalculatorFactory;
// Basic autoload.
spl_autoload_register();
// Autoload with composer.
// require_once 'vendor/autoload.php';
// Example of use.
$submitDate = new \DateTime('2020-01-21 14:12:00');
$turnaroundTime = 16;
$dueDateCalculator = DueDateCalculatorFactory::create();... | true |
dc1af05c2dcf18963c9ec98beb18eb32c9b79b06 | PHP | webteractive/expressionengine-env | /system/ee/EllisLab/ExpressionEngine/Service/Event/Mixin.php | UTF-8 | 2,682 | 2.78125 | 3 | [
"LGPL-2.1-only",
"OFL-1.1",
"LicenseRef-scancode-unknown-license-reference",
"Swift-exception",
"Apache-2.0",
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | permissive | <?php
/**
* This source file is part of the open source project
* ExpressionEngine (https://expressionengine.com)
*
* @link https://expressionengine.com/
* @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com)
* @license https://expressionengine.com/license Licensed under Apache License... | true |
192cb1a04d9e14ccffe88629163514705170119b | PHP | IsaacIV/CS3337 | /sellingInsert.php | UTF-8 | 1,023 | 2.734375 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Insert Book Into Database</title>
</head>
<body>
<?php
include("global.php");
?>
<?php
$connect = mysqli_connect("localhost", "root", $dbPass);
mysqli_select_db($connect, $db);
?>
<?php
date_default_timezone_set("Americ... | true |
c137d7c4d67dc0fdbc8f92fe3a465eec1874419e | PHP | sudosuroot/amplyfy | /ws/userProfile/userProfile.php | UTF-8 | 4,070 | 2.796875 | 3 | [] | no_license | <?php
require_once '/usr/include/php/callistoV4/Response.php';
require_once "/usr/include/php/callistoV4/UserProfile.php";
/**
* Get UserProfile.
*
* @uri /UserProfile
*/
class UserProfileResource extends Resource {
private $dbHandle;
/**
* Handle a POST request for this resource
* @param Request request
*... | true |
755c97118f516ccb6d58dbf5162fc7f604d16f63 | PHP | AllanBastos/Curso_Web | /PHP/seção 11/comentarios.php | UTF-8 | 431 | 3.46875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Curso PHP variaveis</title>
<meta charset="utf-8">
</head>
<body>
<?php
// Comentario de uma linha
echo "Comando echo <br>";
# comentario de uma linha
echo print 'Comando print <hr>';
/*
Comentario de multiplas linhas.
esse tipo de... | true |
16186fb25a1a575e82e97a2b471a4d02aa8b87df | PHP | codekandis/classlist-api | /src/Entities/ChildEntity.php | UTF-8 | 587 | 2.65625 | 3 | [] | no_license | <?php declare( strict_types = 1 );
namespace CodeKandis\ClassListApi\Entities;
use CodeKandis\Tiphy\Entities\AbstractEntity;
class ChildEntity extends AbstractEntity
{
/** @var string */
public string $canonicalUri = '';
/** @var string */
public string $id = '';
/** @var string */
public string $gender = '';... | true |
deaefae4d4443449038c2c8000839f35cbe74c4c | PHP | aoifeb164/CA1-medicalCentre | /database/seeders/InsuranceCompanySeeder.php | UTF-8 | 1,389 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
# @Date: 2020-11-22T19:27:07+00:00
# @Last modified time: 2021-01-10T12:50:42+00:00
namespace Database\Seeders;
use Illuminate\Database\Seeder;
//calling the insurance company model
use App\Models\InsuranceCompany;
class InsuranceCompanySeeder extends Seeder
{
/**
* Run the database seeds.
*... | true |
38849fca382de625d39040a876e87b1855c27efe | PHP | Carlo-F/utilities | /php/getTimeAgo(IT).php | UTF-8 | 1,237 | 3.328125 | 3 | [] | no_license | <?php
/**
* Restituisce il tempo trascorso dalla pubblicazione di un post
*
* @param int $ptime la data di pubblicazione in formato Unix timestamp
*
* @return string il tempo trascorso dalla data indicata es. 'pubblicato meno di 1 secondo fa'
*/
function get_timeago( $ptime )
{
$estimate_time = time() - $pt... | true |
3ccdb2c964f9eb34821a5fee19e1cda0e7d0e748 | PHP | chadfebruary/IRP-final-project | /Shopping Cart Project/insertValues.php | UTF-8 | 2,293 | 2.953125 | 3 | [] | no_license |
<?php
include_once("Database.php");
$Database = new Database(); // db object
session_start();
$username = isset($_GET['username']) ? $_GET['username'] : "";
$productID = isset($_GET['productID']) ? $_GET['productID'] : "";
$name = isset($_GET['name']) ? $_GET['name'] : "";
$weight = isset($_GET['weight']) ? $_G... | true |
e650c176b712009d32641ae7ba0f731365afdd28 | PHP | gabrielwilians/web-login-com-sessao | /htdocs/htdocs/novo-usuario.php | UTF-8 | 720 | 2.65625 | 3 | [] | no_license | <?php
include('config.php');
if(isset($_POST['acao'])){
$usuario = $_POST['usuario'];
$senha = $_POST['senha'];
$criptografada = password_hash($senha, PASSWORD_DEFAULT);
if($usuario == '' || $senha == ''){
echo 'Preencha o campo.';
}else{
$sql = $... | true |
b648974a596cec4a7f1e6cc339ba02018593fc1e | PHP | ccmorenosa/artemisa | /serviciosacademicos/Grados/entidades/EstudianteDocumento.php | UTF-8 | 6,666 | 2.96875 | 3 | [] | no_license | <?php
/**
* @author Carlos Alberto Suarez Garrido <suarezcarlos@unbosque.edu.co>
* @copyright Dirección de Tecnología - Universidad el Bosque
* @package entidades
*/
class EstudianteDocumento{
/**
* @type int
* @access private
*/
private $idEstudianteDocumento;
/**
* @type int
... | true |
5ad698ace621291229dd055f5e7005db5c200f7c | PHP | Jorge-Urquiza/horus-erp | /app/DataTables/UnitsTable.php | UTF-8 | 347 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\DataTables;
use App\Models\MeasurementsUnits;
use Illuminate\Database\Query\Builder;
class UnitsTable extends DataTable
{
/**
* The query builder object
*
* @return Builder
*/
public function query()
{
return MeasurementsUnits::query()->select(['id', 'name'... | true |
4002f2aa3f8b29dbd81f04acea49f40cadd19576 | PHP | Spiderixius/IIT_1st_Assignment | /App/Model/UploadImageModel.php | UTF-8 | 1,404 | 2.75 | 3 | [] | no_license | <?php
namespace App\Model;
use PDO;
class UploadImageModel {
public function uploadImage(){
if (isset($_FILES['filename'], $_POST['title'])) {
if ($_FILES['filename'] != null && $_POST['title'] != null) {
$image= addslashes($_FILES['filename']['tmp_name']);
$name= addslashes($_FILES['file... | true |
d070cdf1d48729ed228b196c33ecbb924cf17278 | PHP | hahadu/im-blog-think | /src/Models/Tag.php | UTF-8 | 2,622 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* +----------------------------------------------------------------------
* | Created by hahadu (a low phper and coolephp)
* +----------------------------------------------------------------------
* | Copyright (c) 2020. [hahadu] All rights reserved.
* +---------------------------------------... | true |
cc6232a6ea72801c3208d70adb365415326b78f7 | PHP | RichChanCN/3DMarket | /delete-order.php | UTF-8 | 529 | 2.921875 | 3 | [] | no_license | <?php
require_once "my-tool.php";
session_start();
$id = $_GET['id'];
// 创建连接
$conn = new mysqli($servername, $username, $password, $dbname);
// 检测连接
if ($conn->connect_error) {
die("连接数据库失败: " . $conn->connect_error);
}
$delete_sql = "DELETE FROM shopping_order WHERE (id='$id')";
//执行上面的sql语句并将结果集赋给result。
$... | true |
1313e7c4d3ffd49602d1579eca1325094cd868b5 | PHP | TroiaStudio/ssh-key-validator | /src/Validators/AbstractValidator.php | UTF-8 | 1,399 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace TroiaStudio\SshKeyValidator\Validators;
use TroiaStudio\SshKeyValidator\Enums\SshKey;
use TroiaStudio\SshKeyValidator\Key;
use TroiaStudio\SshKeyValidator\KeyFactory;
use TroiaStudio\SshKeyValidator\ValidationException;
abstract class AbstractValidator implements Validator... | true |
7bfe5a34da1eef923baf00dc8944fbbb535be205 | PHP | openclassify/connect-module | /src/Entity/Component/Field/Guesser/LabelsGuesser.php | UTF-8 | 2,433 | 2.609375 | 3 | [] | no_license | <?php namespace Anomaly\Streams\Platform\Ui\Entity\Component\Field\Guesser;
use Anomaly\Streams\Platform\Assignment\Contract\AssignmentInterface;
use Anomaly\Streams\Platform\Ui\Entity\EntityBuilder;
/**
* Class LabelsGuesser
*
* @package Anomaly\Streams\Platform\Ui\Entity\Component\Field\Guesser
*/
class ... | true |
17dec9dd649453853545b1df16ee953cca75fc71 | PHP | xandynnn/clanftb | /class/Player.class.php | UTF-8 | 630 | 2.84375 | 3 | [] | no_license | <?php
class Player{
public $username;
public $plataforma;
public $tag;
private $name;
private $advanceDogTagImage;
private $basicDogTagImage;
private $rank;
private $rankName;
private $rankImage;
private $kills;
private $win;
private $headshot;
private $timePlayed;
public function setPlayer($username... | true |
bfe998f2079f6fe870506641780a049e87fcd189 | PHP | aopao/2005 | /database/seeds/MajorDetailTableSeeder.php | UTF-8 | 452 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use App\Entities\MajorDetail;
use Illuminate\Database\Seeder;
use App\Services\JsonToArrayService;
class MajorDetailTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$model = new MajorDetail();
$data = JsonToArr... | true |
6ff7cc80007698632fb8384f5e2ec4af271a6902 | PHP | the-php-swarm/bluphant | /examples/laravel/app/app/Note.php | UTF-8 | 830 | 3.328125 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
namespace App;
class Note
{
/**
* @var string
*/
protected $key;
/**
* @var string
*/
protected $title;
/**
* @var string
*/
protected $content;
/**
* @param string $key
* @param string $title
* @param string $content
*
* @return Note
*/
public function __construct(string $k... | true |
280e09803bb6133752b4a89858a534e5f7e2f327 | PHP | Gilles-boyer/gao-laravel-vuejs | /app/Http/Controllers/UserController.php | UTF-8 | 3,020 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
class UserController extends Controller
{
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $... | true |
682a5af5d067e0998cd2ff74ce664f4ca2a10ec5 | PHP | HanweiHuang/EmailSystem_ClassicBet_PHP | /utilities/Mysql.php | UTF-8 | 605 | 2.6875 | 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 mysql{
private static $conn;
private function __construct() {
$this->conn = mysqli_connect('localho... | true |
44db54adc260103bcc26fb82d48a226e69dc1e2c | PHP | kilo2387/yiidemo | /vendor/milan/qrcode/GenerateQRCode.php | UTF-8 | 2,415 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by kilo with IntelliJ IDEA on 2017/8/27 3:07.
*
*/
namespace milan\qrcode;
include __DIR__ . '/phpqrcode.php';
/**
* Class GenerateQRCode
* @package milan\qrcode
* @property $ret
* @property $data
* @property $ret
* @property $path
* @property $errcode
* @property $message
*/
class Ge... | true |
9500ab80467df74f9297bc72b6e8365ee1a5672a | PHP | signifly/travy-schema | /src/Fields/Input/ImagePicker.php | UTF-8 | 2,179 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Signifly\Travy\Schema\Fields\Input;
use Signifly\Travy\Schema\Concerns\HasEndpoint;
use Signifly\Travy\Schema\Concerns\HasOptions;
use Signifly\Travy\Schema\Fields\Field;
use Signifly\Travy\Schema\Fields\Image;
class ImagePicker extends Image
{
use HasEndpoint;
use HasOptions;
/**
*... | true |
770b406bdb5c8ece63d97f57ce409dfe22c31c5f | PHP | PashaRyabchik/dynamicsite | /functions/reg.php | UTF-8 | 1,323 | 2.515625 | 3 | [] | no_license | <?php
require_once "connect.php";
//make salt
function generateSalt()
{
$salt = '';
$saltLength = 8; //длина соли
for($i=0; $i<$saltLength; $i++) {
$salt .= chr(mt_rand(33,126)); //символ из ASCII-table
}
return $salt;
}
//Регистрация
if (!empty($_POST['... | true |
f97282d426809276019b849177933a4a395e2885 | PHP | vanderlpp/SistemaJuridicoCRM | /painel_adv/cadastrando_pasta.php | UTF-8 | 1,480 | 2.640625 | 3 | [] | no_license | <?php
require_once("../config.php");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Cadastrando nova pasta...</title>
</head>
<body>
<?php
$adv_pasta_id=$_POST['adv_id'];
$parte_1=$_POST['parte_1'];
$parte_2=$_POST['parte_2'];
$data_audiencia=$_POST['data_audiencia'];
$h... | true |
e019b15311cc7e440ed1def1aed3bec61d31c573 | PHP | a1086yn5974/coachtech-php-test | /index.php | UTF-8 | 460 | 3.546875 | 4 | [] | no_license | <table border="1" style ="border-collapse: collapse">
<?php
//九九の表の縦方向に出力するためのループ
for( $i = 1 ; $i <= 9 ; $i++ ){
//テーブルの縦方向のタグを出力
echo "<tr>";
//九九の表の横方向に出力するためのループ
for( $j = 1 ; $j <= 9 ; $j++ ){
echo "<td>";
echo $i * $j;
echo "</td>";
}
//テーブルの縦方向の閉じタグを出力
echo "</tr>";
}
?>
</ta... | true |
40adfa92088711268f809074c7a0994984de013e | PHP | hasantayyar/geo_image | /models/User.php | UTF-8 | 558 | 2.765625 | 3 | [] | no_license | <?php
public class User{
public $id;
private $f_name;
private $l_name;
private $u_name;
private $password;
private $email;
private $reg_date;
function __construct($id,$f_name,$l_name,$u_name,$password,$email,$reg_date) {
$this->id = $id;
$this->f_name = $f_name;
$this->l_name = $l_name;
$this->u_name = $u_name;
... | true |
e1ee4c3be93774daf1d799accfcd1d6f1df59188 | PHP | OskarStark/continuouspipe | /api/src/ContinuousPipe/Builder/Archive/FileSystemArchive.php | UTF-8 | 5,500 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace ContinuousPipe\Builder\Archive;
use ContinuousPipe\Builder\Archive;
use Docker\Context\Context;
use Symfony\Component\Filesystem\Filesystem;
class FileSystemArchive extends Context implements Archive
{
private $fileSystemStream;
private $fileSystemProcess;
public static function fromStre... | true |
ea4504f0c8e5c62b72ec97e24cc9c1360633d03d | PHP | atakajlo/notifications | /src/Recipient/Recipient.php | UTF-8 | 308 | 2.765625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Atakajlo\Notifications\Recipient;
class Recipient implements RecipientInterface
{
private string $to;
public function __construct(string $to)
{
$this->to = $to;
}
public function getTo(): string
{
return $this->to;
}
} | true |
a46c786769f66d86c4b026a57e298b935ce5ba9c | PHP | satoshimatos/to-do-list | /src/classes/Entry.php | UTF-8 | 1,126 | 3.5625 | 4 | [] | no_license | <?php
class Entry
{
/**
* @var string
*/
private $title;
/**
* @var string
*/
private $description;
/**
* @var string
*/
private $entry_time;
/**
* @var string
*/
private $observations;
public function __construct($title, $desc, $obs = null)
{
$title = str_rep... | true |
376208f69f0b54c154214dc90b140920d9b8ce2b | PHP | AbdeSN/indecis | /controller/Connexion.class.php | UTF-8 | 2,171 | 2.640625 | 3 | [] | no_license |
<?php
require_once "model/ConnexionDao.class.php";
class Connexion extends Controller
{
public function __construct()
{
parent::__construct();
}
public function connexion()
{
$servername = 'localhost';
$username = 'root';
$dbname = 'indecis';
$password = ... | true |
c52f46f35eec919fa205ffb1c9a69b9d0010364e | PHP | Duba-Ruales/L4G03-CRUD-formulario | /guardar_persona.php | UTF-8 | 1,125 | 2.75 | 3 | [] | no_license |
<?php
//Datos de conexion server
include ('includes/db.php');
/*
//prueba conexion
if($con->connect_error){ //$con->connect_error){
echo "Base de datos no disponible";
}else{
echo "conectados a la base de datos";
}
*/
$id = $_POST["id"];
$nombre = $_POST["nombre"]; /... | true |
d69b0e3855fb456aa5629ac6ee98c61b39d88119 | PHP | carry0987/PHP-Login-With-Github | /github_config.php | UTF-8 | 640 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
// Start session
if (!session_id()) {
session_start();
}
// Include Github client library
require_once 'class/class_github_oath.php';
// Configuration and setup GitHub API
$clientID = 'Your_Github_OAuth_ClientID';
$clientSecret = 'Your_Github_OAuth_ClientSecret';
$redirectURL = 'Your_Github_Auth_CallbackURL'... | true |
6779e5babb2a6f555cf931fa685e68d8f69d5f66 | PHP | markledger/silex-phpunit | /app/app.php | UTF-8 | 470 | 2.609375 | 3 | [] | no_license | <?php
require_once __DIR__.'/bootstrap.php';
use Symfony\Component\HttpFoundation\Response;
$app = new Silex\Application();
// Detect environment (default: prod) by checking for the existence of $app_env
if (isset($app_env) && in_array($app_env, array('prod','dev','test')))
$app['env'] = $app_env;
else
$app... | true |
de8231caa571e9f838033a3d125a888d6c20d21f | PHP | Dracex/its | /sistema/db.php | UTF-8 | 387 | 3 | 3 | [] | no_license | <?php
//Creamos la funcion conectar que lo que hace es que cada vez que la llamamos nos conecta a la BD
function conectar () {
$username = "root";
$password = "root";
try {
$conn = new PDO ('mysql:host=localhost;dbname=its', $username, $password);
} catch (Exception $errorConexion) {
e... | true |
dc7b8999e86b51a1634b58b299501c2df88c34dd | PHP | FelipeJB/SistemaPYMECristales | /app/Http/Controllers/Admin/SistemaController.php | UTF-8 | 7,722 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use Auth;
use App\Sistema;
use App\Milimetraje;
use App\PrecioVidrio;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Redirect;
class SistemaController extends Controller
{
public fun... | true |
88fc19a57dc77b4d397ec556ea470a621253f557 | PHP | FaruqRahmadani/API-NewsandTopic | /app/Http/Controllers/TopicController.php | UTF-8 | 896 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Topic;
class TopicController extends Controller
{
public function index(){
return Topic::all();
}
public function show($id){
$topic = Topic::with('News')->find($id);
if (!$topic) return "Not Found";
return $topic;
}
... | true |
0a2310ffb721877b1c25b7bab72fa5e53b3d8a0c | PHP | ivansklempej/web-template | /app/modules/utility/databases/dbmy.php | UTF-8 | 1,709 | 3.0625 | 3 | [] | no_license | <?php
/**
* @author ivansklempej
*/
class dbmy extends mysqli{
private $config;
public function __construct ( $db = 'defaultdb' ) {
$this->config = parse_ini_file('../config/config.ini.php',true);
$this->connecttodb( $db );
}
public function connecttodb ( $db ) {
parent... | true |
c0f2f874db9c4e2b7b0e77011330a5be8447f4de | PHP | samuraix888/Tugas_Workshop_SI_WEB | /Tugas_5/array/array.php | UTF-8 | 966 | 3.328125 | 3 | [] | no_license | <?php declare(strict_types=1);// strict requirement, Untuk menentukan strictkita perlu mengatur declare(strict_types=1);. Ini harus berada di baris pertama dari file PHP. Mendeklarasikan menspesifikasikan ketat yang berfungsi panggilan yang dibuat dalam file yang harus secara ketat mematuhi tipe data tertentu ?>
!DOCTY... | true |
471a004b93bd57a9501621ae41272a3bdbd8d0fc | PHP | amar14291/Email_queue | /Emailschedule.php | UTF-8 | 1,351 | 2.515625 | 3 | [] | no_license | <?php
/// mail setting
define('HOST', 'smtp.sendgrid.net'); // sets GMAIL as the SMTP server if gmail then smtp.gmail.com
define('PORT', '587'); // PORT OF SMTP SERVER
define('USERNAMEEMAIL', 'xyz'); // USERNAME OF Email
define('PASSWORDEMAIL', '123456'); // PASSWORD OF EMAIL
define('MAIL', 'support@xyz.com'); // S... | true |
da50781e2a84c323d26ba9fa8388736e5814a1dc | PHP | dcsg/gush | /src/Gush/Command/PullRequestCommand.php | UTF-8 | 6,095 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Gush.
*
* (c) Luis Cordova <cordoval@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Gush\Command;
use Gush\Model\BufferedOutput;
use Gush\Model\Question;
use Gush\Model\Questionary;
use... | true |
75c9f3a592a210aa56700636c415c3dcc66ddb69 | PHP | MarcoDiFrancesco/LittleProjects | /Html/2018-03-16 Scrivi_persone_su_file_e_leggile/leggi.php | UTF-8 | 182 | 2.796875 | 3 | [] | no_license | <?php
$file = fopen('persone.txt','r'); // metti in read persone
while($line = fgets($file)){
echo($line);
echo '<br>';
}
fclose($file);
exit;
?> | true |
399831d22a9d7f518fb477fe40094bf476517df8 | PHP | royalmitten/SiteTool | /src/SiteTool/Processor/FetchUrl.php | UTF-8 | 3,204 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace SiteTool\Processor;
use SiteTool\UrlToCheck;
use Amp\Artax\Response;
use SiteTool\EventManager;
use SiteTool\Processor\Data\ResponseReceived;
use SiteTool\Processor\Data\FoundUrlToFollow;
use SiteTool\Processor\Data\ResponseError;
use Amp\Artax\Client as ArtaxClient;
use SiteTool\Writer\OutputWriter;
... | true |
b0132f371bb21be22b4903ab6555d377b39f4528 | PHP | alexndr-novikov/zend-preparation | /www/language-reference/reserved.variables/__argv.php | UTF-8 | 248 | 2.671875 | 3 | [] | no_license | <?php
if (PHP_SAPI != 'cli') {
throw new Exception('Script should be called only in command line way');
}
function line($content)
{
print $content;
print "\r\n";
}
line('$argv content:');
var_dump($argv); // script name + variables
| true |
94eeeb7e93df1793418402fc1561871c7752149b | PHP | Master-Wangus/EcadAssignment2020 | /index.php | UTF-8 | 2,029 | 2.578125 | 3 | [] | no_license | <?php
// Detect the current session
session_start();
//Start SQL and obtain the products on sale
include("mysql.php");
$conn = new Mysql_Driver();
$conn->connect();
$qry = "SELECT * FROM product WHERE OfferStartDate < CURDATE() AND OfferEndDate> CURDATE()";
$result = $conn->query($qry);
if ($conn->num_rows($result) ... | true |
1e7a25102171b6fd365883ba210f75483abbe6ec | PHP | xImran96/Api-Jwt | /app/Repositories/ProductRepository.php | UTF-8 | 3,358 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Product;
class ProductRepository{
public function all(){
try {
$products = Product::orderBy('id')
->with('category')
->get()
->map(function($product){
... | true |
eb3fae9492fba699d681254c18b34b744786895b | PHP | sunquangang/Gps-RESTfull | /database/seeds/PointLikeTableSeeder.php | UTF-8 | 884 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\PointLike;
class PointLikeTableSeeder extends Seeder
{
protected $records = 30;
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
for ($x=0; $x < $this->records; $x++) {
$arr = [
... | true |
7e8da04894be3b71f8a51a45e075408a6c563081 | PHP | Lin07ux/ant-open | /src/Requests/AlipayTradeCloseRequest.php | UTF-8 | 2,004 | 2.8125 | 3 | [] | no_license | <?php
/**
* 统一收单交易关闭接口
*
* 用于交易创建后,用户在一定时间内未进行支付,可调用该接口直接将未付款的交易进行关闭。
*
* [官方文档](https://opendocs.alipay.com/apis/api_1/alipay.trade.close)
*
* Author: Lin07ux
* Created_at: 2020-04-02 10:12:02
*/
namespace AntOpen\Requests;
class AlipayTradeCloseRequest extends Request
{
/**
* @var string 接口签名
... | true |
d75f5c8582dcd0bccbe4641e58ae24b3c2fe03ab | PHP | ansmoh86/jhfjfvj | /wp-content/plugins/wpforms-conversational-forms/src/Frontend.php | UTF-8 | 22,885 | 2.546875 | 3 | [
"MIT",
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only"
] | permissive | <?php
namespace WPFormsConversationalForms;
/**
* Conversational Forms frontend functionality.
*
* @package WPFormsConversationalForms
* @author WPForms
* @since 1.0.0
* @license GPL-2.0+
* @copyright Copyright (c) 2019, WPForms LLC
*/
class Frontend {
/**
* Current form data.
*
* @var... | true |
bca74b586958046ea30bf51aa464a5469b3629c4 | PHP | lupengwa/Entertainment_Collectibles | /MVC/controllers/style/Customersign_control.php | UTF-8 | 5,172 | 2.515625 | 3 | [] | no_license | <?php
class Customersign_control extends CI_Controller
{
public function __construct()
{
parent::__construct();
session_start();
}
public function index()
{
$firstName = $_POST['firstName'];
$lastName = $_POST['lastName'];
$email = $_POST['email'];
... | true |
83115e7d22c1245abc8cd8f0c61038ae75d89fcf | PHP | Database-Project-with-travel/Database_Project | /code/update_outbound_option.php | UTF-8 | 4,397 | 2.703125 | 3 | [] | no_license | <?php
header("Content-Type:text/html;charset=utf-8");
$servername = "localhost";
$username = "project";
$password = "project";
$dbname = "project_travel";
try{
echo "!!!若沒有選填id,會重新導向至這一頁。其餘欄位不填,則維持原狀。!!!<br><br>";
session_start();
$conn = new PDO("mysql:host=$servername;dbname=$dbname;charset=utf8",
$username,$pa... | true |
8f4211e5f070db37ed6981b6cd1f1db2d7103fb8 | PHP | loveyu/ShadowShare | /app/view/profile/edit_avatar.php | UTF-8 | 2,317 | 2.609375 | 3 | [] | no_license | <?php
/**
* User: loveyu
* Date: 2015/3/18
* Time: 15:28
* @var $this ULib\Page
* @var $__error string 错误信息
*/
$member = class_member();
$avatar_param = $member->parseAvatarParam();
$google = $member->getAvatarByGoogle();
$this->get_header("自定义头像");
?>
<h3>自定义你的头像</h3>
<form action="" method="post" class="... | true |
4dc4a3bed4b3a1b73d35897b9d6369549ae7a6c0 | PHP | Cucusenok/patterns | /fabricMethod/Coords.php | UTF-8 | 497 | 3.4375 | 3 | [] | no_license | <?php
namespace fabricMethod;
/**
* Class Coords
* The class for work with coordinates
* @package fabricMethod
* float $longitude
* float $latitude
*/
class Coords
{
public $longitude;
public $latitude;
public function __construct(float $longitude, float $latitude)
{
$this->longitude ... | true |
87725fe1f4803eb54583f5c41eda6644700a588a | PHP | newtime-est/autovista-appraisal | /src/SessionStorage.php | UTF-8 | 816 | 2.890625 | 3 | [] | no_license | <?php
namespace AutovistaAppraisal;
use AutovistaAppraisal\IStorage;
class SessionStorage implements IStorage
{
/**
* @var string $sessionKey
*/
protected $sessionKey = 'autoVistaAppraisalId';
public function __construct()
{
if (session_id() === '') {
session_start();
... | true |
a31963cbcd8c0928f9d84c2b3930ae9395d3eb24 | PHP | projek-xyz/slim-framework | /src/Database/Schema/DeleteSchema.php | UTF-8 | 297 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Projek\Slim\Database\Schema;
use Projek\Slim\Database\Schema;
use Slim\PDO\Database;
class DeleteSchema extends Schema
{
/**
* @inheritdoc
*/
public function build(Database $database = null)
{
return sprintf('DROP TABLE %s', $this->table);
}
}
| true |
7f2564a6400fa95e2925be85cbbdcf67639bc512 | PHP | aloeproject/laravel | /app/Library/MsgFactory.php | UTF-8 | 753 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* File Name:MsgFactory.php
* @author $Author:lukang$
* @email $lk88boy@gmail.com$
*/
namespace App\Library;
class MsgFactory
{
private $provide = null;
//初始化消息类型
public function boot($msgType,$dataObj){
$type = ucfirst($msgType);
$filename = $type.'ServiceProvider';
$... | true |
cdbde2cd85d11578e436fcbff960dbcfdf1a16b5 | PHP | pekand/dbbuilder | /Modules/Core/Router/Response.php | UTF-8 | 203 | 2.796875 | 3 | [] | no_license | <?php
namespace Core\Router;
class Response {
$data = "";
public function __construct($data) {
$this->$data = $data;
}
public function render() {
echo $this->$data;
}
} | true |
e2cad52d45b71207aa98e5ed147b34dc39f58ceb | PHP | aurelienCastellarnau/myMarmiton | /app/MotherShip.php | UTF-8 | 2,108 | 2.734375 | 3 | [] | no_license | <?php
namespace Marmiton\App;
use \PDO;
class MotherShip
{
private static $db;
private static $setting;
private static $_platform;
public function __construct(){
}
static function deployPlatform(){
spl_autoload_register([__CLASS__, 'autoload']);
if (is_null(self::$_platform)... | true |
e33b53c37b842b9e996ae4be333592905133d945 | PHP | DivanDesign/EvolutionCMS.snippets.ddStringTools | /src/Tool/Tagremover/Tool.php | UTF-8 | 734 | 2.859375 | 3 | [] | no_license | <?php
namespace ddStringTools\Tool\Tagremover;
class Tool extends \ddStringTools\Tool\Tool {
private
$allowed = ''
;
/**
* __construct
* @version 1.0 (2020-05-05)
*
* @param $params {stdClass|arrayAssociative}
*/
public function __construct($params){
//Call base constructor
parent::__construct($... | true |
c4cb0db46b220ace06978b634d939749c04eb6ee | PHP | mrsuh/mafia-backend-php | /src/Event/DayEvent.php | UTF-8 | 3,836 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Event;
use App\History\History;
use App\Player\Player;
use App\Player\Players;
class DayEvent extends Event
{
const EVENT = 'day';
const ACTION_OUT = 'out';
const ACTION_ACCEPT = 'accept';
private $acceptedPlayers;
public function __construct(History $history, Players $p... | true |
17b04a4fc7569464b16cb34d3858240e3477eb71 | PHP | chirribula/dwes | /Tema5/Carrito Vero/models/CategoriaModel.php | UTF-8 | 1,958 | 3.0625 | 3 | [] | no_license | <?php
class CategoriaModel extends Database{
private $id;
private $nombre;
private $conn;
public function __construct($nombre=null ) {
$this->conn= parent::conectaDB();
if(isset($nombre)){
$this->$nombre=$nombre;
}
}
... | true |
0b9f8ca85170c3a17b855bfbad6b60c1b0ed1617 | PHP | leneveuT/webstudent | /src/Entity/Skill.php | UTF-8 | 3,012 | 2.625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\SkillRepository")
*/
class Skill
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(typ... | true |
bb1c0fa36f8cc17791ca9728e19138e03f6e17e7 | PHP | Fisbang/fisbang-admin | /app/Appliance.php | UTF-8 | 1,014 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Kyslik\ColumnSortable\Sortable;
class Appliance extends Model
{
use Sortable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'type', 'building_id', 'brand', 'bran... | true |