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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
922c5935892f2846b82d6ccdab9edbe2510e1f44 | PHP | jsreese92/tutorScheduler | /toOpenShift/tutor/tutor_hours.php | UTF-8 | 2,741 | 3.015625 | 3 | [] | no_license | <?php
/*
WRITTEN BY: Eric Jones
LAST EDITED: 12/8/2013
This page simply displays the hours currently given by the database. It prints the current schedule and open hours in hidden tables and the javascript will be used to fill out the
display for the user. No user interaction can be done here.
*/
include "./../co... | true |
0057ea1b24a2fcbf79428046d231a921b13e6c62 | PHP | steveharwell1/remindMe | /utils/error_msg.php | UTF-8 | 193 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
function log_error($message) {
session_start();
if(!isset($_SESSION['errors'])){
$_SESSION['errors'] = array();
}
array_push($_SESSION['errors'], $message);
} | true |
e4e6de92355796d732ccb2e334bd8a47caf58441 | PHP | alex-kusakin/quote-csv | /Test/Unit/Model/Csv/DataProvider/QuoteTest.php | UTF-8 | 1,897 | 2.5625 | 3 | [] | no_license | <?php
/**
* @author Alex Kusakin
*/
namespace AlexKusakin\QuoteCsv\Test\Unit\Model\Csv\DataProvider;
class QuoteTest extends \PHPUnit\Framework\TestCase
{
/**
* @var array
*/
protected $mockItemsArray = [
['skuA', 'Test A', 3, 12.6],
['skuB', 'Test B', 1, 13.25],
['skuC', 'T... | true |
212efb7458442a7d58f2856c6dc145a89b1c07e2 | PHP | DenisGorbachev/OldRoboticks | /client/lib/command/base/RealmCommand.class.php | UTF-8 | 1,841 | 2.71875 | 3 | [] | no_license | <?php
require_once dirname(__FILE__).'/UserInterfaceCommand.class.php';
abstract class RealmCommand extends UserInterfaceCommand {
public $realmId;
public function getOptionConfigs() {
return array(
'realm_id' => array(
'short_name' => '-m',
'long_name' => ... | true |
ee0fa6b76c192960e54342d6f12e7f0173e34c73 | PHP | tpmanc/backup-backend | /app/Models/DatabaseBackups.php | UTF-8 | 611 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* Class DatabaseBackups
* @package App\Models
* @property int $id
* @property int $database_id
* @property string $name
* @property string $path
* @property-read Database $database
*... | true |
08c14c4fd0d2ffb5bbe2909bbae165f0bb10dc97 | PHP | alexboo/Core-Engine | /library/Core/View/Helper/BookNavigation.php | UTF-8 | 3,501 | 2.546875 | 3 | [] | no_license | <?php
class Core_View_Helper_BookNavigation
{
public function bookNavigation($section = null, $content = null)
{
$session = new Core_Session();
if ( isset($session->book) ) {
$modelBook = new Model_Books_Book();
$sections = $modelBook->getMenu($session->book);
$view = new Core_View();
... | true |
e2749772963c6a829cbe080882d5dc59b6ffdc3d | PHP | imanuelnickles/gigsitfrontend | /database/migrations/2016_06_13_150709_create_sell_table.php | UTF-8 | 1,104 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSellTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sell', function (Blueprint $table) {
$table->... | true |
8d3f12c491ac718220a244c5899474f4e631a396 | PHP | sfadless/payment | /src/Transaction/Arguments/CheckTransactionArguments.php | UTF-8 | 813 | 2.84375 | 3 | [] | no_license | <?php
namespace Sfadless\Payment\Transaction\Arguments;
/**
* CheckTransactionArguments
*
* @author Pavel Golikov <pgolikov327@gmail.com>
*/
class CheckTransactionArguments
{
/**
* @var string
*/
private $transactionId;
/**
* @var array
*/
private $options;
/**
* Che... | true |
070dfea38c2c771cd8e7f5efaf06c0bdf8be641e | PHP | lednhatkhanh/lamp-final-project | /register.php | UTF-8 | 2,948 | 2.625 | 3 | [] | no_license | <?php
require 'connect.php';
session_start();
if(isset($_SESSION['user_name'])) {
header('Location: main.php');
}
if(isset($_POST['username']) && isset($_POST['password']) && isset($_POST['passwordConfirm'])){
$username = $_POST['username'];
$password = $_POST['password'];
$passwordConfirm ... | true |
5b504539d154598722e2cf358e322314daac14ce | PHP | theallmightyjohnmanning/secc | /app/commands/LACE.php | UTF-8 | 2,389 | 2.9375 | 3 | [] | no_license | <?php
/**
*
*/
namespace SECC\Commands;
use SECC\App;
class LACE
{
private static $commands = [];
public static function initialize($argc = null, $argv = null)
{
self::setValidCommands();
if($argc == 1)
{
self::header();
for($i = 0; $i < count(self::$commands); $i++)
{
... | true |
939a0d174ae9cadc432a71672669f819e2574789 | PHP | zinovyev/servelat | /app/Components/ProcessManager/ProcessInterface.php | UTF-8 | 1,497 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace Servelat\Components\ProcessManager;
use Servelat\Components\TaskManager\TaskInterface;
/**
* Interface ProcessInterface.
* Base process interface.
*
* @author Ivan Zinovyev <vanyazin@gmail.com>
*/
interface ProcessInterface
{
/**
* @param \Servelat\Components\TaskManager\TaskInterface ... | true |
814599bbfbf285b4b0e52401d904067ef2c2fb17 | PHP | yuaccp2/oso_extend | /classes/categories.php | UTF-8 | 2,495 | 2.703125 | 3 | [] | no_license | <?php
/**
* 分类的树型类
* @author espow team nathan 2011-8-24
* @package
* @licese http://www.oscommerce.com
* @version 1.1
* @copyright (c) 2003 osCommerce
*/
Class categories extends tree{
public function categories($all_access = false){
global $customer_group_id;
if(empty($customer_group_id)){
$c... | true |
d171699f3ae06a0184c3428c63ab461e03567403 | PHP | octalmage/wib | /php-7.3.0/ext/imap/tests/imap_include.inc | UTF-8 | 5,460 | 2.734375 | 3 | [
"MIT",
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing"
] | permissive | <?php
// Change these to make tests run successfully
$server = '{127.0.0.1/norsh}';
$default_mailbox = $server . "INBOX";
$domain = "something.com";
$admin_user = "webmaster"; // a user with admin access
$username = "$admin_user@$domain";
$password = 'p4ssw0rd';
$users = array("webmaster", "info", "admin", "foo"); //... | true |
0862fedf74ec642a5deba1ed2a48c143cbf6e010 | PHP | 2gmurillo/ventus | /tests/Feature/Home/FilterTest.php | UTF-8 | 1,966 | 2.515625 | 3 | [] | no_license | <?php
namespace Tests\Feature\Home;
use App\Models\Product;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Str;
use Tests\TestCase;
class FilterTest extends TestCase
{
use RefreshDatabase;
/** @test
* @dataProvider searchItemsProvider
* @param string... | true |
f4ba6f6d42224b216919b6a4b35ed68f39c92edf | PHP | mhoss3in/php.local | /oop/classes/htmlExport.php | UTF-8 | 196 | 2.53125 | 3 | [] | no_license | <?php
require_once __DIR__ .DIRECTORY_SEPARATOR."../interfaces/canExport.php";
class htmlExport implements canExport{
public function export()
{
echo "data format : html";
}
} | true |
af6506e59684504416d0dfa31424943a8e6b3341 | PHP | sqj-modules/Digiccy | /Support/Contracts/Market/Repository.php | UTF-8 | 1,123 | 2.8125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sunqingjiang
* Date: 2018/11/8
* Time: 11:21 AM
*/
namespace SQJ\Modules\Digiccy\Support\Contracts\Market;
use Illuminate\Contracts\Events\Dispatcher;
class Repository
{
private $market;
private $events;
public function __construct(Market $market)
{
... | true |
4db8874b15085218bf6cfc0092d9e2541a2e2be3 | PHP | aedart/athenaeum | /packages/Http/Clients/src/Requests/Builders/Concerns/Cookies.php | UTF-8 | 3,593 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Aedart\Http\Clients\Requests\Builders\Concerns;
use Aedart\Contracts\Http\Clients\Requests\Builder;
use Aedart\Contracts\Http\Cookies\Cookie;
use Aedart\Http\Clients\Exceptions\InvalidCookieFormat;
use Aedart\Http\Cookies\SetCookie;
use Throwable;
/**
* Concerns Cookies
*
* @see Builder
* @see B... | true |
2711b2ed30a21ee9cc68b761455dcc04d7469c57 | PHP | ameliendrez/Empleados-Empresa | /Resolucion/clases/Designer.php | UTF-8 | 346 | 3.171875 | 3 | [] | no_license | <?php
class Designer extends Employee{
function __construct() {
parent::__construct();
}
public function getSpecility()
{
return $this->speciality;
}
public function setSpeciality($typeDesign)
{
$this->speciality = $type... | true |
435e406de68531bbc4f22f92c2637e08601ae83f | PHP | stof/aws | /src/Service/CodeDeploy/src/ValueObject/ErrorInformation.php | UTF-8 | 1,179 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace AsyncAws\CodeDeploy\ValueObject;
use AsyncAws\CodeDeploy\Enum\ErrorCode;
/**
* Information about any error associated with this deployment.
*/
final class ErrorInformation
{
/**
* For more information, see Error Codes for CodeDeploy in the CodeDeploy User Guide.
*
* @see https://... | true |
e5f6a5fd2def831c70ff371ce92dadaddb67299d | PHP | Ibrahim-Elsanhouri/PHPMVC | /src/Http/Request.php | UTF-8 | 211 | 2.640625 | 3 | [] | no_license | <?php
namespace Src\Http;
class Request{
public function method(){
return strtolower($_SERVER['REQUEST_METHOD']);
}
public function path(){
return $_SERVER['REQUEST_URI'];
}
} | true |
8ee710e483b8abb898619a844022a6d184c52cfc | PHP | therakib7/mombo-wp | /inc/frontend/schema.php | UTF-8 | 19,150 | 2.859375 | 3 | [] | no_license | <?php
/**
* Theme Helpers
*
* @package Mombo
* @since 1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if(! class_exists( 'Mombo_Helpers' ) ) {
/**
* The Mombo Helpers
*/
class Mombo_Helpers {
public function __construct() {
//Print Theme Colors
$this->... | true |
cd559205de9325534e86e18c2bfb1e58d6ba5ce5 | PHP | hellangel28/moephp4-collection | /tests/MoePHP4/Collections/ReferencedCollectionTest.php | UTF-8 | 35,801 | 3.046875 | 3 | [] | no_license | <?php
namespace tests\MoePHP4\Collection;
use MoePHP4\Collections\Collection;
use MoePHP4\Collections\Exception\CollectionException;
use MoePHP4\Collections\ReferencedCollection;
use PHPUnit\Framework\TestCase;
/**
* Class ReferencedCollectionTest
* @package tests\MoePHP4\Collections
*/
class ReferencedCollect... | true |
cdcde51e78fe63f6823edeff6893e773385e5993 | PHP | ilan84levi/playlist-site-sample | /phpPages/BLL.php | UTF-8 | 3,261 | 2.6875 | 3 | [] | no_license | <?php
require_once 'DAL.php';
require_once 'playList.php';
require_once 'category.php';
function register($firstName, $lastName, $userName, $password) {
$userName = addslashes($userName);
$password = addslashes($password);
$password = crypt($password, "my site"); // Salt the password.
$password = sh... | true |
376cfd6d5cbb1b66166cccde3d3ba4493ac33226 | PHP | tim-moody/experiments | /cmd-serv/prototype1/client-service.php | UTF-8 | 760 | 3.1875 | 3 | [] | no_license | <?php
/*
* xsce-cmdsrv client
* Connects DEALER socket to ipc:///run/cmdsrv_sock
* Sends command, expects response back
*/
?>
<html>
<body>
<h1>Hello world!</h1>
<p>This is being served from xsce-cmdsrv using PHP.</p>
<?php
// Socket to talk to server
$command = $_GET['command'];
echo "Command: $command <B... | true |
db3e034d6ea03017d55b55e3db1131c32e5506e9 | PHP | PauloRenato21/Paulo-phpMailer | /enviaEmail.php | UTF-8 | 1,453 | 2.671875 | 3 | [] | no_license | <?php
include_once "phpmailer/src/PHPMailer.php";
include_once "phpmailer/src/SMTP.php";
include_once "phpmailer/src/Exception.php";
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
$nome = $_POST['nome'];
$sobrenome = $_POST['sobrenome'];
$email = $_POST['email'];
... | true |
cf5b2122a9b666acb2f72a6621a5b2ec4a4cb979 | PHP | mattiellojr/MVC-CRUD-mySQLi-social-network-app | /functions.php | UTF-8 | 5,216 | 2.71875 | 3 | [] | no_license | <?php
session_start();
$link = mysqli_connect("shareddb1a.hosting.stackcp.net", "twitter-340109", "fjwqi43r%&/WEF", "twitter-340109");
if(mysqli_connect_error()){
print_r(mysqli_connect_error());
exit();
}
if ($_GET['function'] == "logout") {
session_unset();
}
funct... | true |
6b9ad4b9b666db6ae27efd1053402ab2c59bad47 | PHP | cristianJourdan/PHP-ADVANCED | /2-Loops/taak02/loops-for.php | UTF-8 | 183 | 2.78125 | 3 | [] | no_license | <?php
for ($leeftijd =0; $leeftijd <= 17; $leeftijd++){
echo "Ik ben $leeftijd jaar, dus ik mag nog niet stemmen <br>";
}
echo "Ik ben $leeftijd jaar, dus ik mag stemmen <br>";
?> | true |
59593834b06ab1d9c784da82ab6f7c0bfbbe483e | PHP | hmazter/advent-of-code-solutions | /2016/day16/functions.php | UTF-8 | 1,266 | 3.453125 | 3 | [] | no_license | <?php
declare(strict_types = 1);
/**
* Pass a string trough dragon curve calculation
*
* @param string $input
* @return string
*/
function dragonCurve(string $input): string
{
$b = $input;
$b = strrev($b);
$length = strlen($b);
for ($i = 0; $i < $length; $i++) {
$b[$i] = $b[$i] === '1' ? '... | true |
59006ca6a8a42846ab4d3322af427c93c70e94d5 | PHP | fm-ph/quark-server | /tests/GeocoderTest.php | UTF-8 | 1,863 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* GeocoderTest.
*/
namespace Quark\Utils;
use PHPUnit\Framework\TestCase;
/**
* GeocoderTest class.
*
* @coversDefaultClass \Quark\Utils\Geocoder
* @todo Add missing WAN tests.
*/
class GeocoderTest extends TestCase
{
static $lanIP = '127.0.0.1';
static $wanIP = '138.197.194.7';
static $badI... | true |
987e64090881782c15b16d3643692b89bc685cc6 | PHP | hungdaycb00/PHP-Learning | /Session3/snippet2.php | UTF-8 | 248 | 3.25 | 3 | [] | no_license | <?php
$x = 1;
$y = 2;
echo $x.'<=>' .y,' Returns ', $x <=> $y;
//return -1
echo '</br>';
$x = 10;
$y = 10;
echo $x. '<=>' .$y, ' Returns ', $x <=>$y;
//return 0
echo '</br>';
$x = 10;
$y = 5;
echo $x. '<=>' .$y, ' Returns ', $x <=>$y;
//return 1
?> | true |
6e2afe1a6be889fbfe2a0ccd91e443f6af58349d | PHP | mdjaman/BaconUser | /src/BaconUser/InputFilter/RegistrationFilter.php | UTF-8 | 2,819 | 2.546875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
* BaconUser
*
* @link http://github.com/Bacon/BaconUser For the canonical source repository
* @copyright 2013 Ben Scholzen 'DASPRiD'
* @license http://opensource.org/licenses/BSD-2-Clause Simplified BSD License
*/
namespace BaconUser\InputFilter;
use BaconUser\Options\UserOptionsInterface;
use ... | true |
a4236c3c16bed033505eff00da7ebce071bcfaa0 | PHP | chuck-cp/choujiang | /common/tools/Redis.php | UTF-8 | 1,007 | 2.59375 | 3 | [] | no_license | <?php
namespace common\tools;
use Yii;
class Redis
{
protected static $instance = null;
public function __construct()
{
if (!extension_loaded('redis')) {
throw new \BadFunctionCallException('not support: redis');
}
$redisConfig = Yii::$app->redis;
self::$instanc... | true |
f80bc0eb96fd85d2f47860fe2a279a59309001b1 | PHP | hostnet/type-inference-tool | /src/Analyzer/DynamicMethod/Tracer/Parser/Record/AbstractRecord.php | UTF-8 | 1,075 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @copyright 2017-2018 Hostnet B.V.
*/
declare(strict_types=1);
namespace Hostnet\Component\TypeInference\Analyzer\DynamicMethod\Tracer\Parser\Record;
/**
* Representation of a trace record.
*/
abstract class AbstractRecord
{
/**
* Unique number in a trace mapped to a function.
*
* @v... | true |
5ead9a0bd6532e8047b5712cfe48f8028b6302bb | PHP | sadafm/ecarrefour | /multebox/models/search/Queue.php | UTF-8 | 1,936 | 2.625 | 3 | [] | no_license | <?php
namespace multebox\models\search;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use multebox\models\Queue as QueueModel;
use multebox\models\QueueUsers as QueueUsersModel;
/**
* Queue represents the model behind the search form about multebox\models\Queue`.
*/
class Queue extends Queue... | true |
b27b81ecc994ffc5f6e1fd8680f14ac87642d4e1 | PHP | pfazzi/patrickfazzi.it | /rich_domain_model/rich/Customer.php | UTF-8 | 1,877 | 3.09375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App;
class Customer
{
/** @var int */
private $id;
/** @var string */
private $firstName;
/** @var string */
private $lastName;
/** @var string */
private $address;
/** @var string */
private $phone;
/** @var string */
priva... | true |
d27afd359add1e3091014644a904777d6d29f883 | PHP | KNIGHTTH0R/travelgo | /admin/edit-document.php | UTF-8 | 3,766 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
include("inc/validasi-login.php");
include("inc/anti-injection.php");
include("inc/connection.php");
$error = "";
error_reporting(0);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<... | true |
366dba0fe6e814dd172aa95c13eba2d31bb401a9 | PHP | Nahuusi-Investments-Ltd/mma | /application/models/Data_model.php | UTF-8 | 1,124 | 2.546875 | 3 | [] | no_license | <?php
class Data_model extends CI_Model {
function __construct(){
parent::__construct();
}
function get_data_raw_query($query){
return $this->db->query($query);
}
function get_table_data($table){
return $this->db->get($table);
}
function get_uuid(){
return $this->db->query('SEL... | true |
0cbde66e0001b88c6145326ac54b8d68b33dde8f | PHP | bearer1024/feedReaderPHP | /app/Controllers/feedController.php | UTF-8 | 20,307 | 2.8125 | 3 | [] | no_license | <?php
/**
* Controller to handle every feed actions.
*/
class FreshRSS_feed_Controller extends Minz_ActionController {
/**
* This action is called before every other action in that class. It is
* the common boiler plate for every action. It is triggered by the
* underlying framework.
*/
public function fir... | true |
3005ea4876769ce84ba024071871291228a19b1e | PHP | gsbombon/proyectoWeb | /php/horario.php | UTF-8 | 1,738 | 2.96875 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documento sin título</title>
</head>
<body>
<?php
$m[1] ="leng";
$m[2] ="matematicas";
$m[3] ="sociales";
$m[4] ="naturales";
$m[5] ="artiscitica";
$m[6] ="fisica";
$m[7] ="quimica";
$m[8] ="filosofia";
$m[9]="ciudadani";
$m[10] ="educa";
$v =... | true |
3c592c84178c883a0bc0af472505449babea2aa7 | PHP | dimayaschhuk/a_b_z | /database/seeds/PeopleTableSeeder.php | UTF-8 | 4,871 | 2.875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\People;
class PeopleTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$array[0]=['name'=>'економічного','name_boss'=>'Юрій','patronymic'=>'Миколайвич','surname'=>'Станкевич','pos... | true |
ce77021656424f9847c00356ad3a63a89850613f | PHP | jguittard/tripsorter | /lib/Trip.php | UTF-8 | 2,323 | 3.46875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
* Class Trip
*
* @author Julien Guittard <julien@youzend.com>
* @link http://github.com/jguittard/tripsorter for the canonical source repository
* @copyright Copyright (c) 2014 Julien Guittard
*/
class Trip
{
/**
* Array of boarding cards
*
* @var array
*/
protected ... | true |
95f520e2b2012160b7b2f9cfbae41404e2239c5f | PHP | zecawithdawn/DEP_Test | /DEP_server/test.php | UTF-8 | 1,193 | 2.5625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
$host = 'localhost';
$user = 'root';
$pw = 'root';
$db = 'depression';
$port = 3306;
$mysqli = new mysqli($host,$user,$pw,$db,$port);
$mysqli->set_charset("utf8");
if ( !$mysqli ) {
die("error");
};
... | true |
01f306a4df72a4d725b093f76675237780448100 | PHP | Emilyhyn/blackcat | /app/Http/Controllers/ProfileController.php | UTF-8 | 1,208 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: emily
* Date: 28/04/2016
* Time: 2:42 PM
*/
namespace Blackcat\Http\Controllers;
use Blackcat\Models\User;
use Illuminate\Http\Request;
use Auth;
class ProfileController extends Controller{
public function getProfile( $username){
// dd($username); ... | true |
5c2d71e720f046b4051a0dfbbfe9ae6725b87a2d | PHP | SpoonX/SxBootstrap | /src/SxBootstrap/View/Helper/Bootstrap/ButtonGroup.php | UTF-8 | 2,150 | 2.625 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace SxBootstrap\View\Helper\Bootstrap;
use SxCore\Html\HtmlElement;
use SxBootstrap\View\Helper\Bootstrap\Button as SxButton;
class ButtonGroup extends AbstractElementHelper
{
/**
* Contains all buttons in array or Zend\Form\Element\Button
*
* @param array $buttons
*/
protect... | true |
f04955f29bca6fcc77e925861e3623e627e3f318 | PHP | EMegamanu/boutiqueculturelle | /connexion.php | UTF-8 | 2,836 | 2.828125 | 3 | [] | no_license | <?php
/* Inclusion script connexion base de données. */
require_once('inc/db.inc.php');
if(!empty($_POST)) {
$success = false;
if(!empty($_POST['email']) && !empty($_POST['motDePasse'])) {
$email = $_POST['email'];
$motDePasse = $_POST['motDePasse'];
... | true |
fe848a2d0d5b04707acb988f2b9db1a307f33ea6 | PHP | maxito123/PHP | /processform.php | UTF-8 | 412 | 2.625 | 3 | [] | no_license | <?php
if(isset($_POST['submit'])){
$firstName = $_POST['first_name'];
$lastName = $_POST['last_name'];
$email = $_POST['email'];
$gender= $_POST['gender'];
$message = $_POST['message'];
$file = fopen("$firstName.txt" , "a");
fwrite($file, $firstName);
fwrite($file, $lastName)... | true |
c31565e756bd36b884794231fb1c89cc94cafd5f | PHP | MiSTOMEDIA/framework | /packages/core/view.php | UTF-8 | 823 | 2.921875 | 3 | [] | no_license | <?php
namespace Core
{
class View
{
/**
* The view instance
* @var Gears
*/
protected $view;
/**
* Assign a new instance of Gears to the view property
*/
public function __construct()
{
$this->view = new \Core\Libraries\Gears;
}
/**
* Render a view via the Ge... | true |
02cdb7ec31b00ecbd80ada67cf5078225be5cad2 | PHP | richjenks/wp-splitester | /src/Metaboxes/Variants.php | UTF-8 | 1,395 | 2.65625 | 3 | [] | no_license | <?php namespace RichJenks\Splitester\Metaboxes;
/**
* Displays custom fields for test variations
*/
class Variants {
public function __construct() {
// Container
$cmb = new_cmb2_box( array(
'id' => 'splitester_variants',
'title' => __( 'Variants', 'splitester' ),
'object_types' => ... | true |
b56554ec3978fa0228d9e6ffd1c6e08d50ff70f4 | PHP | jatin0777/jatin-github | /plugin/wp-content/plugins/polylang/include/links-abstract-domain.php | UTF-8 | 2,248 | 2.78125 | 3 | [
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"GPL-3.0-only",
"LicenseRef-scancode-public-domain",
"GPL-3.0-or-later"
] | permissive | <?php
/**
* Links model for use when using one domain or subdomain per language
*
* @since 2.0
*/
abstract class PLL_Links_Abstract_Domain extends PLL_Links_Permalinks {
/**
* Constructor
*
* @since 2.0
*
* @param object $model PLL_Model instance.
*/
public function __construct( &$model ) {
parent... | true |
dcfc01bd21acd91091844f0f7564cb8530c278ae | PHP | zxf5115/SystemCMS_Green | /Application/Admin/Plugin/FormatPlugin.class.php | UTF-8 | 7,540 | 2.953125 | 3 | [] | no_license | <?php
/**
* ---------------------------------------------------------------------------------
* @filename
* @chinese: 后台数据格式化插件类
* @english: FormatPlugin.class.php
*
* @version: 1.0
* @desc : 操作后台数据格式化
*
* @author : Zhang XiaoFei (1326336909@qq.com)
* @date : 2015-12-11 16:11:01
*/
class FormatPl... | true |
e17d659af3d7ab983ac90fa8e2856f7b94ab6665 | PHP | open-orchestra/open-orchestra-cms-bundle | /ApiBundle/Transformer/ContentAttributeTransformer.php | UTF-8 | 1,270 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace OpenOrchestra\ApiBundle\Transformer;
use OpenOrchestra\BaseApi\Exceptions\TransformerParameterTypeException;
use OpenOrchestra\BaseApi\Facade\FacadeInterface;
use OpenOrchestra\BaseApi\Transformer\AbstractTransformer;
use OpenOrchestra\ModelInterface\Model\ContentAttributeInterface;
/**
* Class Cont... | true |
8133fd6e1c1533d5c3a125f347aa4fc71024d0c8 | PHP | yiqiniu/logger-viewer | /src/library/Logger.php | UTF-8 | 3,221 | 2.734375 | 3 | [] | no_license | <?php
namespace yiqiniu\logger\library;
use think\App;
use think\Exception;
use yiqiniu\logger\library\contract\YqnLoggerInterface;
class Logger implements YqnLoggerInterface
{
private static $_config = [];
//public function
protected $namespace = '';
/**
* @var App
*/
protected $ap... | true |
e4d4309ba4ff7f4919caaa6e271a09f555785039 | PHP | chcantre/artandcraft | /code/SendEmails.php | UTF-8 | 1,446 | 2.921875 | 3 | [] | no_license | <?php
$headers = "From: chcantre@gmail.com\r\nReply-to: chcantre@gmail.com";
$addresses = "EmailList.txt";
$handle = fopen($addresses, 'r');
while (($line = fgets($handle)) !== false)
{
echo $line . "\n";
$parts = preg_split('/\|/', $line);
$email = $parts[0];
$fname = $parts[2];
$hsname = $parts[3];
$lname = $pa... | true |
ca090eb4debc0efba14c2453ce5f6217a28c8270 | PHP | sebastiancorrales/nutrir | /models/Departamento.class.php | UTF-8 | 489 | 2.859375 | 3 | [] | no_license | <?php
include_once 'core\BaseModel.php';
class Departamento extends BaseModel
{
private $nombre;
public function __construct()
{
parent::__construct();
}
/**
* Get the value of nombre
*/
public function getNombre()
{
return $this->nombre;
}
/**
* S... | true |
dc8490306ed3a2db6a9b261ae0e04a9381ae85a6 | PHP | Thebys/ih-theme-test | /templates/shortcode-page-button.php | UTF-8 | 1,805 | 2.703125 | 3 | [] | no_license | <?php
/**
* Template for the Page Button shortcode.
*
* Template is ready to be used with or without Elementor. Thanks to the add_render_attribute() method this element
* can be edited live with Elementor (the changes are visible right away and one can change the button text right
* in the page itself without inte... | true |
89645bac62cd67723e9a5ff833f54875e8d44078 | PHP | EricHindle/lms | /lms_php/struct/game/game-functions.php | UTF-8 | 11,266 | 2.546875 | 3 | [] | no_license | <?php
/*
* HINDLEWARE
* Copyright (C) 2020 Eric Hindle. All rights reserved.
*/
$myPath = '../../';
require_once $myPath . 'includes/db_connect.php';
require_once $myPath . 'struct/picks/pick-functions.php';
require_once $myPath . 'struct/email/email-functions.php';
date_default_timezone_set('Europe/Londo... | true |
fc84ea8b90669f04d99d4cbc780cc7ac373922e9 | PHP | namncn/rtcore | /woocommerce/single-product/product-thumbnails.php | UTF-8 | 1,842 | 2.53125 | 3 | [] | no_license | <?php
/**
* Single Product Thumbnails
*
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-thumbnails.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* mainta... | true |
40158acf6835eddc0702a96351db5c485c6b0489 | PHP | jfsfranco/Tv | /app/Modules/DataProcessor/Infrastructure/Exception/ErrorReadingFileException.php | UTF-8 | 345 | 2.71875 | 3 | [] | no_license | <?php
namespace App\DataProcessor\Infrastructure\Exception;
use RuntimeException;
use App\DataProcessor\Application\Exception\ErrorReadingFileException as ErrorReadingFileExceptionInterface;
class ErrorReadingFileException extends RuntimeException implements ErrorReadingFileExceptionInterface
{
const MESSAGE = "... | true |
15e8c77ef4319c0ccc9f89c1c2f1b2f6bf730b67 | PHP | adbhas/collect | /kugou.php | UTF-8 | 822 | 2.59375 | 3 | [] | no_license | <?php
/**
* 获取列表
* @param string $keyword 关键字
* @param integer $page 当前页
* @param integer $pagesize 每页获取数量
* @return array
*/
function getList($keyword, $page = 1, $pagesize = 10){
$url = "https://songsearch.kugou.com/song_search_v2?&keyword={$keyword}&page={$page}&pagesize={$pagesize}";
... | true |
a4492c51c392e27a7e37cf3221598ada8f52f4fc | PHP | egorsmkv/laravel-api-example | /app/Data/Transformers/Api/ArticleTransformer.php | UTF-8 | 342 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Data\Transformers\Api;
use App\Data\Models\Article;
use League\Fractal\TransformerAbstract;
class ArticleTransformer extends TransformerAbstract
{
/**
* @param Article $item
* @return array<string, mixed>
*/
public function transform(Article $item)
{
return $ite... | true |
73d66bf8f6bece24ddb026f20d033068c2d409fa | PHP | phpcr/phpcr-shell | /src/PHPCR/Shell/Console/Command/Phpcr/VersionCheckinCommand.php | UTF-8 | 3,117 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the PHPCR Shell package
*
* (c) Daniel Leech <daniel@dantleech.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace PHPCR\Shell\Console\Command\Phpcr;
use PHPCR\RepositoryInterface;
u... | true |
189ea695da3294efb6630b0daffe8c7c9c12709c | PHP | qeyser/SSSUIBLOG | /Core/Extend/Library/ORG/Util/Sssuizip.class.php | UTF-8 | 1,951 | 2.890625 | 3 | [] | no_license | <?php
class Sssuizip{
public function __construct(){
}
public function Jieya($savename='',$extractpath=''){
$extractpath= empty($extractpath) ? './'.date('YmdHis') : $extractpath;
if (!file_exists($extractpath)){
if (!mkdir($extractpath)){
return '文件夹创建失败,请先手动创建存放目录!';
}
}
if (!file_exis... | true |
ea5b211870ec25faeabb82d1e37fc158e46084a5 | PHP | igor-zac/boutique | /catalogue.php | UTF-8 | 1,278 | 2.796875 | 3 | [] | no_license | <?php
include("functions.php");
session_start();
$articles_choisis_catalogue =[];
//Si nous avons un panier en cours et qu'on ne vient pas de valider le passage de la commande,
// on récupère la liste des articles sélectionnés
if(isset($_SESSION['panier']) AND !isset($_GET['empty_choice'])){
$articles_choisis =... | true |
dba1b32695a82ac4812c5495eaffd226ecb6cc9f | PHP | alexkovalevv/sociallocker-cloud | /common/modules/lockers/models/lockers/Lockers.php | UTF-8 | 1,362 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\modules\lockers\models\lockers;
use common\modules\lockers\models\visability\LockersVisability;
use Yii;
use yii\db\ActiveRecord;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "lockers".
*
* @property string $id
* @property string $user_id
* @prop... | true |
66dac84bafbc85ae0c0af9e3b34d450c8d335873 | PHP | mynicky/phpstudy | /Data Structures & Algorithms/demo.php | UTF-8 | 1,139 | 3.40625 | 3 | [] | no_license | <?php
require_once 'Algorithm/Engine/SortEngine.php';
use Algorithm\Engine\SortEngine;
$array = array(0, 3, 2, 4, 1);
$array = '873457560132413678310967823129605';
// $array = array('c', 'b', 'd', 'a');
// $array = 'cbda';
echo '======== Bubble sort ========<br />';
echo 'Ascending<br />';
echo '<pre>';
$sortedAr... | true |
16845786d5a6871a2d4eae018f1c2aa230a54e83 | PHP | k-bigboss99/PHP-MySQL | /本書範例程式/samples/ch08/error1.php | UTF-8 | 179 | 2.6875 | 3 | [] | no_license | <?php
function F1(array $a)
{
}
try
{
F1(1);
}catch (Exception $e) // failed to catch it
{
echo $e->getMessage();
}
?> | true |
5c92a30e7208b34154e152d730b525505a99bef5 | PHP | Maximnnn/map | /app/Controllers/Api/Login.php | UTF-8 | 561 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Controllers\Api;
use App\Controllers\Controller;
use App\Core\Request;
use App\Models\User;
class Login extends Controller
{
public function __invoke(Request $request)
{
$user = User::query()
->where('email', $request->get('email'))
->where('password', sha1... | true |
91cffb9e4db2fc17a5cdf537badc9c75bc71e8cf | PHP | jiokeokwuosa/hotel-system | /checkout.php | UTF-8 | 2,417 | 2.546875 | 3 | [] | no_license | <?php
require_once'header1.php';
if($_SESSION['access_level'] !=1 and $_SESSION['access_level'] !=3){
header('Location:login.php');
}
?>
<form action="transact.php" method="post">
<div class="row">
<h3 class="center color">Check Out</h3>
<?php
if(isset($_SESSION['c'])){
$error=$_SESSION['c'... | true |
4e4d7c9e05ce25df616784744bd0453431eb56c0 | PHP | animais-de-rua/animais-de-rua | /app/Helpers/EnumHelper.php | UTF-8 | 700 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
use Config;
class EnumHelper
{
public static function get($name)
{
return Config::get("enums.$name");
}
public static function values($name, $join = null)
{
$data = array_values(self::get($name));
return $join ? join($join, $data) : $data;
... | true |
afbe93a308ca146310f784c674a55b63f9c01ea3 | PHP | lowtone/lowtone | /util/buildables/buildable.class.php | UTF-8 | 547 | 2.59375 | 3 | [] | no_license | <?php
namespace lowtone\buildables;
use lowtone\util\options\Options;
/**
* @author Paul van der Meijs <code@lowtone.nl>
* @copyright Copyright (c) 2011-2012, Paul van der Meijs
* @license http://wordpress.lowtone.nl/license/
* @version 1.0
* @package wordpress\libs\lowtone\buildables
*/
abstract class Buildable... | true |
6186a10f353bab24bafa11d0448129b111e3ae60 | PHP | Yongsanzip/figleaf | /database/migrations/relation/2019_09_23_065103_add_look_books_to_look_book_images_table.php | UTF-8 | 817 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddLookBooksToLookBookImagesTable extends Migration
{
/**
* 룩북 이미지 테이블과 룩북 테이블의 관계 형성
*
* @return void
*/
public function up()
{
Schema::ta... | true |
0b347d393115b17722b40cb48448823f4c45f35c | PHP | defadels/pertemuanTerakhir-master | /pertemuanTerakhir-master/admin/tambahmenu.php | UTF-8 | 1,597 | 2.8125 | 3 | [] | no_license | <h2>Tambah Menu</h2>
<hr>
<form method="POST" enctype="multipart/form-data">
<div class="form-group">
<label>Nama Menu</label>
<input type="text" name="nama_menu" class="form-control">
</div>
<div class="form-group">
<label>Harga Menu</label>
<input type="number" name="harga_menu" class="form-contro... | true |
aa4bc127685808ce9869acc7cd7273bf9c6cc530 | PHP | paul-gilliard/Service_stockage | /miniprojet-l3-2020-paul-gilliard-dev/src/Entity/mkdir.php | UTF-8 | 217 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Entity;
class mkdir
{
protected $nameDir;
public function getnameDir(): ?string
{
return $this->nameDir;
}
public function setnameDir(string $nameDir): void
{
$this->nameDir = $nameDir;
}
} | true |
9f05bd611f0ae839b51c7b83c32364024c2bb209 | PHP | nicolasros/saferpay-paypage-sdk-php | /src/Common/Fields/BillingAddress.php | UTF-8 | 6,596 | 2.6875 | 3 | [] | no_license | <?php
namespace Worldline\Saferpay\Common\Fields;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* Class BillingAddress
* @package Worldline\Saferpay\Common\Fields
*/
class BillingAddress
{
/**
* @Groups("RequestParams")
* @var null|string
*/
private $FirstName;
... | true |
827acaed5a740f472926b5556eb5f9bddf29899d | PHP | epfl-dojo/PHP-CRUD | /delete.php | UTF-8 | 359 | 2.71875 | 3 | [] | no_license | <?php
$id = $_GET['id'];
try {
$dbh = new PDO('mysql:host=localhost;dbname=DojoCRUD', "root", "password");
if (isset($id)) {
$dbh->exec("DELETE FROM Article WHERE id = $id;");
}
else {
echo "No id was found !";
}
$dbh = null;
} catch (PDOException $e) {
print "Error!: " . $e->get... | true |
33554d73995230047e464e8bcdef190dd82a51ce | PHP | Bassil-ali/Design-patterns-php | /Behavioral/Visitor/Covid19Traveler.php | UTF-8 | 1,094 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace Behavioral\Visitor;
class Covid19Traveler implements VisitorInterface
{
private $traveler;
private $pcr;
private $covidPass;
public function __construct(Traveler $traveler, bool $pcr, bool $covidPass)
{
$this->traveler = $traveler;
$this->pcr = $pcr;
$th... | true |
7622e5da35c58f2b101333abce063cebaec742b6 | PHP | dknow2003/duck_project | /app/Http/Requests/ServerRequest.php | UTF-8 | 1,495 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class ServerRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules... | true |
8eb39bb38c51145f829a3c091bc3b45abe712874 | PHP | Gaonuk/SplinterApp | /Sites/consultas/consultas_impar/consulta_dinero_hoteles.php | UTF-8 | 792 | 2.734375 | 3 | [] | no_license | <?php include('../templates/header.html'); ?>
<body>
<?php
#Llama a conexión, crea el objeto PDO y obtiene la variable $db
require("../config/conexion.php");
$F1 = $_POST["F1"];
$F2 = $_POST["F2"];
$query = "SELECT usuarios.uid, SUM(destinos.precio) FROM usuarios, tickets, destinos WHERE usuarios.uid = ti... | true |
021da61ef70dfa40077c0cdf943bc13262d2f642 | PHP | ebr00ks/pimcore | /pimcore/models/Tool/TmpStore.php | UTF-8 | 3,888 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Pimcore
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.pimcore.org/license
*
* @category Pimcore
* @package Tool
* @copyr... | true |
1ac3d9ea223ee6dab552d6f85547a6e7ad428362 | PHP | mtulian/egfinal | /system/utils/Mailer.php | UTF-8 | 1,529 | 2.8125 | 3 | [] | no_license | <?php
require_once $_SERVER["DOCUMENT_ROOT"].'/system/lib/phpmailer/class.phpmailer.php';
require_once $_SERVER["DOCUMENT_ROOT"].'/system/lib/phpmailer/class.smtp.php';
class Mailer{
private $mailer;
function __construct(){
$mail = new PHPMailer(); // create a new object
... | true |
117e2749c560ea3d8e500e67ff50434362ddc749 | PHP | OlegPoljakov/Simple_PHP_Shop | /addreview.php | UTF-8 | 522 | 2.546875 | 3 | [] | no_license | <?php
include_once 'config/init.php';
$consumer = new Consumer;
$toy_id = $_POST['toyid'];
echo "hello!";
if (isset($_POST)){
echo "fff";
$data=array();
$data['toyid']=$_POST['toyid'];
$data['review']=$_POST['review'];
$data['consumername']=$_POST['consumername'];
$data['numofstars']=$_POST['numofstars'];
... | true |
b7f01fda9c76f41d24b9c728dbf7e0ec01971e88 | PHP | Finnology/oro-platform | /src/Oro/Bundle/EmailBundle/Mailer/Checker/SystemConfigConnectionChecker.php | UTF-8 | 1,299 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Oro\Bundle\EmailBundle\Mailer\Checker;
use Oro\Bundle\EmailBundle\Mailer\Transport\SystemConfigTransportRealDsnProvider;
use Symfony\Component\Mailer\Transport\Dsn;
/**
* Checks connection for "oro://system-config" DSN.
*/
class SystemConfigConnectionChecker implements ConnectionCheckerInterface
{
... | true |
9387e4db8eeccf4a8bf9f4a0fd7a93ba0cb2b751 | PHP | micki10/CompraVendi.it | /CompraVendi.it/php/login_request.php | UTF-8 | 1,343 | 2.765625 | 3 | [] | no_license | <?php
$username = $_POST['username'];
$password = $_POST['password'];
$errorMessage = login($username, $password);
if($errorMessage === null)
header('location: ../index.php?login=true');
else
header('location: ../pages/login.php?errorMessage=' . $errorMessage );
function login($username, $passwor... | true |
b139907138dc4918fdbd0182202f1470d3baa27d | PHP | gmesnard/ffeeeedd | /tag.php | UTF-8 | 4,373 | 2.609375 | 3 | [
"MIT",
"CC-BY-3.0"
] | permissive | <?php
/**
* Page d’archive d’un mot-clé
* @author Gaël Poupard
* @link www.ffoodd.fr
*
* En savoir plus : http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage ffeeeedd
* @since ffeeeedd 1.0
*
* @note Si la balise <p> de la description vo... | true |
d364f445b94c6460d9242e5909f64b6d3a24929b | PHP | fitorec/manual_php | /codigos/cap08/factory.php | UTF-8 | 1,002 | 3.328125 | 3 | [] | no_license | <pre>
<?php
/*
* Patron Factory
*/
class BD{
function mensaje(){ echo "\nfuncion de prueba\n"; }
}
class Modelo{}
class Controlador{}
class Fabrica
{
//protected
private static $data;
public function __construct()
{
if(is_null(self::$data) )
self::$data = array();
}
function agregar($objeto) {
if(! a... | true |
c65f6370c4b9c7bbbed622e00dc8c656911fd4ec | PHP | hashshura/line-bot-tutorial | /handler/calculate.php | UTF-8 | 480 | 2.90625 | 3 | [] | no_license | <?php
use \LINE\LINEBot\MessageBuilder\TextMessageBuilder as TextMessageBuilder;
function calculate($query, $userId){
if ($query == null){
$result = new TextMessageBuilder("MathJS Calculator\n\nUsage:\n/calculate (query)\n\nExample:\n/calculate (3e+2i)*(2e-3i)");
} else {
$query = urlencode($quer... | true |
461542952a535a227d8b45ca4981a001b7b52e76 | PHP | am1970/test-tamagochi | /app/Models/UserAnimalAttribute.php | UTF-8 | 1,363 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class UserAnimalAttribute
*
* Properties
* @property integer $id
* @property integer $user_animal_id
* @property integer $attribute_id
* @property integer $value
* @property Carbon $updated_at
* @property Carbon $cr... | true |
2776e87282cac972184209d75ae8fc2b38ebf9d7 | PHP | spiceup-it/Login-System---PHP | /login.php | UTF-8 | 3,918 | 2.8125 | 3 | [] | no_license | <?php
session_start();
//check if the user is loggedin, if not the redirect him to login page
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] == true){
header("location: welcome.php");
exit;
}
require_once('./includes/config.php');
$username = $password = "";
$u... | true |
97782eeb7fc8e7e631596634631cedd526ab2edf | PHP | ipunkt/rancherize | /app/Blueprint/PublishUrls/PublishUrlsYamlWriter/PublishUrlsYamlWriterVersion.php | UTF-8 | 516 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace Rancherize\Blueprint\PublishUrls\PublishUrlsYamlWriter;
use Rancherize\Blueprint\PublishUrls\PublishUrlsExtraInformation\PublishUrlsExtraInformation;
/**
* Interface PublishUrlsYamlWriterVersion
* @package Rancherize\Blueprint\PublishUrls\PublishUrlsYamlWriter
*/
interface PublishUrlsYamlWriterVers... | true |
0f3b65527ec3656257c0bc21b7366bfeec52cff2 | PHP | maxlen/webcrawler | /strategies/SiteBase.php | UTF-8 | 2,703 | 2.828125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: w
* Date: 8.12.16
* Time: 11:21
*/
namespace maxlen\webcrawler\strategies;
use maxlen\webcrawler\Client;
use maxlen\webcrawler\interfaces\CrawlStrategy;
abstract class SiteBase implements CrawlStrategy
{
public $params = [];
public $url;
public $domain;
... | true |
2608a5811b852e81e4c703d8830a292c6351bc3f | PHP | leDebutant/EcoleDuNumFiles | /07_fonctions/12_controleType.php | UTF-8 | 474 | 3.578125 | 4 | [] | no_license | <?php
// On va afficher les fonction qui se charge
// de controler le type des variables
$var = 4;
$r = is_numeric($var); // renvera un booleen -> float, int
$r = is_int($var); // vérifie si entier
$r = is_float($var); // vérifie si un décimal
$r = is_string($var); // vérifie si c'est une chaine
$r = is_bool($var); //... | true |
d9c9385d3d2cb63bda0876e98920a52a85c8ae51 | PHP | federicojaime/jonyfood | /appcalls/addvoto.php | UTF-8 | 1,531 | 2.59375 | 3 | [] | no_license | <?php
header('Access-Control-Allow-Origin: *');
require_once("../core/init.php");
$resp = new stdClass();
$resp->err = 0;
$resp->msg = array();
$postdata = @json_decode(file_get_contents("php://input"));
foreach($postdata as $key => $value) {
$_POST[$key] = $value;
}
$validate = new Validate();
if(!$valid... | true |
1d3c58c6f2e41f42d25e7aa92aab64f1f68e65b2 | PHP | SierraTecnologia/Population | /src/Models/Components/Productions/Stage.php | UTF-8 | 1,111 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Population\Models\Components\Productions;
/**
* Tipos de Produções
*/
use Pedreiro\Models\Base;
class Stage extends Item
{
protected $table = 'production_stages';
/**
* Esboço
*
* @var array
*/
public static $ESBOCO = 1;
/**
* Criando História
*
... | true |
068bea0b03f29861868bcb2294705d862acae850 | PHP | alwaysblank/schemer | /src/Iterator.php | UTF-8 | 401 | 3.0625 | 3 | [] | no_license | <?php
namespace AlwaysBlank\Schemer;
class Iterator
{
public static function iterate(callable $callable, array $array): array
{
foreach ($array as $key => &$value) {
$value = $callable($key, $value);
if (is_array($value)) {
$value = static::iterat... | true |
edcea2c3d668e19e346d309d8f7ee8c88ddf8765 | PHP | jjorgosogarcia/word4pics2 | /clases/Utilidades.php | UTF-8 | 3,083 | 2.953125 | 3 | [] | no_license | <?php
class Utilidades {
function removeDirectory($path) {
$path = rtrim(strval($path), '/');
$d = dir($path);
if (!$d)
return false;
while (false !== ($current = $d->read())) {
if ($current === '.' || $current === '..')
continue;
... | true |
7cd9aa2285a881d8aa76d3c93baab14416a38eb9 | PHP | tim33-23/TestOne | /Service/CheckValidationData.php | UTF-8 | 1,483 | 2.84375 | 3 | [] | no_license | <?php
require_once ("../Exceptions/ValidationException.php");
require_once ("../dto/User.php");
require_once ("../dto/Ticket.php");
class CheckValidationData
{
function checkPassword($firstPassword, $secondPassword, $email){
$newUser = null;
if($firstPassword===$secondPassword){
$newUs... | true |
9aef752f347567923d60570bda73ffcb797b7c68 | PHP | vossarat/raids | /app/Http/Controllers/MailController.php | UTF-8 | 1,685 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class MailController extends Controller{
public function testsend()
{
$mail = new \PHPMailer(true); // notice the \ you have to use root namespace here
try{
$mail->isSMTP(); // tell to use smtp
$mail->CharSet = "utf-8"; // set charse... | true |
e4bc2f4909195ceb0952a46d6a9bcea4f62a0a51 | PHP | Abinesh-g/student | /DB_tablecreation.php | UTF-8 | 1,503 | 2.671875 | 3 | [] | no_license | <?php
$con=mysqli_connect('localhost','root','');
if($con)
{
//echo nl2br( "\n server connected");
}
else
{
echo nl2br("\n server not connected");
}
if(mysqli_select_db($con,'r17'))
{
//echo nl2br("\n db connected ");
}
else
{
echo nl2br("\n db not connected");
}
$sql="CREATE TABLE itsem1 (subcode var... | true |
2e7ecbbae7ff8fcb4278e32afc338e6c230ff40f | PHP | Rvjonh/CrudWithPHP | /signup.php | UTF-8 | 3,383 | 2.59375 | 3 | [] | no_license | <?php
require "database.php";
$message = "";
if(!empty($_POST["nombre"]) && !empty($_POST["apellido"]) && !empty($_POST["telefono"]) && !empty($_POST["cedula"]) && !empty($_POST["correo"]) && !empty($_POST["contrasena"])){
$sql = "INSERT INTO users (nombre, apellido, cedula, telefono, corre... | true |
99205a6ab566c1fc34c9b6bb0ba1f870e72a4f84 | PHP | furkankartal29/framework | /src/Conversation/Activators/Attachment.php | UTF-8 | 1,288 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace FondBot\Conversation\Activators;
use FondBot\Contracts\Activator;
use FondBot\Events\MessageReceived;
use FondBot\Templates\Attachment as Template;
class Attachment implements Activator
{
protected $type;
protected function __construct(string $type = null)
{
... | true |