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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4dd1c74586568b875d19041c441e167f2480d3a9 | PHP | Vtferreira/GuiaSeries | /classes/Diretor.php | UTF-8 | 610 | 3.78125 | 4 | [] | no_license | <?php
/*
* Representa um diretor associado a um filme
*/
class Diretor {
private $id;
private $nome;
/*Magic Methods*/
public function __construct($nome=""){
$this->nome = $nome;
}
public function __toString(){
$string = $this->id." - ".$this->nome;
return $string;
... | true |
f4a3c7dbc9b4882257f130d7c9b299dc2341002b | PHP | Guilhermeaops/PROJETO-NOBREAK | /PHP/conexao2.php | UTF-8 | 384 | 2.546875 | 3 | [] | no_license | <?php
$localhost= "localhost";
$user= "root";
$passw="";
$banco="formulario";
global $pdo;
try{
//orientada a objetos em pdo
$PDO = new PDO("mysql:host=" . $localhost . ";dbname=" . $banco . ";charset=utf8", $user,$passw);
}catch(PDOException $erro){
//echo "ERRO de conexão, detalhes: " .... | true |
017d9655ad0af5e0b387d6a013cc3f320eb43228 | PHP | adrianbarnes/adrian-woocommerce-pay-on-credit | /pay-on-credit-gateway.php | UTF-8 | 13,189 | 2.671875 | 3 | [] | no_license | <?php
/*
* Plugin Name: WooCommerce Pay On Credit Gateway
* Description: Take credit payments on your store.
* Author: Adrian Koomson-Barnes
* Author URI: https://www.linkedin.com/in/adrienkbarnes/
* Version: 1.0.0
*
*
/*
* This action hook registers our PHP class as a WooCommerce payment gateway
*/
add_fil... | true |
dbd055a4f5019f3598647f1fc0374fbfe5bb9dc8 | PHP | countll/shineisp | /application/models/Regions.php | UTF-8 | 1,425 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Regions
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @package ShineISP
*
* @author Shine Software <info@shineisp.com>
* @version SVN: $Id: Builder.php 6820 2009-11-30 17:27:49Z jwage $
*/
class Regions extends BaseRegions {
/**
*
* Get all the regio... | true |
074e8e2a6e233611d7e84c764de16ab7f8fd7a2b | PHP | Arif12/CRUD_new | /academics/edit.php | UTF-8 | 1,164 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
$id = $_GET['id'];
print_r($id);
$link = mysqli_connect("localhost", "root", "lict@2", "contact");
$query = "select * from academic WHERE id = $id";
$result = mysqli_query($link, $query);
$row = mysqli_fetch_assoc($result);
?>
<html>
<head>
<title></title>
</head>
<body style="text-align: center; width: 10... | true |
19f4383e6efe4977f568f6d799cd8c6225f90b66 | PHP | ameliapi/laravel | /routes/web.php | UTF-8 | 1,091 | 2.6875 | 3 | [] | no_license | <?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... | true |
dfd9c224f624327550ebfaa7ad1a2cf80a683846 | PHP | yasielelreyglez/services | /application/controllers/Api.php | UTF-8 | 70,008 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: saul
* Date: 10/26/2017
* Time: 10:25 AM
*/
defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH . '/libraries/REST_Controller.php';
class Api extends REST_Controller
{
// LISTADO DE LAS SUBCATEGORIAS MAS VISITADAS O RANKIADAS(VISTA DEL HOM... | true |
b3662454e8491ef8089e5b24999607fdf0891eec | PHP | vasa-c/pizza-test-backend | /app/User.php | UTF-8 | 2,508 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
/**
* @property int $id
* @property string $email
* @property bool $is_admin
* @property string $name
* @property string $address
* @property string $contacts
* @prop... | true |
2652213d51e58cfd7886ed4c8ef1effed0defd7b | PHP | ankush228/PHP-Quiz | /question.php | UTF-8 | 2,033 | 2.828125 | 3 | [] | no_license | <?php
include 'db.php';
//Set Question Number
$number = $_GET['n'];
//Query for the Question
$query = "SELECT * FROM questions WHERE question_number = $number";
// Get the question
$result = mysqli_query($connection,$query);
$question = mysqli_fetch_assoc($result);
//Get Choices
$query = "SELECT * F... | true |
8cde31f0c71f94dee28e86d5ed76731c584edbfb | PHP | antonio06/Php | /Practica 2/P7factura.php | UTF-8 | 287 | 2.53125 | 3 | [] | no_license | <?php
$baseImponible=$_POST['baseImponible'];
echo "-----FACTURA-----<br>";
echo "Base Imponible " . $baseImponible . " €" . "<br>";
echo "IVA del 21% " . ($baseImponible*21)/100 . " €" . "<br>";
echo "Total de la factura " . ((($baseImponible*21)/100 )+$baseImponible) . " €";
?> | true |
c8f7259e108664c8bbe336e5d32363efb483a881 | PHP | slx618/php-learning | /algor/BinarySearch.php | UTF-8 | 575 | 3.109375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: slx618
* Date: 2021/09/14
* Time: 12:38
*/
function binarySearch($arr, $lookfor) {
$low = 0;
$height = count($arr) - 1;
while ($low <= $height) {
$mid = (($low + $height) / 2);
if ($arr[$mid] > $lookfor) {
$height = $mid + 1;
... | true |
8c63513304b1236ed9d4e3dc361e66dcc8b91f0b | PHP | ministrest/realty | /_Site/classes/goodman/models/Model.php | UTF-8 | 1,927 | 2.671875 | 3 | [] | no_license | <?php
namespace goodman\models;
use DB;
class Model extends DB\SQL\Mapper {
public $pk = "id";
public $table = "table";
function __construct()
{
$f3 = \Base::instance();
$db = $f3->get('db.instance');
parent::__construct($db, $this->table);
}
public function all() {
... | true |
663c5307f2b172ba0b61d184e5d805372adae224 | PHP | Linyuu/Les-Kikoololeurs | /login/ConnectMember.php | UTF-8 | 1,516 | 3.109375 | 3 | [] | no_license | <?php
/*
//vérifie que l'utilisateur est bien enregistré dans la BDD
session_start();
if (!isset($_SESSION['login'])) {
header ('Location: ../index.php');
exit();
}
*/?>
<!--l'utilisateur n'est pas enregistré et est renvoyé au menu de départ.-->
<html>
<head>
<title>Espace membre</title>
</head>
<!--... | true |
a2d4c69c26287e484f8f4a26614788b5d9f1d0e0 | PHP | sgtcoderllc/Komodo-Mods | /Komodo nightly/Notification Script/cron.php | UTF-8 | 1,895 | 2.75 | 3 | [] | no_license | <?php
ini_set('display_errors', 1);
//Set this as a cron job to check for new updates
$url= 'http://downloads.activestate.com/Komodo/nightly/komodoide/latest/SHA1SUM';
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$output=curl_exec($ch);
curl_close($ch);
$check... | true |
56ebcead796b9d511d4fcfcc72fe27850b586f5e | PHP | VictorUkafor/p2p-trading | /app/Http/Middleware/ValidateCard.php | UTF-8 | 927 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use App\Model\Bank;
use Closure;
use Validator;
class ValidateCard
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)... | true |
ea8a1e67dab27c40226d26bde11ddc5adaa7b9d7 | PHP | cwmiller/broadworks-connector | /src/Ocip/Models/LegacyAutomaticCallbackLineType.php | UTF-8 | 1,520 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace CWM\BroadWorksConnector\Ocip\Models;
/**
* LegacyAutomaticCallbackLineType
*
* Legacy Automatic Callback line type.
*
* @method static LegacyAutomaticCallbackLineType INDIVIDUAL()
* @method static LegacyAutomaticCallbackLineType COIN()
* @method static LegacyAutomaticCallbackLineType SERIES()
... | true |
02eda4fb711bf23f036daa6ca2a5ff8341c8e72b | PHP | luoxiaojun1992/sw-fw-less | /src/components/log/mmap/MonologMmapHandler.php | UTF-8 | 6,868 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace SwFwLess\components\log\mmap;
use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Logger;
use SwFwLess\components\storage\file\mmap\MemoryMap;
use SwFwLess\components\swoole\Scheduler;
/**
* Stores to any stream resource
*
* Can be used to store into php://stderr, remote and local files, et... | true |
eb1a2b2374fde34ed8d1b76af6183458fd4caae6 | PHP | Swiftx/Http | /interface/Response.php | UTF-8 | 3,663 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Swiftx\Http\Interfaces;
/**
* Http请求响应类
* @package Swiftx\Http\Interfaces
*/
interface Response {
/**
* 状态码
*/
const STATUS = [
100 => "Continue",
101 => "Switching Protocols",
200 => "OK",
201 => "Created",
202 => "Accepted... | true |
5b414be1c14720fadc107ef77711b848d83f44ea | PHP | fengxiao-coder/CI_CMS | /web/application/models/goods_category_model.php | UTF-8 | 3,263 | 2.53125 | 3 | [] | no_license | <?php
/**
* goods_category模型
* @version 1.0
* @package application
* @subpackage application/models
*/
class Goods_category_Model extends MY_Model
{
public $list_array=array(
'cat_id' => '类型id' ,
'cat_name' => '类型名称' ,
'pid' => 'pid' ,
'nodepath' => 'nodepath' ,
... | true |
1d99e06a68326389404868e4b49f18e454d83247 | PHP | aresof/PHP_POO | /ej12 sistema/persistencia/UsuarioPersistencia.php | UTF-8 | 1,722 | 2.875 | 3 | [] | no_license | <?php
require_once './configuracion.php';
require_once PER . DIRECTORY_SEPARATOR . 'BaseDeDatos.php';
require_once PER . DIRECTORY_SEPARATOR . 'MySQL.php';
require_once PER . DIRECTORY_SEPARATOR . 'Sql.php';
/*
require_once 'BaseDeDatos.php';
require_once 'MySQL.php';
require_once 'Sql.php';
*/
class Usua... | true |
7bc5ec699858e4441e50081c83ecffb6807d101b | PHP | masoudharooni/location-registration-system | /vendor/hekmatinasser/verta/src/Traits/Transformation.php | UTF-8 | 3,142 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Hekmatinasser\Verta\Traits;
trait Transformation
{
/**
* gregorian to jalali convertion
*
* @param int $g_y
* @param int $g_m
* @param int $g_d
* @return array
*/
public static function getJalali($g_y, $g_m, $g_d) {
$gy = $g_y - 1600;
$gm =... | true |
3503d23983c181ce1eab691e00937a105e079964 | PHP | abeyuyajp/focus | /backend/app/Repositories/Join/JoinRepository.php | UTF-8 | 574 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Join;
use Illuminate\Database\Eloquent\Collection;
Interface JoinRepository
{
/**
* すでにJoinされている投稿を全て取得
* @return array
*/
public function getAllJoinedPost() :array;
/**
* セッションを取得
* @param int
* @return Collection
*/
public functio... | true |
7b552c666ebf3220f18d7c260b260bb4fd9a4943 | PHP | vinogradsoft/file-search | /tests/Unit/DirectoryTest.php | UTF-8 | 1,730 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Test\Unit;
use BadMethodCallException;
use Test\Cases\Dummy\DummyFunctionality;
use Vinograd\FileSearch\Directory;
use PHPUnit\Framework\TestCase;
use Vinograd\SimpleFiles\FileFunctionalitiesContext;
class DirectoryTest extends TestCase
{
public function test__call()
{
$directory = ne... | true |
197b8ae7ffb70ef114c3e7c1ca88b759f3aebeef | PHP | bhudaya/payment_service_staging | /application/class/Iapps/PaymentService/CountryCurrencyPaymentMode/CountryCurrencyPaymentMode.php | UTF-8 | 2,010 | 2.640625 | 3 | [] | no_license | <?php
namespace Iapps\PaymentService\CountryCurrencyPaymentMode;
use Iapps\Common\Core\IappsBaseEntity;
use Iapps\Common\Core\IappsDateTime;
class CountryCurrencyPaymentMode extends IappsBaseEntity{
private $country_code;
private $country_currency_code;
private $payment_mode_code;
private $effective... | true |
291c40ec8b20f686ff8bd5f30034b6fefde86099 | PHP | yii-joblo/menubuilder | /models/EMBFileMenu.php | UTF-8 | 7,488 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: joe
* Date: 13.05.13
* Time: 00:22
* To change this template use File | Settings | File Templates.
*/
class EMBFileMenu extends ArrayModel
{
protected $_filename;
/**
* Returns the static model of the specified AM class.
* @... | true |
0b849286ff593e11578a19f4a8d6d0e19e0b2d40 | PHP | brightmarch/orderware | /src/Orderware/AppBundle/Entity/FeedConnection.php | UTF-8 | 6,643 | 2.640625 | 3 | [] | no_license | <?php
namespace Orderware\AppBundle\Entity;
/**
* FeedConnection
*/
class FeedConnection
{
/**
* @var integer
*/
private $connectionId;
/**
* @var \DateTime
*/
private $createdAt;
/**
* @var \DateTime
*/
private $updatedAt;
/**
* @var string
*/... | true |
6caa236e47e65ddff0d3e8d8dc55bfdca8632282 | PHP | GeneralQuarter/EndTheStock | /produit/rechercheCategorie.php | UTF-8 | 2,110 | 2.578125 | 3 | [] | no_license | <?php include '../header.php' ?>
<?php include '../navbar.php' ?>
<?php
$r = false;
if ($isBD) {
$id = (int) filter_input(INPUT_GET, 'categorie');
if($id > 0){
$res = $bd->query('SELECT * FROM PRODUIT WHERE CATEGORIE ='.$id.' AND VISIBLE = \'V\'');
foreach($categories a... | true |
c59792dc2cc5dfd0734c15de51132d3e3f5ea754 | PHP | malofan/csv-transformer | /src/Transformer/FromSales/Optima/ToSku.php | UTF-8 | 1,133 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Spot\Transformer\FromSales\Optima;
use Spot\DTO\SkuRecord;
use Spot\Exception\InvalidRecordException;
use Spot\ExportReportTypes;
class ToSku extends FromOptima
{
/**
* @return string[]
*/
protected function getRequiredRecordFields(): array
{
re... | true |
efb3d346043aa16eed742a0d3c8a6405ab7993f0 | PHP | christophemaymard/php-code | /src/PhpCode/Language/Cpp/Declarator/ParameterDeclaration.php | UTF-8 | 2,140 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the PhpCode library.
*
* @copyright 2020, Christophe Maymard <christophe.maymard@hotmail.com>
* @license http://opensource.org/licenses/MIT MIT
*/
namespace PhpCode\Language\Cpp\Declarator;
use PhpCode\Language\Cpp\Declaration\DeclarationSpecifierSequence;
/**
* Represen... | true |
27383c7e7e58fe2350459a2d73f9f954309b0f38 | PHP | rivz-a/reyka | /src/Template/Home/index.ctp | UTF-8 | 479 | 2.515625 | 3 | [] | no_license | <!-- Здесь мы проходимся в цикле по объекту запроса $articles, выводя данные статьи -->
<?php foreach ($menu as $page): ?>
<tr>
<td><?= $page->id ?></td>
<td>
<?= $this->Html->link($page->title, ['action' => 'view', $page->id]) ?>
</td>
</tr>
<?php endforeach; ?>
... | true |
2427be9c77f3bf0ea5cc5dc29592130da6ff4c98 | PHP | RenanSilva93/tcc_2018 | /application/controllers/Pages.php | UTF-8 | 947 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Pages extends CI_Controller {
public function __construct() {
parent::__construct("pages");
}
public function index() {
$this->view();
}
private function show_page($page, $path = NULL) {
if (!fil... | true |
c0a7073a7a7dc8f8e5db15dc16414bf457001048 | PHP | FMOISES/Conection | /Conection.php | UTF-8 | 2,241 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/*
* The MIT License
*
* Copyright 2021 moise.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use... | true |
7ed00e194410ef1f7cd8011f0ea76fa0d0c84eb7 | PHP | patrickdgr81/Spellchecker | /dictionary.php | UTF-8 | 450 | 2.78125 | 3 | [] | no_license | <?php
header('Content-Type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
echo '<response>';
$word = $_GET['word'];
//$wordArray = array('tuna','bacon','mcdonalds','beef','ham','meat');
$wordArray = explode("\n", file_get_contents('smalldict.words'));
if (in_array($word, $wordArray))... | true |
1018078e894fd29d5bf0ecb56b2672cfc30d3a05 | PHP | AugustoTpia/unidad | /models/user.Model.php | UTF-8 | 594 | 2.984375 | 3 | [] | no_license | <?php
require_once "conexion.php";
class UserModel{
public static function loginUser($nombre, $pass){
$stmt = Conexion::conectar()->prepare("SELECT usuario, pass, activate FROM users WHERE usuario = :nom AND pass = :pas");
$stmt->bindParam(":nom", $nombre, PDO::PARAM_STR);
$stmt->bindPa... | true |
d08e83b410bb091840c5596044df51426e16c752 | PHP | ipoliarush/ipoliarush.github.io | /sos/code/hhtr.php | UTF-8 | 853 | 2.71875 | 3 | [] | no_license | <?php
error_reporting(0);
ini_set('display_errors', 0);
$result = ['success' => false];
if (isset($_POST["name"]) && isset($_POST["email"]) && isset($_POST["message"]) && !$_POST["tel"]) {
$to = 'ip.ua97@gmail.com';
$subject = 'Сообщение с сайта';
$message = "Имя: ".decoder($_POST["name"])." \r\nE-mai... | true |
3783b629f4c026618e626c45f3e5f84dd6897dcd | PHP | Runalyze/Runalyze | /tests/inc/core/Activity/GroundcontactBalanceTest.php | UTF-8 | 922 | 2.765625 | 3 | [] | no_license | <?php
namespace Runalyze\Activity;
class GroundcontactBalanceTest extends \PHPUnit_Framework_TestCase
{
public function testStaticFunction()
{
$this->assertEquals('49.5L/50.5R %', GroundcontactBalance::format(4950, true));
$this->assertEquals('49.5L/50.5R', GroundcontactBalance::format(4950, false));
}
... | true |
803c77c1c05ec48d2a48e9bb94b123f6c6ad93ba | PHP | ririzhu/h5api | /application/v1/model/TousuSubject.php | UTF-8 | 2,301 | 2.71875 | 3 | [
"Apache-2.0",
"PHP-3.0"
] | permissive | <?php
namespace app\v1\model;
use think\Model;
use think\db;
class TousuSubject extends Model
{
/*
* 构造条件
*/
private function getCondition($condition){
$condition_str = '' ;
if(!empty($condition['complain_subject_state'])) {
$condition_str .= " and complain_subject... | true |
0402581e7602e3f6ff00df845a31cffdea94c0d6 | PHP | SpencerJP/Web-Programming-Assignment | /receipt.php | UTF-8 | 1,319 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Receipt Page</title>
<?php
require("init.php");
?>
</head>
<style>
table {
border: 1px solid black;
}
</style>
<body>
<header>
</header>
<table>
<tr>
<td>Name:</td>
<td><?php echo $_SESSION['receipt']['firstname'] . " ";
ec... | true |
d002048030be720be3607163433713ecca61b0f1 | PHP | sabah1497/yordas | /Model/table4Data.php | UTF-8 | 547 | 2.921875 | 3 | [] | no_license | <?php
require_once ('Database.php');
class table4Data
{
public $_Substances, $_RelatedInformation;
public function __construct($dbRow)
{
$this->_Substances = $dbRow['Substances'];
$this->_RelatedInformation = $dbRow['RelatedInformation'];
}
/**
* @return mixed
*/
p... | true |
dc87029960b541a07c03cc152fa252821606f158 | PHP | mvenkat777/server-api | /database/seeds/HolidaysSeeder.php | UTF-8 | 1,704 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Platform\App\Commanding\DefaultCommandBus;
use Platform\Holidays\Commands\AddHolidayCommand ;
use Platform\Holidays\Commands\AddLocationCommand;
use Platform\Holidays\Repositories\Contracts\LocationRepository;
use Platform\Holidays\Repositories\Contracts\HolidayRepository;
us... | true |
2d1be1d3be83c60299389fe648c8fc89f32a7ed2 | PHP | CostanzoPablo/owasp | /install/build/pentest/1/index.php | UTF-8 | 2,395 | 2.53125 | 3 | [] | no_license | <?php
session_start();
include('../header.php');
echo '<ul class="help-box">
<li class="info-box"><b>Wiki:</b><br>
<div><a target="_blank" href="https://es.wikipedia.org/wiki/Inyecci%C3%B3n_SQL">SQL Injection</a></div>
<div><a target="_blank" href="https://es.wikipedia.org/wiki/Directory_traversal">Path Traversal... | true |
ff60e69abe2f8029dec3a3b574dd26343484af0c | PHP | adong23664/pages_demo | /example/misc/ex4-4.php | UTF-8 | 641 | 3.5625 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Insert title here</title>
</head>
<body>
<?php
$lottery = array();
for($x=1;$x<=5;$x++){
//generate a random number
$a = rand(1,39);
//check if exist in lottery
$exist = 0;
for ($n = 0; $n < count($lot... | true |
0cf455839906f63932ac74afac293d9ef6f1228f | PHP | expert-m/freekeys | /plugins/items/tasks.php | UTF-8 | 6,157 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
class ItemsTasks {
public function add($arg) {
global $db, $me;
set_lang_name('items');
$query = $db->insert('items_tasks', array(
'full_name' => $arg['full_name'],
'instruction' => $arg['instruction'],
'type' => $arg['type'],
'parametrs' => $arg['parametrs']
));
if ($query) {
$me-... | true |
9ae3f7b0127921c9cf057d5a70744a8110e77c28 | PHP | WWYD/WWYD | /php/script/search_topic.php | UTF-8 | 2,697 | 2.703125 | 3 | [] | no_license | <?php
header('Content-Type: text/html; charset=utf-8');
$per_page = 5;
/* Test variables */
if (isset($_POST["title"]) AND isset($_POST["resolved"]) AND isset($_POST["category"]) AND isset($_POST["ranking"]) AND isset($_POST["start_"])) {
$str_query = "SELECT SQL_CALC_FOUND_ROWS topic.id as id, topic.title as t... | true |
a868fab8ce1320361d2ddfc716332819f2016268 | PHP | chillzy/food-delivery | /app/Http/Requests/V1/CreateUserRequest.php | UTF-8 | 779 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Requests\V1;
use App\Models\User;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rules\Password;
/**
* @property string $name
* @property string $email
* @property string $password
*/
class CreateUserRequest extends FormRequest
{
public function authorize(): bo... | true |
db3f024e454829c981aba47a1827012f423f341d | PHP | caferrari/developers | /want-to-be-clickbus/cash-machine/src/CashMachine/CashMachine.php | UTF-8 | 788 | 3.078125 | 3 | [] | no_license | <?php
namespace ClickBus\CashMachine;
use \InvalidArgumentException;
class CashMachine
{
protected $availableNotes = [100, 50, 20, 10];
public function withdraw($amount)
{
if (is_null($amount)) {
return [];
}
if ($amount <= 0) {
throw new InvalidArgumen... | true |
daf3ea3d86f9fe64e0cd95bfa3ada88fb4b4c0ee | PHP | whelks-chance/geoportal | /protected/controllers/MessageController.php | UTF-8 | 1,742 | 2.53125 | 3 | [] | no_license |
<?
class MessageController extends Controller {
Function actionsubmitAbug() {
$name = 'null';
$email = 'null';
$message = 'null';
$activity = 'null';
if(isset($_POST['name'])) {
$name = $_POST['name'];
}
... | true |
6a02aa3b9a0cccdaa52a40e16948d45cf483d179 | PHP | webeasystep/libphonenumber-codeigniter | /third_party/valid_mob/demo.php | UTF-8 | 529 | 2.875 | 3 | [] | no_license | <?php
//Registering
include('autoload.php');
//Use the Class
$swissNumberStr = "+201123303370";
$phoneUtil = \libphonenumber\PhoneNumberUtil::getInstance();
try {
$phoneNumberObject = $phoneUtil->parse($swissNumberStr, "EG");
$num_example = $phoneUtil->getExampleNumberForType('EG', \libphonenumber\PhoneNumber... | true |
c350cdc605aee7f78039562ef4ee5f089c2810be | PHP | nonodev96/relife-cloud | /application/models/Products_model.php | UTF-8 | 3,407 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Products_model extends CI_Model {
public function getAllProducts() {
$query = $this->db->get('products');
return $query->result();
}
public function getTotalProducts() {
$this->db->from('products');
$query = $this->db->get();
return $query->num_rows(... | true |
532921ae9dc865271cb17fcd03b4ae853e9e3819 | PHP | hifernandez/AlyexRep | /php/binding/getProductoByID.php | UTF-8 | 1,056 | 2.515625 | 3 | [] | no_license | <?php
if (!empty($_POST))
$ID = $_POST['ID'];
else
$ID=0;
$gridInfo=array();
$i=0;
while($i < 2)
{
$gridInfo[$i]['Clave'] = "A-".$i;
$gridInfo[$i]['Descripcion'] = "B-".$i;
$gridInfo[$i]['Unidad'] = "C-".$i;
$gridInfo[$i]['Familia'] = "D-".$i;
$gridInfo[$i]['Acabado'] = "E-".$i;
$gridInfo[$i]['L... | true |
ab23479f96c75bfd949e001e4afaa76903c24c9e | PHP | ArtARTs36/Console-Gif-Project | /core/DependencyInjection/Contracts/Container.php | UTF-8 | 668 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Core\DependencyInjection\Contracts;
use Psr\Container\ContainerInterface;
interface Container extends ContainerInterface
{
/**
* @return static
*/
public function set(string $class, object $object);
/**
* @return mixed
*/
public function callMethod(string $class, ... | true |
c57321d87314652b2b3fefe691464a1734207f5c | PHP | EllH/WebProgramming2 | /Cars/Controllers/EnquiryController.php | UTF-8 | 2,349 | 2.78125 | 3 | [] | no_license | <?php
namespace cars\Controllers;
class EnquiryController {
private $enquiriesTable;
private $get;
private $post;
public function __construct($enquiriesTable, array $get, array $post) {
$this->enquiriesTable = $enquiriesTable;
$this->get = $get;
$this->post = $post;
... | true |
490247071313a554c32485b066d9328db57a6284 | PHP | freshy969/typed | /src/Typed/Variable/ObjectVariable.php | UTF-8 | 541 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Typed\Variable;
/**
* Class ObjectVariable
*
* @package Typed\Variable
*/
class ObjectVariable implements VariableInterface
{
/**
* @var object $value
*/
private object $value;
/**
* ObjectVariable constructor.
*
* @param object $value... | true |
98ac9ecc40096906899e88e1d228e68a1c5d7a0d | PHP | Alymosul/practice | /app/CourierService/CourierThreeAdapter.php | UTF-8 | 781 | 2.671875 | 3 | [] | no_license | <?php
namespace App\CourierService;
use App\CourierService\CourierThree\CourierThreeInterface;
class CourierThreeAdapter implements CourierInterface
{
/**
* @var CourierThreeInterface
*/
private $courierThree;
public function __construct(CourierThreeInterface $courierThree)
{
$this... | true |
cd062574996e97fd9ac583bb25fa0dfe370e18f6 | PHP | edward97/seleksi_karyawan_old | /application/controllers/Page.php | UTF-8 | 786 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Page
*/
class Page extends CI_Controller
{
function __construct()
{
parent::__construct();
// Validasi jika user belum login
if ($this->session->userdata('masuk') != TRUE) {
redirect('login');
}
}
function index() {
$data['... | true |
e4b3e38edc237d518d945a024a4ff786912c8bdf | PHP | troyere/moko | /api/src/Domain/Note/ValueObject/NoteValues.php | UTF-8 | 607 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Domain\Note\ValueObject;
use JsonSerializable;
class NoteValues implements JsonSerializable
{
public const JSON_SCHEMA_PATH = __DIR__.'/../Resources/json/note.schema.json';
protected string $title;
protected string $content;
public function __construct(string $title, string $con... | true |
1d788704c2bc5fb23cc99275590dbd75852f7a74 | PHP | turkprogrammer/php-objects-patterns-practice-5-rus | /src/ch10/batch01/LaserCannonUnit.php | UTF-8 | 222 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace vitaliyviznyuk\popp5rus\ch10\batch01;
/* Листинг 10.01 */
class LaserCannonUnit extends Unit
{
public function bombardStrength(): int
{
return 44;
}
}
| true |
34917d4b3bad7d244bcdca536db7c179de8170cc | PHP | mazlanmohdnor/RabbitMQ-Enterprise | /src/consumer.php | UTF-8 | 3,333 | 2.6875 | 3 | [] | no_license | <?php
require dirname(__DIR__) . '/vendor/autoload.php';
use PhpAmqpLib\Connection\AMQPStreamConnection;
$host = 'mosquito.rmq.cloudamqp.com';
$port = 5672;
$user = 'bcoocfcv';
$pass = '4s4ROw5Zeqy_QhtNKQ5uXtDz2SVj3DBG';
$vhost = 'bcoocfcv';
$exchange = 'subscriber';
$queue = 'upm-result';
// $host = 'spider.rmq.cl... | true |
7a55139aa7bb34b4cf21663b818ba9f35207c308 | PHP | Franpastoragusti/Programacion | /Tema5/Ejercicio5.php | UTF-8 | 853 | 3.21875 | 3 | [] | no_license | <?php
function limpia_espacios($cadena){
$cadena = str_replace(' ', '', $cadena);
return $cadena;
}
function decision($cadena,$Cadena){
$palindromo=strcasecmp($cadena,strrev($cadena));
if ($palindromo==0) {
echo "la cadena '$Cadena' es un palindromo<br>";
return $palindromo;
}else{
echo "la cadena '$Cadena' ... | true |
a90188145b5b4beb55dd287efbf5e57d291abece | PHP | yramyayegu/social_networking | /admin/ajax-add-chapters.php | UTF-8 | 4,602 | 2.578125 | 3 | [] | no_license | <?php
include("config.php");
include("seo-url.php");
if(isset($_POST['title']))
{
$cname=$_POST['title'];
$email=$_POST['email'];
$website=$_POST['website'];
$slug=create_seo_url($cname);
if($cname=="" && $email=="" && $website=="")
{
echo '<b style="color:red" >Please... | true |
7a2c7c27e753a059de5358888bba107b471929b2 | PHP | SalasFacundo/MoviePass | /DAO/FuncionDao.php | UTF-8 | 2,884 | 2.953125 | 3 | [] | no_license | <?php
namespace DAO ;
/* require_once "../Config/base_datos.php";
require_once "../Models/Funcion.php";*/
use Config\base_datos as base_datos;
use Models\Funcion as Funcion;
class FuncionDao
{
public function __construct()
{
... | true |
68c470b1376bd4d7eb64d666848b3aef05e3ea62 | PHP | hadloops/laravel_new | /app/Loop/Message.php | UTF-8 | 2,855 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* UserModel: sync
* Date: 2019-11-03
* Time: 14:26
*/
namespace App\Loop;
/*use App\Loop\Curl;*/
class Message
{
public static function sendMarkdownMsg($title, $content, $atAll = false)
{
$payload = [
'msgtype' => 'markdown',
'markdown' =... | true |
9ed724b535f08d697ef683d5cc845e7b01749ec9 | PHP | milos-markovic/music-blog | /class/Database.php | UTF-8 | 535 | 2.8125 | 3 | [] | no_license | <?php
class Database {
public static $db;
public static function connectDB(){
$dsn = 'mysql:host=localhost;dbname=cms';
$username = 'root';
$password = '';
try{
self::$db = new PDO($dsn, $username, $password);
self::$db... | true |
7a8fb903059c2b8a261b8658b70295d4c9a3287f | PHP | demenvil/ecommerce | /application/models/unProduit.php | UTF-8 | 1,594 | 2.625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <<<<<<< HEAD
=======
<<<<<<< HEAD
>>>>>>> 643d5cfb893ccc3d29c2392ae1ebd16eb4b66527
<?php
class unProduit extends CI_Model
{
public function loadProduit($idProduit)
{
// 1ere methoe de requete
$requete=$this->db->get('produit',$idProduit); // une requete sur la table produit
//var_dump($req... | true |
e083d289b085d29d2440313c75ec46758bdb06a5 | PHP | lupohirp/Buondeal | /backend/api/confirm/model/confirm.php | UTF-8 | 3,686 | 2.6875 | 3 | [] | no_license | <?php
require_once '../../../utils/JSON_Response/json_responder.php';
require_once '../../../utils/Logs/LoggerFactory.php';
class Confirm
{
// connessione al database e nome della tabella
private $conn;
private $nome_tabella = "confirm";
// propriet� dell'oggetto
public $id;
public $userid;
... | true |
fd808a255d00eec61ee1f826f778661cff94a89e | PHP | tjreed15/SweetStreet | /index/overhang.php | UTF-8 | 228 | 2.65625 | 3 | [] | no_license | <?php
for ($i = 0; $i < 25; $i++) {
if($i%2==0){
echo '<div class="overhangSection" style="background-color:red"></div>';
}
else{
echo '<div class="overhangSection" style="background-color:white"></div>';
}
}
?> | true |
b399da4a3c9edf637d530bc588cccb5d0bc1420d | PHP | fahad6542/givebyme | /application/controllers/Document.php | UTF-8 | 4,219 | 2.59375 | 3 | [] | no_license | <?php
/*
Added By Fahad
* */
class Document extends CI_Controller
{
public function __construct()
{
parent::__construct();
if (! $this->session->userdata('userdata'))
{
redirect('login'); // the user is not logged in, redirect them!
}
$th... | true |
a15fbe1c64d0307893715ad392542b458cf79176 | PHP | apiato/apiato | /app/Containers/AppSection/User/Models/User.php | UTF-8 | 1,505 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Containers\AppSection\User\Models;
use App\Containers\AppSection\Authentication\Notifications\VerifyEmail;
use App\Containers\AppSection\Authentication\Traits\AuthenticationTrait;
use App\Containers\AppSection\Authorization\Traits\AuthorizationTrait;
use App\Ship\Contracts\MustVerifyEmail;
use App... | true |
1a296abb6688f2b629bb36f159eefd5bc835c6b3 | PHP | artmarkov/fdoc_school | /classes/forms/control/SimpleText.php | UTF-8 | 1,139 | 2.671875 | 3 | [] | no_license | <?php
namespace main\forms\control;
class SimpleText extends BaseControl {
protected $text;
public function getHtmlControl($renderMode) {
$p=sprintf('%s',
$this->text);
return $p;
}
public function __set($prop,$val) {
switch($prop) {
case 'text':
$th... | true |
967f8ae0d017c14be476fef7991e4425c3a3cb1b | PHP | comptech-soft/quizz | /comptech/Auth/Services/Social/FacebookAccountService.php | UTF-8 | 1,091 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Comptech\Auth\Services\Social;
use Sentinel;
use Laravel\Socialite\Contracts\User as Provideruser;
use App\Models\Auth\Socialaccounts\Socialaccount;
class FacebookAccountService
{
public function createOrGetUser(Provideruser $provider_user)
{
if($social_account = Socialaccount::byProviderAndId('... | true |
f7ee834370a40b83b2ab59230e85c4f3cb6881af | PHP | antoineLeconte/ATPNoFramework | /formAjoutJoueur.php | UTF-8 | 968 | 2.71875 | 3 | [] | no_license | <?php
include_once "fonctions/fonctionsAffichage.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Classement ATP : Ajout d'un joueur</title>
<link rel="stylesheet" type="text/css" href="css/formAjoutJoueur.css"/>
</head>
<body>
<h1>Ajouter un joueur</h1>
<?php
... | true |
891f363f35fe4fa2607fa1a72bbf14da8295f081 | PHP | benimana/Zambike | /api.php | UTF-8 | 911 | 3.984375 | 4 | [
"MIT"
] | permissive | <?php
class fruit
{
public $fruitname='';
function fruitname($newFruitname=null)
{
if(!is_null($newFruitname)){
$this->fruitname=$newFruitname;
}
return $this->fruitname;
}
}
$ban= new fruit;
$ban->fruitname('banana');
echo "My {$ban->fruitname} is big and juicy<br>";
$coc= new fruit;
$coc->fruitname('... | true |
b40df254a60b9a6d7240afdd885f556de983402c | PHP | duanduan2288/super | /src/mail/Communication.php | UTF-8 | 1,013 | 3 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2016/7/14 0014
* Time: 下午 11:55
*/
abstract class Communication
{
protected $arRecipientCollection;
private $strMessage;
protected $strErrorMessage;
protected $errorCode;
abstract public function send();
public function __construct()
{
$thi... | true |
f68b641f1054990fd9d3ab3cb59d19916663cc34 | PHP | freezer974/ultimatetodolist | /taches/action_tache.php | UTF-8 | 5,606 | 2.78125 | 3 | [] | no_license | <?php
// appel à la session
require_once('../functions/session.php');
//appel à la base de donnée
require_once('../functions/connexion_bdd.php');
//echo '<pre>' . var_export($_POST, true) . '</pre>';
//die();
if (!empty($_POST['action'])):
$action = htmlentities($_POST['action... | true |
20def8e56b93783b123953c37bd543e4bb518d28 | PHP | the-cc-dev/wp-cf-post-meta | /classes/cf-input-settings-types.class.php | UTF-8 | 3,288 | 2.734375 | 3 | [] | no_license | <?php
/**
* Extensions of some baic post meta input type classes to allow reuse of input
* types in the Settings screens
**/
/**
* Extension of the basic cf_input_block class
*/
class cfs_input_block extends cf_input_block {
/**
* Constructor.
*/
public function __construct() {
}
function cfs_input_block($... | true |
8cb82f359d96faab21deffb3610c9e2d470f069a | PHP | hotheadheather/Creative-Examples | /hkwproject/txtFiles/scanDir.php | UTF-8 | 410 | 3.140625 | 3 | [] | no_license | <body>
<h1>File Processing</h1>
<hr />
<p>This is an example of a php application that gives list of files in a directory. </p>
<?php
$Dir = "www/hkwproject/.txt";
$DirEntries = scandir($Dir);
foreach ($DirEntries as $Entry) {
if ((strcmp($Entry, '.') != 0) && (strcmp($Entry, '..') != 0)) {
echo "<a href=\"$Dir\\$Entry... | true |
2624e9868dc73d3c447e19c0f1491aa38ed8f49d | PHP | adammpoland/simple-message-encryption | /secrets/secrets/bin/Debug/classes4.php | UTF-8 | 841 | 3.703125 | 4 | [] | no_license | <?php
echo "PHP Class Info part 3<br>";
/*
__set
__get
__isset
__unset
*/
class testClass {
private $data = array();
private $author;
public function __set($name, $value) {
$this->data[$name] = $value;
}
public function __get($name) {
return $this->data[$name];
}
public function se... | true |
fdb13bfe869fe06453ad5f86572110cb41283085 | PHP | ahebrank/sessiondb | /sessiondb.php | UTF-8 | 2,837 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/*
=====================================================
* Get EE and its modules to use DB-based PHP sessions, not the filesystem
* Andy Hebrank, 2015
* https://insidenewcity.com
*
* Based on http://shiflett.org/articles/storing-sessions-in-a-database
*
* on some distributions, you'll want to check for reasona... | true |
a188379969a807fb8eda33927296b4e17e38eb4a | PHP | kientranutc/pizza | /app/Repositories/Users/UserRepository.php | UTF-8 | 2,879 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Users;
use App\Models\User;
use App\Models\UserRole;
class UserRepository implements UserRepositoryInterface
{
public function all()
{
return UserRole::select('users.*','role.name as role_name')
->join('users', 'users.id', '=', 'user_role.user_id')
... | true |
5d18c775e7690bc3f0f66463d35f75970a39e42d | PHP | ntentan/ntentan | /src/View.php | UTF-8 | 4,624 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace ntentan;
use ntentan\honam\Templates;
use ntentan\interfaces\RenderableInterface;
use ntentan\interfaces\ThemableInterface;
/**
* A wrapper around the honam template engine system that acts as a view class.
* Allows ntentan apps to leverage the honam template engine to create html and other forms of... | true |
bb08be64a81cdc9a8a419a50996e0eda9d92e216 | PHP | psychob/php-framework | /src/Utility/SingletonTrait.php | UTF-8 | 1,304 | 2.875 | 3 | [] | no_license | <?php
//
// psychob/framework
// (c) 2019 RGB Lighthouse <https://rgblighthouse.pl>
// (c) 2019 Andrzej Budzanowski <kontakt@andrzej.budzanowski.pl>
//
namespace PsychoB\Framework\Utility;
/**
* Trait SingletonTrait.
*
* @todo Add verify mechanism (if i ever finish it)
... | true |
a2721e47a8d8c1354f6adabe16788c76584ded91 | PHP | qlebris/php_schoolProject_larq | /src/Controller/ContactFormController.php | UTF-8 | 3,694 | 2.859375 | 3 | [] | no_license | <?php
namespace Controller;
use Twig_Loader_Filesystem;
use Twig_Environment;
class ContactFormController extends AbstractController
{
public function contactForm()
{
$formErrors = [
'errLastname' => [''],
'errFirstname' => [''],
'errTypo' => [''],
'e... | true |
a2c215c9e3733f9d8b1a877db42dd29544c2b293 | PHP | mjperpinosa/Phonebook-II | /PHP/USERS/function_home.php | UTF-8 | 19,276 | 2.84375 | 3 | [] | no_license | <?php
include "database_connection.php";
class function_home extends database_connection {
function add_user($firstname, $middlename, $lastname, $gender, $age, $new_username, $new_password) {
$this->open_connection();
$insert_statement = $this->dbh->prepare("INSERT INTO users VALUES (null, ?, ... | true |
c88e8e21d8d26535a047f9ec0cd67b4aa4305618 | PHP | asd20277/botOS | /cmd/user/rule.php | UTF-8 | 3,057 | 2.78125 | 3 | [] | no_license | <?php
/*
* 回話規則設定
* ~rule add <say> <response>
* ~rule $arguments[1] $arguments[2] $arguments[3]
*/
$repliesJSON = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'replies.json';
if(@$arguments[1] == 'add' and isset($arguments[2]) and isset($arguments[3])){
$say = $arguments[... | true |
3d74bb427219e8b8d763cd88bd22abf489e65d9d | PHP | kmeseye/mvcphp | /clinica/controladores/UsuarioController.php | UTF-8 | 1,484 | 2.515625 | 3 | [] | no_license |
<?php
class UsuarioController
{
public static function index()
{
$action = $_GET["action"];
$usuarios = Usuario::getAll();
if (isset($_SESSION["usuario"]) != null) {
$usuario = $_SESSION["usuario"];
if (count($_POST) > 0) {
extract($_POST);
... | true |
126173846677a22afefcdfff0c702724beaab281 | PHP | mbadal/AdventOfCode2017 | /src/AdventOfCode/Reader/StandardFileReader.php | UTF-8 | 301 | 2.953125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace AdventOfCode\Reader;
class StandardFileReader extends AbstractFileReader {
/**
* @inheritdoc
*/
public function read(): array {
$inputString = file_get_contents($this->inputFileName);
return str_split($inputString);
}
} | true |
19ef71ea164b551a1c058b7712301dbf6c0f07b1 | PHP | angelov-todor/dictionary | /src/Core/Main/Domain/Repository/CognitiveSkillRepositoryInterface.php | UTF-8 | 971 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Core\Main\Domain\Repository;
use Core\Main\Domain\Model\Test\CognitiveSkill;
interface CognitiveSkillRepositoryInterface
{
/**
* @param int $page
* @param int $limit
* @return mixed
*/
public function viewBy(int $page, int $limit);
/**
* ... | true |
63910df55bf7666009f0c7d7621f289573a20ca2 | PHP | anger4u/rarus-test-60 | /test34.php | UTF-8 | 665 | 3.3125 | 3 | [] | no_license | <?php
function takeOldest($arr, $num = 1)
{
$keys = array_map('strtotime', array_column($arr, 'birthday'));
$result = array_multisort($keys, SORT_ASC, $arr);
for ($i = 0; $i < $num; $i++) {
$resultFin[] = $arr[$i];
}
return $resultFin;
}
$users = [
['name' => 'Tirion', 'birthday' ... | true |
7729c4cf995f8de173c94c6e7c3bd947a54245e6 | PHP | franciellestival/webDev | /ds122-project/login_login.php | UTF-8 | 3,421 | 2.828125 | 3 | [] | no_license | <?php
// Initialize the session
session_start();
// Include config file
require_once "connect.php";
// Define variables and initialize with empty values
$data = $_POST;
$email = $senha = "";
if (empty($data['email']) ||
empty($data['senha'])) {
$_SESSION ['messages'][] = 'Por favor preencha... | true |
1c6446084e73a6801be2c7b9480d6e0c7ffd2183 | PHP | hassanazimi/PHP_Uploading_File | /01_Basics/03/form.php | UTF-8 | 1,082 | 3.046875 | 3 | [] | no_license | <?php
$max = 50 * 1024;
$message = '';
if (isset($_POST['upload'])) {
switch ($_FILES['filename']['error']) {
case 0:
$message = $_FILES['filename']['name'] . ' was uploaded successfully.';
break;
case 2:
$message = $_FILES['filename']['name'] . ' is too big to upload.';
break;
case 4:
$message =... | true |
7cd1e035241f3604195889b8e219e7fbb72c5374 | PHP | doxhung/webfont-generator | /src/WebFont.php | UTF-8 | 3,699 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright © 2015, Ambroise Maupate
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, mer... | true |
2c05ebc51c8d2e0ffc21df0f3c9e81bc1214e055 | PHP | CharrayGao/ygcms_ci | /application/libraries/Paginationlib.php | UTF-8 | 1,231 | 2.6875 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Initialize the pagination rules for goods page
*
*
* @return Pagination
* @author Chunlei Gao
*
*
* */
class Paginationlib {
public function __construct()
{
$this->ci = & get_instance();
}
public... | true |
8cd50742cf2d23df6f6ca67ad127654d6b5dab6d | PHP | evancaldwell/cs313 | /bk-2-25/app/models/blocks.php | UTF-8 | 7,796 | 2.8125 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT']."/app/models/conn_admin.php";
function addProject($userId, $title, $description) {
global $db;
try {
// the sql query ready to be turned into a prepared statement using the values
$query = 'INSERT INTO projects
(us... | true |
c9af819476f562ca87caa9843ce01c1cdfdf8ea0 | PHP | RobertTupy/php-dateranger | /tests/RT/DateTime/FormatTokenizerTest.php | UTF-8 | 2,382 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace RT\DateTime;
use PHPUnit\Framework\TestCase;
class FormatTokenizerTest extends TestCase
{
/**
* @param $format
* @param $requiredTokens
* @dataProvider parsingFormatProvider
*/
public function testFormatParsing($format, $requiredTokens)
{
$tokenizer = new Forma... | true |
fb2040d870458ed4d2c54b21e3902a64b466398f | PHP | cedriclombardot/spyMenuPlugin | /modules/spyMenuIndex/actions/components.class.php | UTF-8 | 669 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This class will create the spyMenu based with a start_by parameter
* the rendering will do the difference
*
* @package spyMenuPlugin
* @subpackage spyMenuIndexComponents
* @author Cédric Lombardot <cedric.lombardot@spyrit.net>
*
*/
class spyMenuIndexComponents extends sfComponents
{
... | true |
2d721edd56e29de9682d0ecccdc832dafa2534e0 | PHP | Truman-State-University/truman-digital-sign-theme | /clockwidget.php | UTF-8 | 2,169 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Adds Truman_Sign_Clock_Widget widget.
*/
class Truman_Sign_Clock_Widget extends WP_Widget {
/**
* Register widget with WordPress.
*/
function __construct() {
parent::__construct(
'truman_sign_clock_widget',
__( 'Clock Widget', 'truman-digital-sign-theme' ),
array( 'description' => __( '... | true |
084a28c828dc1bc579b230ebfb3782a1eb2ce41f | PHP | sstur/js2php | /php/globals/Math.php | UTF-8 | 2,898 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
$Math = call_user_func(function() {
$randMax = mt_getrandmax();
$methods = array(
'random' => function() use (&$randMax) {
return (float)(mt_rand() / ($randMax + 1));
},
'round' => function($num) {
$num = to_number($num);
return is_nan($num) ? NAN : (float)round($num);
... | true |
11be274e98a9dc3fd214b815bcb130db7ee382d2 | PHP | marlonpd/spa-laravel-vuejs-sample | /app/Repositories/PersonEloquent.php | UTF-8 | 885 | 3.03125 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Person;
class PersonEloquent implements PersonInterface
{
/**
* @var Person
*/
private $model;
/**
* Person constructor.
* @param Person $model
*/
public function __construct(Person $model)
{
$this->model = $model;
}
... | true |
5f4125adfd704b2551d5bf8f043540ddc2de6037 | PHP | peeterburger/school | /web-development/web-sites/php-exercises/other/memos/register.php | UTF-8 | 2,902 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
// builds a bootstrap-based alert
function buildAlert($heading, $description, $type) {
echo "<div class='alert $type' role='alert'><strong>$heading</strong>$description</div>";
}
// if POST contains data (happens on login submit), evaluate it
if(!empty($_POST)){
$username = $_POST['user'];
$pass = $_P... | true |
6c15a9bb709a4376c89a9bc771dad6595c219609 | PHP | hungnd1/G4AW | /frontend/helpers/UserHelper.php | UTF-8 | 4,316 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: thuc
* Date: 10/17/14
* Time: 3:39 PM
*/
namespace frontend\helpers;
use Yii;
class UserHelper {
const SESSION_USER_ID = 'user_id';
const SESSION_MSISDN = 'MSISDN';
const SESSION_CAS = 'CAS';
const SESSION_ACCESS_TOKEN = 'user_access_token';
const SE... | true |