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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6353f74d08b71a07bd26a91d5c7ddb729b83df6e | PHP | gepopp/wp-linkedin-api-login-share-logged | /classes/Token.php | UTF-8 | 3,210 | 2.6875 | 3 | [] | no_license | <?php
namespace LIOAUTH_Classes;
use Carbon\Carbon;
class Token {
const TABLE_NAME = 'linkein_oauth_token';
public $access_token;
protected $expires_in;
public $linkedin_id;
public $name;
public $email;
protected $code;
public function __construct($code) {
$this->code = $code;
if(!$thi... | true |
e0f40a504c1b8d7bea8c2de6f88b16da72dd1090 | PHP | pimenlabs/EcommerceAndroidApp | /Php Code Admin/ecommerce/api/get-menu-data-by-category-id.php | UTF-8 | 1,357 | 2.578125 | 3 | [] | no_license | <?php
include_once('../includes/connect_database.php');
include_once('../includes/variables.php');
if(isset($_GET['accesskey']) && isset($_GET['category_id'])) {
$access_key_received = $_GET['accesskey'];
$category_ID = $_GET['category_id'];
if(isset($_GET['keyword'])){
$keyword = $_GET['keyword'];
... | true |
92fbfa0d135a194e014c0ebaaaf9bf7db0c6db5f | PHP | browscap/browscap | /src/Browscap/Generator/BuildGenerator.php | UTF-8 | 3,462 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Browscap\Generator;
use Assert\AssertionFailedException;
use Browscap\Data\Factory\DataCollectionFactory;
use Browscap\Writer\WriterCollection;
use DateTimeImmutable;
use Exception;
use InvalidArgumentException;
use Psr\Log\LoggerInterface;
use ZipArchive;
use function file_... | true |
3c7dedef20e9d56f6f9839786252f1c7ec2c832d | PHP | artgaspard/camagru | /model/image.class.php | UTF-8 | 2,469 | 2.875 | 3 | [] | no_license | <?php
if(!isset($_SESSION))
session_start();
class Image
{
public $id;
public $user_login;
public $image_name;
public $image;
public $image_type;
public function __construct($data)
{
if(is_array($data))
{
if(isset($data['id']))
$this->id = $data['id'];
if(isset($data['user_login']))
$this->u... | true |
4d0eb31793bb532c080cf0b63b3a02cdfd0e3286 | PHP | mrferos/chute | /src/Chute/Distributor/SequentialDistributor.php | UTF-8 | 782 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Chute\Distributor;
use Chute\MapReduce;
use Chute\ResultSet\ArraySet;
use Traversable;
/**
* Distributor used for testing only. It Runs every "chunk" in iteration.
*
* @package Chute
*/
class SequentialDistributor extends AbstractDistributor
{
/**
* {@inheritDoc}
*/
public funct... | true |
207ddba17427e93493cccc7337c0e9a1f8f6609c | PHP | chenlu772/ForSolr | /BaseModel.php | UTF-8 | 3,166 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: chen
* Date: 2016/6/3
* Time: 16:58
*/
class BaseModel{
private static $client = NULL;
public $solr = NULL;
public function __construct($config){
if(self::$client === NULL){
self::$client = new Solarium\Client($config);
}
$t... | true |
6a2f7961c962f3fd5d928b38c80b73d097b5b92e | PHP | Gignite/the-cure | /classes/TheCure/Relations/RemoveRelation.php | UTF-8 | 538 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Remove relation interface
*
* @package TheCure
* @category Relation
* @category Relationship
* @category Attribute
* @copyright Gignite, 2012
* @license MIT
*/
namespace TheCure\Relations;
use TheCure\Container;
use TheCure\Models\Model;
interface RemoveRelation {
/**
* Rem... | true |
bcab4daff88b58fe3db42da007266567e0995d31 | PHP | TChenQuan/shadowsocks-panel | /Library/Helper/Mailer/Mail.php | UTF-8 | 1,599 | 2.703125 | 3 | [] | no_license | <?php
/**
* Project: shadowsocks-panel
* Author: Sendya <18x@loacg.com>
* Time: 2016/3/31 22:34
*/
namespace Helper\Mailer;
use Contactable\Mailer;
use Helper\Option;
use Model\Mail as MailModel;
/**
* Class Mail
* @description 通过 PHP 的 Mail() 函数发送邮件
* @package Helper\Mailer
*/
class Mail implements Mailer ... | true |
bdcadde73cc64faeeaf8043baecbb00600248286 | PHP | MuhZubairAli/db_sync | /Scan.php | UTF-8 | 3,405 | 2.78125 | 3 | [] | no_license | <?php
require_once 'Db.php';
class Scan
{
protected $src_db;
protected $dest_db;
protected $map;
protected $target;
public function __construct($cons, &$db_map, $target)
{
$this->src_db = new Db(
$cons['source']['server'],
$cons['source']['user'],
$co... | true |
227f503fff21f6303f1993a6eff2d94b2d59147b | PHP | Demontie/telzir | /backend/tests/AreaCodeRepository.php | UTF-8 | 349 | 2.5625 | 3 | [] | no_license | <?php
namespace SRC\Test;
use SRC\Domain\CallCost\GetAreaCodeDataById;
class AreaCodeRepository implements GetAreaCodeDataById
{
public function findCodeById(int $id): string
{
$array = [
1 => '011',
2 => '016',
3 => '017',
4 => '018'
];
... | true |
c7ce21dbe4ee94e7fdf6616182be204a074917a5 | PHP | KevinPDunbar/JobApp | /validateJob.php | UTF-8 | 510 | 2.71875 | 3 | [] | no_license | <?php
function echoValue($array, $fieldName) {
if (isset($array) && isset($array[$fieldName])) {
echo $array[$fieldName];
}
}
function validate(&$fdata, &$errorMessages) {
$input_method = INPUT_POST;
$fdata['jobTitle'] = filter_input($input_method, "jobTitle", FILTER_SANITIZE_STRING);
... | true |
9970d0fbae49170a0573418df6cfedfc95f9290b | PHP | jwerre/Launchpad | /lib/navigation.class.php | UTF-8 | 11,377 | 2.984375 | 3 | [] | no_license | <?php
/**
*
*/
class Navigation
{
/**
* The base tags
* @var string = 'ul'
**/
public $nav_tag = 'ul';
/**
* The child tags
* @var string = 'li'
**/
public $child_tag = 'li';
/**
* The class used for the root of the nav
* @var string = 'nav'
**/
public $root_class = "nav";... | true |
12d266b3438cf48331c9753cbaadbfbffcd0fd57 | PHP | AATEKABANU/tuneshare | /view.php | UTF-8 | 370 | 2.640625 | 3 | [] | no_license | <?php session_start(); ?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title> lab8 </title>
</head>
<body>
<h3> Aateka's lab 8 </h3>
<?php
if (isset($_SESSION['name'])) {
echo "<p> Hello " . $_SESSION['name'] . "!";
} else {
echo "<p> Hello! ";
}
?>
<a href... | true |
f830a5a964a56a4d81580d659b97fed078005249 | PHP | Marko82/cms_admin | /app/Http/routes.php | UTF-8 | 2,615 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond ... | true |
ac92be7c5d4b33c24659b8c6947ad56bb3f0f4cc | PHP | Niewidzialny84/PZ_Project | /PHPClient/index.php | UTF-8 | 588 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
require_once('headerParser.php');
if((isset($_SESSION['logged'])) && ($_SESSION['logged']==true))
{
header('Location: main.php');
exit();
}
?>
<html>
<head>
<title>Test</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<form action="login.php" m... | true |
77d29e8880145efc5f247f4be46c76aa58d51cea | PHP | ssegers/-2018-ReizenTechnologie | /app/Http/Controllers/RegisterController.php | UTF-8 | 21,560 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Mail\RegisterComplete;
use App\Payment;
use App\Traveller;
use App\TravellersPerTrip;
use App\User;
use App\Trip;
use App\Study;
use App\Major;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support... | true |
fc31325a460d3864f6090835beedbfb107b685e5 | PHP | KVINTH/phpCMS | /web/post.php | UTF-8 | 5,295 | 2.625 | 3 | [] | no_license | <?php
// Using the CaptchaBuilder
use Gregwar\Captcha\CaptchaBuilder;
require 'connect.php';
// Requires the composer vendor autoload.php
require_once __DIR__ . '/../vendor/autoload.php';
session_start();
if ($_GET != null)
{
$query = "SELECT * FROM posts where PostID = :id LIMIT 1";
$statement = $db->prepare... | true |
198c20a36283ac8034337fcb44e82be13a7637b0 | PHP | joeborysko/hop | /src/hop/src/elements/instances/Option.php | UTF-8 | 2,170 | 3.109375 | 3 | [
"Unlicense"
] | permissive | <?php
namespace hop\elements\instances;
require_once __DIR__ . "/../HtmlElement.php";
/**
* In a Web form, the HTML <code><option></code> element is used to create a
* control representing an item within a <code><select></code>, an
* <code><optgroup></code> or a <code><datalist></code> HTML5 element.
*/
class Op... | true |
16c26c3c0d4293da65d226db3ef778e54ed2133a | PHP | Geryon/gallery | /docs/nuke-mod/include/add-note.php | UTF-8 | 1,760 | 2.625 | 3 | [] | no_license | <?php
if (!isset ($included)) {
die ('Must be included');
}
$username = isLoggedIn ();
if ($username === false) {
print 'You must register and/or login to add a note';
exit;
}
$modPage = 'modules.php?op=modload&name=GalleryDocs&file=index&action=add-note';
if (isset ($_POST['submit'])) {
$errors = '';
if (empt... | true |
fa4780530e350b58f952c23dd725e36254a77201 | PHP | Gamingpc/platform | /src/Core/Content/Media/Aggregate/MediaTranslation/MediaTranslationCollection.php | UTF-8 | 1,637 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | <?php declare(strict_types=1);
namespace Shopware\Core\Content\Media\Aggregate\MediaTranslation;
use Shopware\Core\Framework\DataAbstractionLayer\EntityCollection;
/**
* @method void add(MediaTranslationEntity $entity)
* @method void set(string $key, MediaTranslationEn... | true |
8d45a9e95785f9b89e5870b6ce89613590f57d81 | PHP | zs425/accommfzf2 | /module/Travel/src/Travel/Entity/Flag.php | UTF-8 | 2,443 | 2.609375 | 3 | [] | no_license | <?php
namespace Travel\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Flags
*
* @ORM\Table(name="flags")
* @ORM\Entity
*/
class Flag
{
/**
* @var integer
*
* @ORM\Column(name="flag_id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
p... | true |
31c0030c87ea85b6c29bfc31473b07a25b4771a2 | PHP | WAERZ/waerzone | /core/classes/context.php | UTF-8 | 725 | 3.1875 | 3 | [] | no_license | <?php
class Context
{
private static $instance = null;
public static function init()
{
if (is_null(self::$instance)) {
self::$instance = new self();
}
return self::$instance;
}
private function __construct(){}
private function __clone(){}
/**
* This... | true |
0dd5a5287e93e1c810c4eddacdb4ef9e12392e72 | PHP | Rafeldo/Business-Directory | /application/modules/user/models/post_model_core.php | UTF-8 | 6,211 | 2.625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* BusinessDirectory admin Controller
*
* This class handles user account related functionality
*
* @package User
* @subpackage UserModelCore
* @author webhelios
* @link http://webhelios.com
*/
class Post_model_core extends CI... | true |
dda03f6f1aa793371de1ac96f182cd28e069aa96 | PHP | pramindanata/oop-php | /advanced/classes/People.php | UTF-8 | 437 | 3.875 | 4 | [] | no_license | <?php
namespace Classes;
/**
* People class
*/
class People
{
public $person1 = "Mike";
public $person2 = "Shelly";
public $person3 = "Jeff";
protected $person4 = "John";
private $person5 = "Jen";
/**
* Iterate Object
*
* @return void
*/
public function iterateObject... | true |
d84188f511838facba4313f37e543f00c87fa278 | PHP | farancheema/M2__-SalesOrdersGrid_Custom_Column | /salesOrder/salesOrderModule/Observer/adminObserver.php | UTF-8 | 1,626 | 2.59375 | 3 | [] | no_license | <?php
namespace salesOrder\salesOrderModule\Observer;
use Magento\Framework\Event\ObserverInterface;
class adminObserver implements ObserverInterface
{
protected $_connection;
protected $_authSession;
public function __construct(\Magento\Backend\Model\Auth\Session $authSession)
{
//Observer init... | true |
ec9dffdeba5da981bf24731f377dd657764615e0 | PHP | yaosine/CMI | /cmi.php | UTF-8 | 4,645 | 2.65625 | 3 | [] | no_license | <?php
/**
* Common Module Interface
*
* 公用模块接口
*
* @copyright (c) 2009-2014 Yaosine.com
* @author yaosine@gmail.com
*
*/
include('./configs/cmi.php');
class cmi{
/**
* 构造函数
* @param string [[模块名1][,模块名2][,模块名...]]
* @return void
*/
function cmi(){
$args = func_get_args();
foreach($args as $m) ... | true |
8f1a316e6b18141a9eef7c919408ec4cbde37413 | PHP | Matoo125/m4mvc | /src/core/Model.php | UTF-8 | 4,574 | 3.015625 | 3 | [] | no_license | <?php
namespace m4\m4mvc\core;
use m4\m4mvc\helper\Query;
use m4\m4mvc\helper\Image;
abstract class Model
{
// Db credentials array
public static $credentials;
// Db adapter string
public static $adapter = 'mysql';
// Query helper object
public $query;
// DB connection object
public $db;
public f... | true |
e5826d953bcf1831a2237e4121049bf42dae5e66 | PHP | tanya-0708/APT567 | /Assignments/includes/functions.inc.php | UTF-8 | 4,552 | 2.671875 | 3 | [] | no_license | <?php
function qpType($conn)
{
$sql = "SELECT * from question_paper_type;";
$stmt = mysqli_stmt_init($conn);
if (!mysqli_stmt_prepare($stmt, $sql)) {
header("location: ../add_res_template.php?error=stmtfaileduid");
exit();
}
mysqli_stmt_execute($stmt);
$resultData = mysqli_stmt_get_result($stm... | true |
9cb1ef83e4644c0a395523d2684722688bbe4dbb | PHP | MallekSkander/recipe-Website | /Views/modifierLivraison.php | UTF-8 | 3,486 | 2.703125 | 3 | [] | no_license | <?php
include "..\controller\LivraisonC.php";
include_once '..\model\Livraison.php';
$livraisonC = new LivraisonC();
$error = "";
if (
isset($_POST["nom"]) &&
isset($_POST["prenom"]) &&
isset($_POST["num_tel"]) &&
isset($_POST["adresse"])
){
if (
!empty($_POS... | true |
b1117ee03aa0bf91c7bd3d7b84406fc044964b88 | PHP | sonhoai27/validation | /src/Validation/ValidationException.php | UTF-8 | 198 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Validation;
class ValidationException extends \Exception
{
/**
* @return string
*/
public function __toString()
{
return $this->getMessage();
}
}
| true |
27d7eee282aed053ea4c0de76a431100abfdde63 | PHP | AlexeyAulov/Wine-Project | /All_Pages/Controller/Catalog.inc.php | UTF-8 | 1,501 | 2.859375 | 3 | [] | no_license | <?php
include_once "Includes/dbconnect.inc.php";
//include_once "Controller\add_cart.inc.php";
$pagerows=3;
if ((isset($_GET['page'])&& is_numeric($_GET['page']))){
$current_page=htmlspecialchars($_GET['page']);
}else{
$current_page=1;
}
$start=($current_page-1)*$pagerows;
//Ju... | true |
c784fcdbc3e6dcb18ac12754a5219a9f9d7cade4 | PHP | FacuVision/WE_Progrmacion_clases_manejo_2020 | /BEAN/AlumnoBean.php | UTF-8 | 1,336 | 2.921875 | 3 | [] | no_license | <?php
class AlumnoBean{
private $id_alumno;
private $alum_nombre;
private $alum_aplellido;
private $alum_telefono;
private $alum_correo;
private $alum_estado;
private $alum_estado_pago;
public function getId_alumno(){
return $this->id_alumno;
}
public function setId_alumno($id_alumno){
$this->id_alumn... | true |
b5d0ef32958a9f8993ec25a511fbe0b72b784fc6 | PHP | shilpabharamanaik/shilpazend3Fisdap | /packages/fisdap/ascend-greatplains-php-sdk/src/Models/Address.php | UTF-8 | 6,501 | 3.21875 | 3 | [] | no_license | <?php namespace Fisdap\Ascend\Greatplains\Models;
use Fisdap\Ascend\Greatplains\Contracts\Address as AddressInterface;
use Fisdap\Ascend\Greatplains\Contracts\InternetAddressCollection;
/**
* Class Address
*
* Object representing an individual address in great plains
*
* @package Fisdap\Ascend\Greatplains\Models... | true |
538b27b9b38b36186ab1089999da006a68e6f020 | PHP | MichalYosef/OOP-with-PHP | /hw/dbManipulate.php | UTF-8 | 2,191 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | <?php
// Connect to database
class dbManipulate
{
private $host = '127.0.0.1';
private $db = 'northwind';
private $user = 'root';
private $pass = '';
private $charset = 'utf8';
private $pdo;
private $dsn = 'mysql:host=$host;dbname=$db;charset=$charset';
private ... | true |
8917fa3d6f7c87f0c15ecb3ba376c2721491f47c | PHP | pogbewi/seasonofjubilee | /database/migrations/2018_02_13_151739_add_row_to_testimonies_table.php | UTF-8 | 927 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddRowToTestimoniesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('testimonie... | true |
526abebe24a9d20fb4861e14042b813e9e1ded14 | PHP | BESTTROIKA/FCreate3 | /database/migrations/2021_03_05_011004_create_animals_table.php | UTF-8 | 964 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAnimalsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('animals', funct... | true |
8480d152501a12f7f7c4675f2772d1d4d2060c2a | PHP | yii1tech/di | /src/Injector.php | UTF-8 | 4,930 | 2.84375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace yii1tech\di;
use Closure;
use InvalidArgumentException;
use Psr\Container\ContainerInterface;
use ReflectionClass;
use ReflectionFunction;
use ReflectionFunctionAbstract;
use ReflectionIntersectionType;
use ReflectionNamedType;
use ReflectionType;
use ReflectionUnionType;
/**
* Injector is able to a... | true |
2d4f532ea7163eaa45c3948099e4d7dbff4e66b6 | PHP | SergeyMikolov/seosite | /tests/Unit/Services/Config/Factories/DBConfigsFactory.php | UTF-8 | 1,269 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare( strict_types = 1 );
namespace Tests\Unit\Services\Config\Factories;
use App\Services\Config\lib\Items\DBConfigs;
use App\Services\Config\lib\Mappers\DBConfigsMapper;
use Tests\Library\Factories\AbstractFactory;
/**
* Class DBConfigsArrayFactory
* @package Tests\Unit\Services\Config\Factories
*/
cl... | true |
9d1cfd1d030a0e28be038c5e02af6e587dddc1b1 | PHP | AntoineGiraud/slimAuthApp | /src/CoreHelpers/RouteHelper.php | UTF-8 | 3,118 | 2.8125 | 3 | [] | no_license | <?php
namespace CoreHelpers;
/**
* A Helper class for links in view pages
*/
class RouteHelper {
public $app;
public $request;
public $response;
public $Auth;
public $flash;
public $publicPath;
public $curPageUri;
public $curPage;
public $curPageBasePath;
public $curPageBaseU... | true |
4cd09f5eda59f2878dc7146736a7f25ae03d58bc | PHP | Lizii/Calibracion | /RESOURCES/A/ModificarUsuarios.php | UTF-8 | 1,564 | 2.546875 | 3 | [] | no_license | <?php
require("index.php");
include_once ("iniciar.php");
if($_SESSION['Tipo_Usuario']=='Administrador')
{
?>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/estilos... | true |
625a4a7b94df76b5cc333b1821e084f61c787cb8 | PHP | subit-io/php-expo-sdk | /tests/ExpoMessageTest.php | UTF-8 | 1,306 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Subit\ExpoSdk\Tests;
use Subit\ExpoSdk\Exceptions\InvalidNotificationDataException;
use Subit\ExpoSdk\Exceptions\NotAValidPriorityException;
use Subit\ExpoSdk\ExpoMessage;
use Subit\ExpoSdk\Priority;
class ExpoMessageTest extends TestCase
{
public function testExpoMessageValidPriority()
{
... | true |
36f71c7a8e7c20f35902b1afcee91393cc377ac4 | PHP | Automattic/phabricator | /src/applications/pholio/storage/PholioTransaction.php | UTF-8 | 10,515 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
final class PholioTransaction extends PhabricatorApplicationTransaction {
public function getApplicationName() {
return 'pholio';
}
public function getApplicationTransactionType() {
return PholioPHIDTypeMock::TYPECONST;
}
public function getApplicationTransactionCommentObject() {
return ... | true |
72bffe2dc672c98d7fcee27cccd61c9f844cdd14 | PHP | rubensdellamatta/500-php | /aula03/wrile.php | UTF-8 | 116 | 3.078125 | 3 | [] | no_license |
<?php
echo "<pre>";
$cont = 0;
while ($cont<= 10) {
echo "$cont";
if ($cont == 1) {
$cont++
}
}
| true |
c3a3d5d2d09e258a2d056b8ec55b4f68c8b7258e | PHP | idboubker/PFE-V2 | /upload.php | UTF-8 | 691 | 2.65625 | 3 | [] | no_license | <?php
if($_SERVER['REQUEST_METHOD'] == "POST"){
$myfile = $_FILES['myup'];
$path_to_directory = 'path/';
if (!file_exists($path_to_directory) && !is_dir($path_to_directory)) {
mkdir($path_to_directory, 0777, true);
}
for($i=0;$i<count($myfile['name']);$i++){
copy($myfile['tmp_name'][$i] , $path_to_dir... | true |
f04279ee8eae6ce6e6ca0192d5ed6e019badf47c | PHP | Innologica/yii2-insight-core | /util/GeoNames.php | UTF-8 | 1,172 | 2.84375 | 3 | [] | no_license | <?php
namespace insight\core\util;
use yii\helpers\Json;
/**
* @author Nikolay Traykov
*/
class GeoNames
{
const BASE_URL = 'http://api.geonames.org/';
const USERNAME = 'innologica';
public static function timezone($lat, $lng)
{
if (!$lat) {
return null;
}
... | true |
4eacdf042565645d97127e0a66e1a74359fa9244 | PHP | pazuhin/php_dz3 | /src/functions.php | UTF-8 | 3,220 | 2.890625 | 3 | [] | no_license | <?php
function task1()
{
$xml = simplexml_load_file('src/data.xml');
echo '<pre>';
echo 'Purchase Order : ' . $xml->attributes()->PurchaseOrderNumber . '<br>';
echo 'Order date : ' . $xml->attributes()->OrderDate . '<br>';
foreach ($xml->Address as $address) {
echo 'Address type : ' . $addre... | true |
878b99a1c5fd45e6f79f2444236458c345481b41 | PHP | barthon64/lb | /app/Http/Controllers/Admin/PostsController.php | UTF-8 | 2,875 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers\Admin;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Models\Posts;
use Illuminate\Support\Facades\Auth;
use App\Models\Categories;
use Illuminate\Http\Request;
class PostsController extends Controller {
/**
* Display a listing of resources.
*
* @retu... | true |
292a2b0aaf046c43cff6ee5e500dbd8151674c67 | PHP | oitom/Social-Combat | /app/acessobd/EntidadeAcessoBD.php | UTF-8 | 353 | 2.546875 | 3 | [] | no_license | <?php
include_once FRAMEWORK. 'Conexao.php';
class EntidadeAcessoBD {
protected $tabela;
protected $conexao;
function __construct()
{
$c = new Conexao();
$this->conexao = $c->abrirConexao();
}
public function listarTodos(){
$stmt = $this->conexao->prepare("SELECT * FROM ".$this->tabela);
$stmt->e... | true |
0eb3cbc3e638f613bd87587ddd2dab92b0a01984 | PHP | j-brew/CS-412php | /Admin/admin/phpfiles/concertDelete.php | UTF-8 | 4,129 | 2.828125 | 3 | [] | no_license | <?php
#error_reporting(E_ALL); # supresses error "headers already sent"
#ini_set('display_errors', 'On'); # when user has not selected a check box
$error = "";
if ($_SERVER["REQUEST_METHOD"] == "POST"){
$shows = $_POST['shows'];
if(empty($shows)){
$error .= "<p style=\"color:red;\"... | true |
6ec4d9f5ce83a76edf3959666e515991c59f522d | PHP | wearenotmachines/pdfmaker | /src/Traits/DescribableTrait.php | UTF-8 | 279 | 2.640625 | 3 | [] | no_license | <?php namespace WeAreNotMachines\PDFMaker\Traits;
trait DescribableTrait {
protected $description;
public function setDescription($description) {
$this->description = $description;
return $this;
}
public function getDescription() {
return $this->description;
}
} | true |
2aab258ff63da77af87ea2ab5052c58024a1fbf0 | PHP | Stadly/PasswordPolice | /src/Rule/DictionaryRule.php | UTF-8 | 3,343 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Stadly\PasswordPolice\Rule;
use RuntimeException;
use Stadly\PasswordPolice\CharTree;
use Stadly\PasswordPolice\Formatter;
use Stadly\PasswordPolice\Formatter\Combiner;
use Stadly\PasswordPolice\Rule;
use Stadly\PasswordPolice\ValidationError;
use Stadly\PasswordPolice\WordLi... | true |
0412c861b214c794ab899a5099cb3f65796cf427 | PHP | arichbell/Pizza-App | /factors/tripleFactor.php | UTF-8 | 328 | 2.71875 | 3 | [] | no_license | <?php
/**
* tripleFactor
*
* Triples item price. Provides a 20% discount. Future versions
* will allow for discounting rules to be applied to factors dynamically
* @author Aaron Bell
*
*/
class tripleFactor extends baseFactor {
public function tripleFactor(){
$this->factor = 3 * .8;
$this->description = "t... | true |
47817149df2eeaf133154de27cc80cd9db68828d | PHP | tayyab56789/discount | /add-shop.php | UTF-8 | 13,923 | 2.640625 | 3 | [] | no_license | <?php
include('admin-header.php');
$shop = new Shop();
$values = array(
"shopowner_id" => "'".$_SESSION["user_id"]."'"
);
//["shopowner_id"] = $_SESSION["user_id"];
//echo "<pre>";
//print_r($result);
//echo "</pre>";
if(isset($_POST["add_shop"])){
... | true |
3057f145156ac76361603c20430a579f8a4102da | PHP | joohra/RasPiCar | /Python ja php/move.php | UTF-8 | 385 | 2.75 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors',1);
$file = fopen("./move", "w") or die("Unable to open file!");
if (isset($_GET["move"])){
$move = $_GET["move"];
switch($move) {
case "true":
$txt = "true";
break;
case "back":
$txt = "back";
break;
default:
$txt = "false";
break;
}
} ... | true |
f51c97b261aa4f94718b69f77d7a403245240808 | PHP | newga/newga | /public_html/protected/commands/unsubscribeNotificationEmailsCommand.php | UTF-8 | 4,895 | 2.53125 | 3 | [] | no_license | <?php
/*
* Runs regularly to notify organisations of their invite unsubscribes and include a link to download them
*
*/
// required by Yii
date_default_timezone_set("Europe/London");
class unsubscribeNotificationEmailsCommand extends CConsoleCommand
{
private $runEveryXDays = 1;
private $emailSubject = 'You... | true |
14db99ab743b350e87fd0edbb188d24a3e7ffa44 | PHP | brunopurper/target-trust | /1605850/crud/form-departamentos.php | UTF-8 | 3,765 | 2.71875 | 3 | [] | no_license | <?php
include('verifica-sessao.php');
include('conexao.php');
# agora vamos verificar se veio a variavel id_departamento via GET
# se ela veio é sinal que o usuario clicou no icone do lápis - e deseja editar algum registro
if ( isset($_GET['id_departamento']) ) {
$id_departamento = $_GET['id_departamento'];
# ja q... | true |
802abe8cd1d650a591ea04438a3ad38e65a20dc1 | PHP | MultiCrew/archive | /portal/core.php | UTF-8 | 15,578 | 2.6875 | 3 | [] | no_license | <?php
include 'assets/phpmailer/PHPMailerAutoload.php';
session_start();
class sso {
public function __construct($host,$dbnm,$char,$usnm,$pass) {
$this->db = new PDO('mysql:host='.$host.';dbname='.$dbnm.';charset='.$char, $usnm, $pass);
$this->mail = new PHPMailer;
}
public function log_in($user, $type ,$ve... | true |
2fd4602d7a2eb1c6a91551681e4cb683203a3981 | PHP | iamdevarati/StudentAttendanceSystem | /AttendanceSystem/src/routes.php | UTF-8 | 7,195 | 2.8125 | 3 | [] | no_license | <?php
// Routes
//home
$app->get('/', function ($request, $response, $args) {
// Render index view
return $this->renderer->render($response, 'index.php', $args);
});
//login
$app->post('/login', function ($request, $response, $args) {
// Render index view
$username = $_POST['username'];
$password = $_P... | true |
0528f7138f1b770d6dffc2ac7949ba2f444ace9b | PHP | adrianoaguiar/magento-mongo | /code/Helper/Queue.php | UTF-8 | 4,141 | 2.765625 | 3 | [] | no_license | <?php
/**
* Contains helper methods for adding jobs to the queue and running queued jobs.
*/
class Cm_Mongo_Helper_Queue extends Mage_Core_Helper_Abstract
{
/**
* Add a job to the queue.
*
* @param string $task
* @param array $data
* @param int $priority Optional override for priority
* @param i... | true |
b61935becbf2dc7a6a4740ab5ca44851f3686187 | PHP | dg/apigen | /src/Contracts/Console/IO/IOInterface.php | UTF-8 | 781 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/
namespace ApiGen\Contracts\Console\IO;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Conso... | true |
94c7a015f3c5d455540979371fff02d7ea64c54c | PHP | narruchy/vercel-api | /app/Exports/InformationExport.php | UTF-8 | 403 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromArray;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class InformationExport implements FromArray, WithHeadingRow
{
protected $informations;
public function __construct($informations)
{
$this->informations = $informations;
}
... | true |
ec5a5feef574c2e86ea444b935721399631e3e69 | PHP | culturesofknowledge/site-portal | /omk-baxter/html/plugins/ItemRelations/models/Table/ItemRelationsProperty.php | UTF-8 | 2,446 | 2.609375 | 3 | [
"GPL-3.0-only",
"GPL-3.0-or-later",
"MIT"
] | permissive | <?php
/**
* Item Relations
* @copyright Copyright 2010-2014 Roy Rosenzweig Center for History and New Media
* @license http://www.gnu.org/licenses/gpl-3.0.txt GNU GPLv3
*/
/**
* Item Relations Property table.
*/
class Table_ItemRelationsProperty extends Omeka_Db_Table
{
/**
* Get the default select obje... | true |
6fea709e2ff88bc1464080d9ce40c0d078a44a44 | PHP | s9e/TextFormatter | /src/Configurator/Validators/TagName.php | UTF-8 | 1,371 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package s9e\TextFormatter
* @copyright Copyright (c) 2010-2023 The s9e authors
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
namespace s9e\TextFormatter\Configurator\Validators;
use InvalidArgumentException;
/**
* Tag name rules:
* - must start with a letter or an... | true |
26bb8fa2d621bce0183929b034cdefb445368f87 | PHP | vamshedhar/PayrollManagementSystem | /newer old files/Old files/index.php | UTF-8 | 1,541 | 2.8125 | 3 | [] | no_license | <?php /* Create the option of choosing between GPF and NPS */ ?>
<?php
/* Connecting to the database */
include("dbconnect.php");
/* This query generates the personal details to be used for employee identification */
$emp_query = "select * from empdetails where emp_no = '$_GET[emp_no]'";
$emp_result = mysql_qu... | true |
f501303f13e5ddf3145e5692fa374c27048d8e1e | PHP | ajpadilla/IntelCost | /apps/furniture/frontend/src/Controllers/BaseController.php | UTF-8 | 1,164 | 2.671875 | 3 | [] | no_license | <?php
namespace IntelCost\Apps\Furniture\Frontend\Controllers;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use Twig\Loader\FilesystemLoader;
use Twig\Environment;
use Twig\Extension\DebugExtension;
class BaseController
{
const TEMPLATE_DIRECTORY = "/app/apps/furniture/fr... | true |
1433b9a2bd0e2d7b38b3e5993ad23f85409bba99 | PHP | j-angnoe/bos-player | /tests/200-bos-exec/203-migrate.test.php | UTF-8 | 2,500 | 2.5625 | 3 | [] | no_license | <?php
require __DIR__ . '/../includes.php';
try {
/**
* We are going to test bos-exec migrate features...
*/
// Set up a dummy environment
createFiles([
'mod1/bosModule.json' => json_encode([
'name' => 'Module 1',
'tasks' => [
'migrate' => 'php ... | true |
a349dd1dafff1edb12e4dc28e74adafe816e7575 | PHP | michaeljoelphillips/graphql-demo | /src/Entity/Character.php | UTF-8 | 264 | 2.96875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace GraphQLDemo\Entity;
class Character
{
public string $name;
/** @var array<int, string> */
public array $quotes = [];
public function __construct(string $name)
{
$this->name = $name;
}
}
| true |
cde0791336a218899e606ae6e1cc29579ff648bf | PHP | NekomataGamer/blogBsbClub | /models/Dashboard.php | UTF-8 | 531 | 2.671875 | 3 | [] | no_license | <?php
class Dashboard extends Model{
public function countLeads(){
$array = array();
$sql = "SELECT count(*) as c FROM leads WHERE status = 0";
$sql = $this->db->query($sql);
$array = $sql->fetch();
return $array['c'];
}
public function countClinicas(){
... | true |
1faacff8767f043637071b3a47dce82f3284a101 | PHP | ysyang21/stockDB | /stockXDRQuery.php | UTF-8 | 10,452 | 2.71875 | 3 | [] | no_license | <?php
/*
Filename:
stockXDRQuery.php
Usage:
Descriptions:
This file exports functions to query XDR data
*/
include_once("LIB_log.php");
include_once("LIB_mysql.php");
include_once("stockDayQuery.php");
class xdrData
{
// property declaration
public $date = '';
public $market = '';
... | true |
0e959c46bdcff3a3c5489b14382599056b34ed1d | PHP | Dunstanee/mictecsystem | /add_user.php | UTF-8 | 4,435 | 2.734375 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
include "includes/header.php";
if(isset($_POST["sub"]))
{
$name=$_POST["name"];
$username=$_POST["username"];
$regno=$_POST["regno"];
$position=$_POST["position"];
$course=$_POST["course"];
$gender=$_POST["gender"];
$email=$_POST["email"];
$level=$_POST["level"];
$mobno=$_POST["mobile"];... | true |
5355de5a9ce5722e416ab0f51a890bbd7a9cc838 | PHP | alitalia/xmas2k13 | /xmas.php | UTF-8 | 1,945 | 3.265625 | 3 | [] | no_license | <?php
function bashColor($string, $color='white', $background='black') {
$output = "";
$fgColor['black'] = '0;30';
$fgColor['dark_gray'] = '1;30';
$fgColor['blue'] = '0;34';
$fgColor['light_blue'] = '1;34';
$fgColor['green'] = '0;32';
$fgColor['light_green'] = '... | true |
a4246c4f5cf5af2d0966b10b5df797f0ae5c7752 | PHP | azzy/Foodle | /html/PHPDatabaseStuff/setupPollChoice.php | UTF-8 | 411 | 2.5625 | 3 | [] | no_license | <?php
function setupPollChoice($host,$username, $password, $database, $pollid)
{
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$some_table = "PollChoice".$pollid;
$query="CREATE TABLE $some_table (choiceid int(10) NOT NULL, yelpid varchar(100... | true |
8b8ab810a2c06fb1783caa71b0c1c19e5d9495d6 | PHP | malitta/freqtweets | /Swiftlet/Controllers/Webservice.php | UTF-8 | 1,132 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Swiftlet\Controllers;
/**
* Generic webservice controller
* @author Malitta Nanayakkara <malitta@gmail.com>
*/
class Webservice extends \Swiftlet\Controller
{
/**
* Whether the webservice was executed successfully
*/
protected $success = true;
/**
* Return array if successful
*/
protec... | true |
b2f75a395f286325f572e14aa70f666d992f5112 | PHP | xness/Autoexperto | /php/model/usuario.php | UTF-8 | 721 | 2.84375 | 3 | [] | no_license | <?php
class Usuario extends db
{
public function __construct()
{
parent::__construct();
}
public function checkIfuserExist($id)
{
$this->connect();
$res = $this->consulta("SELECT COUNT(*) AS cantidad FROM usuario WHERE userid = $id");
$this->cerrar();
return $res;
}
publi... | true |
ba345800b6fc4196e3945fbbe09f2cc113e4dcff | PHP | dmitridev/test | /classes/User.php | UTF-8 | 1,553 | 2.984375 | 3 | [] | no_license | <?php
class User
{
private $id = 0;
private $name = '';
private $email = '';
private $key = 'не сгенерирован';
private $photo = 'images/default.png';
private $status = 0;
private $activation_code = '';
public function __construct(array $array)
{
$this->id = $array['id'];
... | true |
dcef5c2b71589dca69fe6bd3f4830414386013e4 | PHP | ryssbowh/pingu-permissions-module | /Traits/HasPermissions.php | UTF-8 | 9,412 | 2.5625 | 3 | [] | no_license | <?php
namespace Pingu\Permissions\Traits;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Collection;
use Permissions;
use Pingu\Permissions\Contracts\Permission;
use Pingu\Permissions\Entities\Permission as PermissionModel;
use Pingu\Permissions\Exceptions\GuardDoesNotMatch;
use Pingu\Permissions\Ex... | true |
8d18d8575ba73afc376b2da4f93eef349da1132a | PHP | thomas66A/MiniForum | /service/login.php | UTF-8 | 1,867 | 2.640625 | 3 | [] | no_license | <?php
session_start();
include("../fonction/securite.php");
include("../fonction/databaseFunction.php");
include("../fonction/diversFonction.php");
if(isset($_POST['email']))
{
$lemail=trim($_POST['email']);
if (controleEmail($lemail))
{
$bon=true;
}
else
{
... | true |
62b6522fd34d3e967c176d92a743c1582c0aeb6d | PHP | AshleyColman/MathsFlip | /MathsFlipProject/includes/playasguest.inc.php | UTF-8 | 2,685 | 3.15625 | 3 | [] | no_license | <?php
if (isset($_POST['submit']))
{
// Starts the session in the website
session_start();
include_once 'dbh.inc.php';
// Generate a random username and password for guest accounts
$username = RandomString();
$password = RandomString();
$email = "Guest@Guest.com";
// Error h... | true |
16f0bf1a8248ea7bc0d670f71d8b1fa591d690b1 | PHP | kinpowoo/mvgeeker | /KeyQuery.php | UTF-8 | 1,211 | 2.609375 | 3 | [] | no_license | <?php
require_once("libs/db/sqli.class.php");
function findONE($column_value){
$config = array('dbhost'=>'127.0.0.1','dbuser'=>'root','dbpsw'=>'3344???a','dbname'=>'imooc','dbcharset'=>'utf8');
$db = new sqli($config);
file_put_contents("log.txt","搜索的关键字".$column_value."\n", FILE_APPEND);
if(empty(... | true |
9f1ad10e41d77a218d6783268a822397d84cab20 | PHP | honeybadger-io/honeybadger-php | /src/HoneybadgerClient.php | UTF-8 | 2,946 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Honeybadger;
use GuzzleHttp\Client;
use GuzzleHttp\RequestOptions;
use Honeybadger\Exceptions\ServiceException;
use Honeybadger\Exceptions\ServiceExceptionFactory;
use Symfony\Component\HttpFoundation\Response;
use Throwable;
class HoneybadgerClient
{
/**
* @var \Honeybadger\Config
*/
... | true |
2110f213e3e70abbf4aa4a3f2ad34dd8af1ca9fa | PHP | jlassiwadii/checkpointphp2018 | /EXERCICE-VAR-CONST-TYPE .php | UTF-8 | 526 | 3.203125 | 3 | [] | no_license | <?php
//mavar =non valide
// $mavar =valide
// $var5 =valide
// $_ mavar =non valide
// $_5var =non valide
// $__élément1=valide
// $hotel4* ? =non valide
$x="PostgreSQL";//"PostgreSQL"
$y="MySQL";//"MySQL"
$z=&$x;//"PostgreSQL"
$x="PHP 5";//PHP 5
$y=&$x;//PHP 5
echo $GLOBALS["x"]; //PHP 5
echo $GLO... | true |
21a5c02d508933623d2b032ce3d87c7b59f0ab44 | PHP | htmlacademy-yii/788313-task-force-1 | /src/Task.php | UTF-8 | 5,220 | 2.90625 | 3 | [] | no_license | <?php
namespace TaskForce;
use TaskForce\action\RespondAction;
use TaskForce\action\UndoAction;
use TaskForce\action\RefuseAction;
use TaskForce\action\DoneAction;
use TaskForce\Exception\TaskException;
class Task
{
private const STATUS_NEW = 'New';
private const STATUS_CANCEL = 'Cancel';
private co... | true |
e9467b9df9a630cea8f6931a14725bfa0435fa36 | PHP | greathector7/cms | /crear_cms1902.php | UTF-8 | 4,628 | 2.734375 | 3 | [] | no_license | <?php
// Colocar Nombre de Cabecera
$page_title = "Crear Usuario";
include_once "header.php";
$fecha = date('Y-m-d H:i:s');
echo $fecha;
?>
<?php
echo "<div class='right-button-margin'>";
echo "<a href='cms1902.php' class='btn btn-default pull-right'>Ver Usuarios</a>";
echo "</div>";
// get database conne... | true |
40b388e1293dd39cdb9ec8d126372a20ad150279 | PHP | iroegbu/Jeeves | /src/BuiltIn/Commands/Uptime.php | UTF-8 | 1,503 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace Room11\Jeeves\BuiltIn\Commands;
use Amp\Promise;
use Room11\Jeeves\Chat\Client\ChatClient;
use Room11\Jeeves\Chat\Message\Command as CommandMessage;
use Room11\Jeeves\System\BuiltInCommand;
use const Room11\Jeeves\PROCESS_START_TIME;
use function Amp\resolve;
use function Ro... | true |
a2e0c646cab93d2e9749efcfbdb92add17d880dd | PHP | VovaIvzhenko/design-patterns-php-practise | /src/Creational/SimpleFactory/Car.php | UTF-8 | 621 | 3.28125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ivzhenko.volodymyr
* Date: 06.05.2019
* Time: 16:44
*/
namespace Creational\SimpleFactory;
/**
* Class Car
* @package Creational\SimpleFactory
*/
class Car
{
/**
* @var string
*/
private $model;
/**
* @var string
*/
private $brand;
/**
* Car construct... | true |
460b1fcf3b8874ec446e83d13ef2e5f6fda3d437 | PHP | itbsStefan/symfttpd | /lib/Symfttpd/Server/Lighttpd.php | UTF-8 | 4,266 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Symfttpd Project
*
* (c) Laurent Bachelier <laurent@bachelier.name>
* (c) Benjamin Grandfond <benjamin.grandfond@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Symfttpd\Server;
use Sym... | true |
f06f3d92eda14d6782493fb8715db30c8d260547 | PHP | batkoivo/project_lesson-50 | /libs/helpers.php | UTF-8 | 205 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
class Helpers {
public static function err($message = '') {
// TODO Send email/sms on error
echo '<pre>';
throw new exception('Error: ' . $message
);
}
} | true |
3a5a34656b186a8e3de532f3604cc3b4fb90ebdf | PHP | BeautyFastCode/patterns | /PHP/Creation/Builder/PageDirector.php | UTF-8 | 777 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* (c) BeautyFastCode.com
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHP\Creation\Builder;
use PHP\Creation\Builder\Page\PageBuilderInterface;
/**
* PageDirector.
*
* @author ... | true |
f20d619a84c25337655519eae8618ac34e71006f | PHP | feturchette/studio-manager | /tests/functional/Api/Classes/UpdateClassTest.php | UTF-8 | 8,234 | 2.65625 | 3 | [] | no_license | <?php
namespace Tests\Functional\Api\Classes;
use Tests\TestCase;
use App\Api\Classes\Classes;
use Laravel\Lumen\Testing\DatabaseMigrations;
class UpdateClassTest extends TestCase
{
use DatabaseMigrations;
/** @test */
public function itCanUpdateCreatedClass()
{
$class = factory(Classes::cla... | true |
b016c8b42468ba2a0a7d75dbf33997f8e3130708 | PHP | bono-cms/Map | /Service/MapService.php | UTF-8 | 5,746 | 2.515625 | 3 | [] | no_license | <?php
/**
* This file is part of the Bono CMS
*
* Copyright (c) No Global State Lab
*
* For the full copyright and license information, please view
* the license file that was distributed with this source code.
*/
namespace Map\Service;
use RuntimeException;
use Map\Storage\MapMapperInterface;
use Cms\Servi... | true |
97e9a3ababda806e56cd8807f010a0e70e4beae5 | PHP | susanBuck/e2 | /rps/process.php | UTF-8 | 507 | 2.78125 | 3 | [] | no_license | <?php
require __DIR__.'/vendor/autoload.php';
use RPS\Game;
//use App\MyGame;
# Get the player’s move from the form data
$player = $_POST['player'];
# Initialize a new Game object
$game = new Game($persistResults = true, $maxResults = 3);
# Store the results in the session
$_SESSION['results'] = [
'lastGame' ... | true |
d885deae4bcc101329bb5cae37b2e88b62713a09 | PHP | Prescia/Prescia | /pages/_newProjectTemplate/actions/default.php | UTF-8 | 2,186 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <? /* -------------------------------------------------
* action/default.php
* This file runs ALWAYS (if on the proper folder, ofc), and is the VERY FIRST to run. Only codes that run before are onMeta and onCheckActions from plugins
* Right after this, the page/action file (if any) will run.
* All files inside acti... | true |
ec05a5ec4832c755356298d273299f608b7bc04f | PHP | pckg/auth | /src/Pckg/Auth/Form/Register.php | UTF-8 | 670 | 2.59375 | 3 | [] | no_license | <?php
namespace Pckg\Auth\Form;
use Pckg\Htmlbuilder\Element\Form\Bootstrap;
/**
* Class Register
*
* @package Pckg\Auth\Form
*/
class Register extends Bootstrap
{
/**
* @return $this
*/
public function initFields()
{
$fieldset = $this->addFieldset();
$fieldset->addEmail('... | true |
50714ca3a0a3c38088cd8b801d58403506f3a090 | PHP | helinho010/Solucredit | /INDFIN/TratamientoINDFIN.php | UTF-8 | 1,645 | 2.5625 | 3 | [] | no_license | <?php
$contenidoArchivoIndFinOrigianl = fopen('/home/hacker/Documentos/titles/30.05.2020.txt', 'r+') or die("Error al abrir el archivo");
$nuevoArchivoIndFin = fopen("/home/hacker/Escritorio/nuevoArchivo.txt", "r+") or die ("Error de apertura");
$uno = "COOP. DE A. Y C. SOLUCREDIT LTDA.";
$dos = "B... | true |
515b0f86c96ff96fc7a7167ede0a53ec2e7396dd | PHP | kuroiyuki48/metodegauss | /func.php | UTF-8 | 4,837 | 2.53125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Metode Eliminasi Gauss</title>
</head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<body class="container m-a... | true |
627c4220a487765c861d3aaec1408fb4bdabb2f9 | PHP | janithT/servicetech | /app/User.php | UTF-8 | 1,912 | 2.578125 | 3 | [] | no_license | <?php
namespace App;
use App\Processors\AvatarProcessor;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
... | true |
103bac98290d88a9d597ca7b3689658baead43a2 | PHP | AASquad/CollegeManagmentSystem | /OnlineAdmissionProcess/confirmC.php | UTF-8 | 3,023 | 2.609375 | 3 | [] | no_license | <?php
$msg = '';
include_once 'connection.php';
if(isset($_POST['resend'])){
$email =($_POST['email']);
$query = "select * from studentregistration where email='$email' AND isConfirmed='0'";
$query1 = "select * from studentregistration where email='$email' AND isConfirmed='1'";
$res= mysqli... | true |
885b543316ce48aff4820563391a4bb0a89b16ae | PHP | arullfalla/appgatewayv2 | /application/helpers/umur_helper.php | UTF-8 | 332 | 2.671875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
if (!function_exists('hitung_umur')) {
function hitung_umur($tgl)
{
$tanggal = new DateTime($tgl);
$today = new DateTime('today');
$y = $today->diff($tanggal)->y;
$m = $today->diff($tanggal)->m;
$d = $today->diff($tanggal)->d;
return $y . " th " . $m . " bl... | true |
c7a9cab689701f17ac0639e7b3f5f53fa6c270e4 | PHP | kittolau/gcm | /protected/controllers/SiteController.php | UTF-8 | 11,038 | 2.546875 | 3 | [] | no_license | <?php
/**
* See Event Controller for controller details
*/
class SiteController extends Controller
{
/**
* Declares class-based actions.
*/
public function actions()
{
return array(
// captcha action renders the CAPTCHA image displayed on the contact page
'captcha'=>array(
'class'=>'CCaptchaAction... | true |
02104c5cb2894d7e24304b9cb748310ed1aabf7a | PHP | 1-Touch/midrubPost | /application/base/user/apps/collection/dashboard/helpers/plans_limits.php | UTF-8 | 1,351 | 2.53125 | 3 | [] | no_license | <?php
/**
* Plans Limits Helper
*
* This file contains the class Plans_limits
* with all app's limits for plans
*
* @author Scrisoft
* @package Midrub
* @since 0.0.7.4
*/
// Define the page namespace
namespace MidrubApps\Collection\Dashboard\Helpers;
defined('BASEPATH') OR exit('No direct script access allow... | true |