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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c0152864629f4bbee589a65926188bde804b5fc2 | PHP | tyrichardson/php-beginner | /demo-ty/math.php | UTF-8 | 603 | 3.625 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=
, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$br = "<br />";
$num1 = 12;
$num2 = 24;
// standard order of operations
echo 56 + 45;
... | true |
207207f8bc1a5c0b7142d8672f7f098367cef1db | PHP | ma7mizz/IESOSI2D | /mission_2-6.php | UTF-8 | 7,001 | 2.71875 | 3 | [] | no_license | <?php
$time = time();
$filename = 'kadai2-6.txt';
$err_msg1 = "";
$err_msg2 = "";
$err_msg3 = "";
$message = "";
$name = (isset($_POST["name"]) == true) ? $_POST["name"]: "";
$comment = (isset($_POST["comment"]) == true) ? trim($_POST["comment"]) : "";
$pass = (isset($_POST["pass"]) == true) ? $_POST["pass"]: "";
$cont... | true |
1d516634a7e0babd2b924b1b96f78f165688b438 | PHP | Leisurelybear/php-restaurant-manager | /manage/verify.php | UTF-8 | 911 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by IntelliJ IDEA.
* User: jason
* Date: 2019/12/21
* Time: 12:50
*/
class Verify{
private $link = null;
public function __construct()
{
$this->link = mysqli_connect("localhost", "root", "0412"
, "php_exam", 3306);
}
function verifyType($username){
... | true |
846a702548d41c0c635d0664dc8577837b08c01c | PHP | juandomingo/proyecto | /model/EntregaDirectaRepository.php | UTF-8 | 2,461 | 2.75 | 3 | [] | no_license | <?php
/**
* Description of EntregaDirectaRepository
*
* @author Tino
*/
class EntregaDirectaRepository extends PDORepository {
private static $instance;
public static function getInstance() {
if (!isset(self::$instance)) {
self::$instance = new self();
}
return self:... | true |
f04785290d0db83e991caeb6080ab3154465de7a | PHP | h3d-tuannq/mystore.com | /common/migrations/db/v1/m181124_043330_create_report_employee_table.php | UTF-8 | 1,147 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `report_employee`.
*/
class m181124_043330_create_report_employee_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('report_employee', [
'id' => $this->primaryKey(),... | true |
4594d1bf8269275f2465b4b9ddd3686571759ebc | PHP | concretecms/concretecms | /concrete/src/Http/Middleware/ApiLoggerMiddleware.php | UTF-8 | 1,057 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Concrete\Core\Http\Middleware;
use Concrete\Core\Logging\Channels;
use Concrete\Core\Logging\LoggerAwareInterface;
use Concrete\Core\Logging\LoggerAwareTrait;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\Request;
/**
* Class ApiLoggerMiddleware
*/
class ApiLoggerMiddleware impl... | true |
f4b3f6475316bfbcbe49ebeb0ff86d31e4636dc4 | PHP | CaptainAchilles/symphonic-movie-api | /app/GraphQL/Mutation/ActorMutation.php | UTF-8 | 2,620 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php namespace App\GraphQL\Mutation;
use GraphQL;
use GraphQL\Type\Definition\Type;
use Folklore\GraphQL\Support\Mutation;
use Folklore\GraphQL\Error\ValidationError;
use App\Actor;
use App\Movie;
use \App\ActorsInMovie;
class ActorMutation extends Mutation {
protected $attributes = [
'name' => 'ActorMutation'
... | true |
0d734fca289a799ab7787a815114333343043b7f | PHP | ojalaquellueva/gnrs | /api/gnrs_ws.php | UTF-8 | 4,938 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
// DEPRECATED. DON'T USE.
// Keeping for now as I may recycle some code
////////////////////////////////////////////////////////
// Legacy gnrs batch api. Runs non-parallel gnrs_batch.sh
//
// For updated parallel version, see gnrs_api.sh
////////////////////////////////////////////////////////
//////////////... | true |
f4dd7fad337953d09401abe796585a33e93f888f | PHP | 285984303/hy_api | /app/Models/Log/BusAppointment.php | UTF-8 | 1,475 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Will
* Date: 9/7/16
* Time: 4:12 PM
*/
namespace App\Models\Log;
use App\Models\BaseModel;
/**
* Class BusAppointment
* @package App\Models\Log
* @property $bus_id
* @property $bus_time
* @property $user_id
* @property $date
*/
class BusAppointment extends BaseMo... | true |
ce3429a4cdd3cc67554be7c2387c435a85787bfe | PHP | kamilgrzegorczyk/custom-ac-columns | /ac-column-assigned_procedures.php | UTF-8 | 1,443 | 2.96875 | 3 | [] | no_license | <?php
class AC_Column_Assigned_Products extends AC_Column {
public function __construct() {
// Identifier, pick an unique name. Single word, no spaces. Underscores allowed.
$this->set_type( 'column-assigned-products' );
// Default column label.
$this->set_label( __( 'Assigned products', 'ac-assigned-... | true |
c87b73c775c03eda11e821fcdf448152f4fa830d | PHP | ips13/woocommerce-auctions | /includes/classes/class-wac-parse-site.php | UTF-8 | 5,237 | 2.6875 | 3 | [] | no_license | <?php
/**
* Parse two websites data (Pararius, Funda)
*/
class Woo_Auction_Parsesite{
//fetch pararius site data
function parariusSiteData($url){
$htmlget = $this->get_fcontent($url);
$htmlData = $htmlget[0];
$dom = new DOMDocument();
@$dom->loadHTML($htmlData);
$finder = new DomXPath($dom);
//g... | true |
e37ea1c3825e8c68f60f20a4fa09cc4afd6f26f1 | PHP | all2907/mobile-web | /backend/Jalur/Util.php | UTF-8 | 1,685 | 3.34375 | 3 | [] | no_license | <?php
class Util
{
function __construct()
{
}
// euqualdian dst
public function getdistance($vector1, $vector2)
{
$n = count($vector1);
$lat = ($vector1['lat'] - $vector2['lat']) * ($vector1['lat'] - $vector2['lat']);
$lng = ($vector1['lng'] - $vector2['lng']) * ($vector1['lng'] - $vector2['l... | true |
379bd792956042a5e087ef11e0536b480b655afc | PHP | fabriciosc92/TP-1-2015 | /PartyPay-PHP/model/DAC/LocalDAC.php | UTF-8 | 2,070 | 2.90625 | 3 | [] | no_license | <?php
/**
* Class name: LocalDac
* Class to connect Local to the database
*/
class LocalDAC
{
// Insert data from Local into database.
public static function insertLocalDAC(Local $local)
{
include_once 'connection.php';
$sql = "INSERT INTO `places`(`id`, `eventAddress`, `coordenadasGo... | true |
b34e6fdd39ccb6e98c3a8516ea0d17ee5c008a15 | PHP | MiguelJimenez/bexlanPHP | /mis-contactos/php/funciones.php | UTF-8 | 4,062 | 3.078125 | 3 | [] | no_license | <?php
function borrar_imagenes($ruta,$extension)
{
switch ($extension)
{
case '.jpg':
if (file_exists($ruta.".png"))
{
unlink($ruta.".png");
}
if (file_exists($ruta.".gif"))
{
unlink($ruta.".gif");
}
break;
case '.gif':
if (file_exists($ruta.".png"))
{
unlink($ruta.".png");
}
... | true |
d6463ce9f21b4446d957b01b8fabd8c5edb558a0 | PHP | primephp/framework | /Server/Listener/RequestListener.php | UTF-8 | 2,172 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/*
* The MIT License
*
* Copyright 2016 Tom Sailor.
*
* 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, cop... | true |
86fb57304b9fdb75d371bf750f3e34895dab0f37 | PHP | totalcrm/telegram-bot-sdk | /src/Contracts/HttpClientInterface.php | UTF-8 | 686 | 3.03125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Telegram\Bot\Contracts;
use Psr\Http\Message\ResponseInterface;
/**
* Interface HttpClientInterface.
*/
interface HttpClientInterface
{
public function getConfig(): array;
public function setConfig(array $config);
/**
* Send HTTP request.
*
* @param string $url
... | true |
740ec7647c22b5c03a4f07da247b1a30efbdb6a1 | PHP | koalka/Homework | /hw8functions/ex5.php | UTF-8 | 77 | 3.265625 | 3 | [] | no_license | <?php
function average($a, $b) {
echo ($a + $b) / 2;
}
average(2, 10);
| true |
e5daf3d3c89933dd949d4bd1310d23fd10696d4d | PHP | all4site/all4site_lardi_trans | /afsThemeOptions/PostDeleteAndEdit.php | UTF-8 | 1,149 | 2.796875 | 3 | [] | no_license | <?php
namespace AFS;
class PostDeleteAndEdit
{
public function __construct()
{
add_action( 'template_redirect', [ $this, 'deletePost' ] );
add_action( 'template_redirect', [ $this, 'draftPost' ] );
add_action( 'template_redirect', [ $this, 'publishPost' ] );
add_action( 'before_delete_post', [ $this, 'delet... | true |
d88ce4e2c9091ba90ec9fb784352d4bf3c88afc1 | PHP | spetitcuenot/PHP-buddy-work | /j01/ex09/ssap2.php | UTF-8 | 885 | 3.03125 | 3 | [] | no_license | #!/usr/bin/php
<?php
$args = [];
foreach (array_slice($argv, 1) as $arg)
{
$args = array_merge($args, explode(" ", array_reduce(str_split(trim($arg, " ")), function ($prev, $curr) {
return substr($prev, -1) == ' ' && $curr == ' ' ? $prev : $prev . $curr;
})));
}
usort($args, function ($a, $b) {
$a = strtolower($a)... | true |
fea409fa3970fde64d6e320668174b2d6537b364 | PHP | AzGothic/casexe-php | /base/View.php | UTF-8 | 1,508 | 2.671875 | 3 | [] | no_license | <?php
namespace app\base;
use App;
/**
* View class definition
*/
class View
{
public $layout = 'layout/index';
public $title;
public $content;
/**
* Rendering partials
* @param string|array $view
* @param array $params
* @return string html
*/
pub... | true |
b99f0fb46c01f132c1dc93a7d0071776e3e6a81b | PHP | zdhxiong/mdclub | /src/Initializer/RouteStrategy.php | UTF-8 | 2,872 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace MDClub\Initializer;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Interfaces\InvocationStrategyInterface;
/**
* 路由回调策略
*/
class RouteStrategy implements InvocationStrategyInterface
{
/**
* 根据控制器返回的数组构建响应
*
... | true |
29ff75f3c338ce4f267e1b120b947a0c69dcfef2 | PHP | jeop10/files-exercise | /app/Console/Commands/ReadFile.php | UTF-8 | 3,174 | 3.09375 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Output\OutputInterface;
class ReadFile extends Command
{
const SUCCESS_CODE = 0;
const ERROR_CODE = 1;
/**
* The name ... | true |
b7a0997bd8c34d575445fc42ab1409d24e8811fc | PHP | anamariavv/Izborni-Projekt | /include/internships.inc.php | UTF-8 | 4,901 | 2.53125 | 3 | [] | no_license | <?php
require_once "database_connect.inc.php";
//get company information
$sql = 'SELECT internship.id, internship.created, internship.salary, internship.position, internship.description, internship.city,
internship.requirements, internship.status, internship.deadline, company.id AS company_id, ... | true |
3111c13203c01bee91eb439eca785551b4221464 | PHP | HugoBricoult/SQL | /HIKING/update.php | UTF-8 | 1,808 | 3.0625 | 3 | [] | no_license | <?php
session_start();
if(isset($_SESSION['login'])){
echo 'vous êtes connecté<br>';
echo '<form action="login.php" method="post"><button name="disconnect">Se déconecter</button></form>';
}else{
header("Location:login.php");
}
$newArrays = [];
if(isset($_POST['data'])){
$arrayinit = preg_split('/([-])... | true |
c2adfbeff158ff72248a720c3cefea4287425cbe | PHP | desperado-xing/yii | /backend/controllers/BusinessController.php | UTF-8 | 1,954 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\controllers;
use yii;
use backend\models\Busines;
use yii\web\UploadedFile;
class BusinessController extends Basecontroller{
public function actionIndex(){
//$this->getController();
$bus = new Busines();
if(Yii::$app->request->isPost){
$sort = Yii::$app->request->post('so... | true |
0a44492d0b9a8d8858ac7d2d2630aeb50212e0f8 | PHP | MilestoneInnovativeTechnologies/web | /laravel/database/migrations/2018_07_23_082227_create_f_a_q_products_table.php | UTF-8 | 1,120 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFAQProductsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('faq_product... | true |
a179ab93053c3f62c2ca0941f3fa036104ce2b0a | PHP | rajrajsahil/sfmember | /class.user.php | UTF-8 | 1,609 | 2.953125 | 3 | [] | no_license | <?php
class user {
private $db;
function user($conn){
$this->db = $conn;
}
public function login($uname,$upass)
{
try
{
$stmt = $this->db->prepare("SELECT * FROM membercredentials WHERE name=:uname AND password=:upass LIMIT 1");
$stmt->execute(array(':uname'=>$uname, ':upass'... | true |
80903c5894d8ad37f6d9341e62c96eac04edbb3c | PHP | ankit2818/StudentMarksManagement | /db.php | UTF-8 | 349 | 2.703125 | 3 | [] | no_license | <?php
function createConnection() {
$dbUsername = 'root';
$dbPassword = '';
$dbHost = 'localhost';
$dbDatabaseName = 'markmanagement';
return mysqli_connect($dbHost, $dbUsername, $dbPassword, $dbDatabaseName);
}
function closeConnection($conn) {
$... | true |
021d27806c7739f0820d54d2a5ad1d54f8b95045 | PHP | arvatis/plentymarkets-shopware-connector | /Connector/Validator/Order/Comment/CommentValidator.php | UTF-8 | 908 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace SystemConnector\Validator\Order\Comment;
use Assert\Assertion;
use SystemConnector\TransferObject\Order\Comment\Comment;
use SystemConnector\Validator\ValidatorInterface;
use SystemConnector\ValueObject\Attribute\Attribute;
class CommentValidator implements ValidatorInterface
{
/**
* {@inher... | true |
616891908801705e34d954bffda2703b910dbf1d | PHP | Chirinoxi/ConciergeG4 | /web/database/migrations/2020_07_19_024112_create_records_table.php | UTF-8 | 1,381 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRecordsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('records', funct... | true |
b17b6d75b4b013afc586b8d9ee76b7ee61d1f054 | PHP | AlexAPPi/look-php | /look/api/parser/typescript/tsvalue.php | UTF-8 | 991 | 2.90625 | 3 | [] | no_license | <?php
namespace Look\API\Parser\TypeScript;
use Look\Type\Interfaces\IType;
use Look\API\Parser\Struct\Value;
class TSValue
{
public $value;
public function __construct($value)
{
$this->value = $value;
}
public function hasValue() : bool
{
if($this->value instanceof ... | true |
ad540559f661a913121f6f22cca80d291b2f5aae | PHP | webmiss/base | /phalcon/util/Hash.php | UTF-8 | 872 | 3.25 | 3 | [] | no_license | <?php
namespace Util;
/* 哈希 */
class Hash {
/* Md5 */
static function Md5(string $data, $binary=true): string {
return md5($data, $binary);
}
/* Sha256 */
static function Sha256(string $data): string {
$res = hash('SHA256', $data);
return $res!==false?$res:'';
}
/* HmacSha1 */
static fun... | true |
a3617553a0eaa34fdd1027437ee6956bae3bdbea | PHP | csanquer/TwigFrontDev | /src/TwigFrontDev/Controller/MockController.php | UTF-8 | 5,058 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace TwigFrontDev\Controller;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
*
* @author Charles Sanquer <charles.sanquer@gmail.com>
*/
class MockController
{
/**
*
* @var array
*/
protected $pages;
pu... | true |
ffcadcf537142d916329b8bc57acb3e3501d2024 | PHP | jules75/memoryatlas | /password.php | UTF-8 | 1,694 | 2.640625 | 3 | [] | no_license | <?php
include_once '_top.php';
// redirect if not logged in
if (!isset($_SESSION['user'])) {
header('Location: /login.php');
}
include_once 'db.php';
if (isset($_POST['old_password'])) {
if(strlen($_POST['new_password']) < 5) {
echo "<p class='error'>New password must be at least 5 characters</p>... | true |
4e948ccbd350259ad861bbd9d9976baff8e16dce | PHP | m8than/CoreFramework | /Core/Controller/Controller.php | UTF-8 | 951 | 2.65625 | 3 | [] | no_license | <?php
namespace Core\Controller;
use Core\Template\Template;
use Core\Registry\Registry;
class Controller
{
public static function loadMethod($controller_name, $method, $params)
{
$full_controller_name = APP . CONTROLLERS . ucfirst($controller_name);
$full_controller_name = str_replace('/', '\... | true |
5785a41ab66bd55153a3bee02894a0923d4bdd4e | PHP | kooser6/Phoenix | /src/Game/Board.php | UTF-8 | 3,985 | 3.03125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Phoenix\Game;
use Phoenix\Batch\Position;
/**
* The chess position.
*/
final class Board implements Position
{
/** @var array $exportData The export data to save game state. */
private $exportData;
/**
* Construct a new 4 player chess state.
*
* ... | true |
b68853c7faba7e7e76a761f7b120ca2615eb0185 | PHP | opensymap/osy | /src/Helper/GoogleService.php | UTF-8 | 2,406 | 2.59375 | 3 | [] | no_license | <?php
namespace Opensymap\Helper;
class GoogleService
{
public static function geocodeAddress($add)
{
$add = urlencode($add);
$geourl = "http://maps.googleapis.com/maps/api/geocode/xml?address={$add}&sensor=false®ion=it";
// Create cUrl object to grab XML content using $ge... | true |
065c9b324ba4f4603e6df701d08df99a044b6368 | PHP | mst-ghi/simple-panel-with-laravel-nuxt | /shop-api/app/Tools/SMS/AbstractSms.php | UTF-8 | 1,973 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Tools\SMS;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Config;
use SoapClient;
abstract class AbstractSms {
/**
* The Client Of Sms Panels
*
* @var mixed $client
*/
private $client;
/**
* The Username Of Sms
*
* @var mixed $username
... | true |
af6029904c13a22a5830a18c5bb4a242e8b01717 | PHP | irssi-import/site-v2 | /html/generator/mainmenu.inc | UTF-8 | 2,431 | 2.59375 | 3 | [] | no_license | <?php
/*
* License disclaimer.
*
* For bugreports and other improvements contact The Irssi Project <staff@irssi.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either... | true |
343aacfedf7b838d6e4c792633affebed5b2b6b6 | PHP | GabrielBBorges/TCC-Academia | /processaAcesso.php | UTF-8 | 3,387 | 2.640625 | 3 | [] | no_license | <?php
namespace processaAcesso{
include 'connection.php';
Use Connection as Connection;
class ProcessaAcesso {
var $db;
public function __construct(){
$conexao = new Connection("localhost", "root", "", "bancolive");
$this->db = $conexao;
}
... | true |
fa40ae7eee33ca10c8650098d77177e640861928 | PHP | dahaigit/algorithm | /basics/object/overloading_menthd.php | UTF-8 | 825 | 3.59375 | 4 | [] | no_license | <?php
/*
* 面向对象 - 方法重载
*
* */
class MethodTest
{
/**
* 方法重载
* @param $name
* @param $arguments
* @author mhl
* @date ${YEAR}-${MONTH}-${DAY} ${TIME}
*/
public function __call($name, $arguments)
{
echo "方法重载:'$name' "
. implode(', ', $arguments). "\r\n";
... | true |
4c61bc826bffb0c4c208237dbf41ee75d6d4fdbf | PHP | BigData-Team8/Italian-Cuisine | /5_Presentation+Serving_layers/platform/src/Action/AboutAction.php | UTF-8 | 463 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Action;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Views\Twig;
final class AboutAction {
private $twig;
public function __construct(Twig $twig) {
$this->twig = $twig;
}
public function __invoke(ServerRequestInterface $re... | true |
941673418cc050ddfa20e424aa531416b822a772 | PHP | mazecode/cexscore_cpanel | /app/models/Plan.php | UTF-8 | 3,066 | 2.515625 | 3 | [] | no_license | <?php
/**
* Plan
*
* @property integer $id_plan
* @property string $descripcion_plan
* @property integer $cantidad_encuestas_plan
* @property integer ... | true |
0e8a0e6eeeb4be1efb9d1f6d0335c36ebddddb16 | PHP | puma20180606/twl | /module/Team/src/Team/Model/Team.php | UTF-8 | 725 | 2.734375 | 3 | [] | no_license | <?php
namespace Team\Model;
class Team
{
public $teamid;
public $teamname;
public $createby;
public $managedby;
public $createtm;
public $membernum;
public $logo;
public function exchangeArray($data)
{
$this->teamid=(isset($data['teamid'])?$data['teamid']:null);
$this->teamname=(isset($dat... | true |
5c04271f828c1d0b23e9fe44e88b46c3f4029715 | PHP | Agatha066/LerArquivoCSV | /ler.php | UTF-8 | 1,389 | 3 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt">
<head>
<meta charset="utf-8">
<title>importar PHP</title>
</head>
<body>
<form action="ler.php" method="post" enctype="multipart/form-data">
<h2>Nome do arquivo </h2>
arquivo: <input type="file" name="file"><br><br>
<input type="submit" value="Enviar Dados">
</form>
... | true |
8cb4f97dd8245360a9877448df5b73714cdfb344 | PHP | minhliem86/campaigns-ila | /resources/myLib/LP_lib.php | UTF-8 | 4,983 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
class LP_lib{
/***
SET ACTIVE
***/
public static function setActive($segment,$route,$class='active'){
return (\Request::segment($segment) == $route ? $class : '');
}
/**
* Block comment
*
* @param string
* UNICODE
*/
public static function unicode($string)
{
// Chuyển đổi ... | true |
6c9ce019c88fbd52812b565e7386f4b7c22224cc | PHP | ianarsenault/ASCapstoneProject | /models/protechFunc.php | UTF-8 | 4,060 | 2.953125 | 3 | [] | no_license | <?php /** Protech Solutions Functions */
/** Order Data Function
* @param $db
* @param $product
* @param $fName
* @param $lName
* @param $email
* @return mixed
*/
function order_Data($db, $product, $fName, $lName, $email) {
try {
$sql = "INSERT INTO orders SET product = :product, fName = :fName, lN... | true |
5ab59f9a77f804cc72c7a09560eb2015158ca7ae | PHP | umeshdhakar/depository | /form.php | UTF-8 | 13,842 | 2.578125 | 3 | [] | no_license | <?php session_start();
require ('dbconnect.php');
date_default_timezone_set("Asia/Kolkata");
$typeErr = $collegeErr = $imgErr = "";
function generateRandomString() {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
... | true |
dd8082dbf4c93d429e59031312d4fbdf92dbeb4e | PHP | gulyassimone/ELTE-3-Webfejleszt-s | /lessons/10.ora/movies2.php | UTF-8 | 584 | 3.234375 | 3 | [] | no_license | <?php
class Movie
{
public $id = NULL;
public $title = NULL;
public $year = NULL;
public function __construct($id, $title, $year)
{
$this->id = $id;
$this->title = $title;
$this->year = $year;
}
}
$movies = [
'1' => new Movie(1, 'The Sack', 2017),
'2' => new M... | true |
5cd466b006b28ca8292f087db3d4f94a4c082543 | PHP | arbor-education/sis-sdk-php | /src/Arbor/Model/PersonImpairment.php | UTF-8 | 3,365 | 2.671875 | 3 | [] | no_license | <?php
namespace Arbor\Model;
use Arbor\Resource\ResourceType;
use Arbor\Query\Query;
use Arbor\Model\ModelBase;
class PersonImpairment extends ModelBase
{
public const PERSON = 'person';
public const PERSON_IMPAIRMENT_NAME = 'personImpairmentName';
public const IMPAIRMENT_CATEGORY = 'impairmentCategory... | true |
d536cab57a9fd70b96a7e468b3ccdc0a629b8f28 | PHP | eggysetiawan/gr-tech | /app/DataTables/CompanyDataTable.php | UTF-8 | 3,231 | 2.578125 | 3 | [] | no_license | <?php
namespace App\DataTables;
use App\Models\Company;
use Yajra\DataTables\Html\Column;
use Yajra\DataTables\Services\DataTable;
class CompanyDataTable extends DataTable
{
/**
* Build DataTable class.
*
* @param mixed $query Results from query() method.
* @return \Yajra\DataTables\DataTable... | true |
f5f0e461745f29b7e579db042d9d24c4c3c44e88 | PHP | williamenrique/Dashboard-LTE-B4.5 | /system/app/Controllers/LoginController.php | UTF-8 | 3,850 | 2.546875 | 3 | [] | no_license | <?php
class Login extends Controllers{
public function __construct(){
session_start();
if (isset($_SESSION['login'])) {
header("Location:".base_url().'dashboard');
}
//invocar para que se ejecute el metodo de la herencia
parent::__construct();
}
public function login(){
//invocar la vista con views y... | true |
11d0d5e8051811175780525f37e98ea680b2bf3a | PHP | loyalpy/dns | /1dns/app/mvc/mvc_model.php | UTF-8 | 3,568 | 2.84375 | 3 | [] | no_license | <?php
class tModel{
//数据库操作对象
private $db = NULL;
//数据表名称
private $table_name = '';
//要更新的表数据,key:对应表字段; value:数据;
private $table_data = array();
//构造函数,创建数据库对象
public function __construct($table_name,$dbinfo=array()){
$dbinfo = empty($dbinfo)?App::get_conf("db.main"):$dbinfo;
$this->db = tDB::get_db($db... | true |
895e0188e23214273619653cd7d08c28c09f59c2 | PHP | helpesh/Messaging | /Encryption_Setting.php | UTF-8 | 295 | 2.515625 | 3 | [] | no_license | <?php
//Store the cipher method
$ciphering ="AES-256-CTR";
//Use openSSL Encryption method
$iv_length=openssl_cipher_iv_length($ciphering);
$options=0;
//Non-Null intialization vector
$encryption_iv='1234567891101112';
$encryption_key="EgyptiansAreGreatAndAmericansAre";
?> | true |
be7e5e6f59b932b2b42fff77c4f3c9413d62e0b5 | PHP | mehdibo/php-fcm | /src/Receiver/Condition.php | UTF-8 | 561 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Mehdibo\Fcm\Receiver;
/**
* Condition to send a message
* @package Mehdibo\Fcm\Receiver
* @see https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#resource:-message
*/
class Condition implements Receiver
{
private string $condition;
public function __construct(string... | true |
d96510f85fe3c7672af7cad87c79128211f8d9a3 | PHP | gene222-arch/gpa-laravel-pos-inventory | /app/Http/Controllers/Api/Auth/AuthController.php | UTF-8 | 2,509 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api\Auth;
use App\Http\Controllers\Controller;
use App\Http\Requests\Auth\ChangeEmailRequest;
use App\Http\Requests\Auth\ChangeNameRequest;
use App\Http\Requests\Auth\ChangePasswordRequest;
use App\Http\Requests\Auth\CheckPasswordRequest;
use App\Traits\ApiResponser;
use App\Trait... | true |
93ffe7a7e8ef9431dbe73081c7590da6301c1560 | PHP | mikhalchuk/search-results-aggregator | /src/Search.php | UTF-8 | 899 | 3.109375 | 3 | [] | no_license | <?php
namespace SearchResultsAggregator;
use SearchResultsAggregator\Engine\EngineInterface;
class Search
{
protected $engines = [];
public function __construct(array $engines = [])
{
$this->engines = $engines;
}
public function pushEngine(EngineInterface $engine)
{
$this->en... | true |
0699fc921163c1dc44a1bbe2176980aed0b59025 | PHP | zhyravskiyo/test3 | /core/DB.php | UTF-8 | 734 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: oleg
* Date: 04.12.17
* Time: 6:06
*/
/**
* This class implement Singleton pattern.
*/
namespace Core;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Setup;
class DB
{
private static $me = null;
private $entityManager = null;
private fun... | true |
493f378e119ca536e83b51e4109420d1f82f9039 | PHP | AmaniYunge/George-Wingety | /app/controllers/ProformaInvoiceController.php | UTF-8 | 3,728 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class ProformaInvoiceController extends \BaseController {
public $restful = true;
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index($id = null)
{
if($id==null) {
$proformaInvoices = ProformaInvoice::all();
re... | true |
1742163217d87fa94638755736ef26c26bb0029b | PHP | inspiredminds/contao-unified-event-aliases | /src/UnifiedEventAliases.php | UTF-8 | 4,085 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
/*
* This file is part of the Contao Unified Event Aliases extension.
*
* (c) inspiredminds
*
* @license LGPL-3.0-or-later
*/
namespace InspiredMinds\ContaoUnifiedEventAliases;
use Contao\CalendarEventsModel;
use Contao\CalendarModel;
use Contao\PageModel;
use Symfony\Component\... | true |
a184292f10af0372c9ac1bd15d3896bcc6bc5ad3 | PHP | zakariasamy/ITI-Tasks | /16/6.php | UTF-8 | 114 | 3.234375 | 3 | [] | no_license | <?php
$n1 = 20;
$n2 = 10;
if($n1 == 30 || $n2 == 30 || $n1 + $n2 == 30)
echo 'True';
else
echo "False";
| true |
0f4de4c66e2901bac741f6f6db0238ac69e5b83f | PHP | CodeHubOrg/CodeHub | /blocks/plain_text/controller.php | UTF-8 | 1,128 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
defined('C5_EXECUTE') or die("Access Denied.");
/**
* A block controller for displaying plain text on a page.
* @author Katja Durrani
*/
class PlainTextBlockController extends BlockController {
protected $btTable = 'btPlainText';
protected $btName = 'Plain text';
protected $btHandle = 'plain_text';
prot... | true |
ac074898a8027c7dd438f84eb6ca923228da81f4 | PHP | tim31al/test-amopoint | /src/Api/Controller/AbstractController.php | UTF-8 | 802 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Api\Controller;
use Fig\Http\Message\StatusCodeInterface;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface as Response;
abstract class AbstractController
{
protected ContainerInterface $container;
/**
* AbstractController constructor.
* @param \Psr... | true |
707aeb0052382740bc91c6abccbbfbc795f39cfa | PHP | Abanod00/AComer | /resources/aComerWeb/paginas/anadirRestaurante.php | UTF-8 | 2,722 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="es">
<head>
<title>A Comer - Inicio</title>
<meta charset="utf-8">
</head>
<body id="body">
<header id="header"></header>
<main id="main">
<?php
// El siguiente código creará un nuevo restaurante en la tabla de usuarios
session_start();
// check for requi... | true |
ceb200ff7b457374a8bd2740960c493bb2b47b01 | PHP | rapideinternet/afd.connectors | /src/Models/SKP/AuthToken.php | UTF-8 | 429 | 2.578125 | 3 | [] | no_license | <?php
namespace SIVI\AFDConnectors\Models\SKP;
use SIVI\AFDConnectors\Exceptions\Exception;
/**
* Class AuthToken
* @package SIVI\AFDConnectors\Models\SKP
*/
class AuthToken
{
public $token;
public function __set($name, $value)
{
if ($name === 'GetTokenResult' && $value->Category === 'Error'... | true |
fddbc38a94da7f4cf2eb78cd89d33c835b26ee8f | PHP | Alex331349470/shop | /app/Http/Requests/Api/OrderRequest.php | UTF-8 | 1,889 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests\Api;
use App\Models\Good;
use Illuminate\Contracts\Validation\Rule;
class OrderRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
// 判断用... | true |
90ba48999955d04c4b731fc44268a5e27b8568ea | PHP | gilmarsisjunior/PHP-Orientado-a-Objetos | /POO/Object.php | UTF-8 | 357 | 3.015625 | 3 | [] | no_license | <?php
require('GettersEsetters.php');
$p1 = new ContaBanco();
$p2 = new ContaBanco();
$p1 -> abrirConta('CC');
$p1 -> setNumConta(111);
$p1 -> setDono('Gilmar');
$p1 -> sacar(50);
$p2 -> abrirConta('CP');
$p2 -> setNumConta(3211);
$p2 -> setDono('Pedro');
echo '<pre>';
print_r($p1);
echo '<pre/> <br/>';
echo ... | true |
43387070bcf371d39e6d681a91f39ae13918f5c5 | PHP | forkcms/library | /spoon/tests/form/SpoonFormHiddenTest.php | UTF-8 | 2,083 | 2.765625 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
$includePath = dirname(dirname(dirname(dirname(__FILE__))));
set_include_path(get_include_path() . PATH_SEPARATOR . $includePath);
require_once 'spoon/spoon.php';
class SpoonFormHiddenTest extends TestCase
{
/**
* @var SpoonForm
*/
protected $frm;
/**
* @var SpoonForm... | true |
fccb0c0e9b35be206806b6dab92bc249d260d7f1 | PHP | nilsenj/fba | /fbavue/FBA/Models/Item.php | UTF-8 | 804 | 2.859375 | 3 | [] | no_license | <?php
namespace FBA\Models;
use Illuminate\Database\Eloquent\Model;
use RepositoryLab\Repository\Contracts\Transformable;
use RepositoryLab\Repository\Traits\TransformableTrait;
/**
* Class Item
* @package FBA\Models
*/
class Item extends Model implements Transformable
{
use TransformableTrait;
/**
... | true |
66631d7bc0698a75d09e3baa732ac515aa59a181 | PHP | asalmeidarj/PHP-PDO | /src/Domain/Repository/StudentRepository.php | UTF-8 | 425 | 2.765625 | 3 | [] | no_license | <?php
namespace Asalmeidarj\Pdo\Domain\Repository;
use DateTimeInterface;
use Asalmeidarj\Pdo\Domain\Model\Student;
interface StudentRepository
{
public function allStudent(): array;
public function studentWithPhone(): array;
public function studentBirthAt(DateTimeInterface $birthDate): array;
pub... | true |
fda39e678bfa6392b03bfd390639effe4a1a321a | PHP | alexdiasgonsales/mostra-ifrs-poa | /libraries/bo/campus_bo.php | UTF-8 | 1,032 | 2.734375 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of campus_bo
*
* @author jean
*/
class Campus_bo {
/**
*
* @var Campus_dao
*/
... | true |
5152f04e431d5aae8e6ab3af36cd2282bd287bbb | PHP | FrancescoDale/php-oop-1 | /index.php | UTF-8 | 1,423 | 4.3125 | 4 | [] | no_license | <?php
// echo "test";
// echo "<br>";
class Movie {
// dichiarazione variabili
public $title;
public $language;
public $year;
//costruttore
function __construct($_title, $_language, $_year) {
... | true |
b6ebd893ccb129bd3883ec9ddc271e33b9774002 | PHP | japhmarcos/sams | /app/controllers/AdminController.php | UTF-8 | 18,156 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
class AdminController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$users = User::count();
$sections = Section1::groupBy('id')->count();
$subject = Subject1::groupBy('id')->count();
$room = Room::groupBy('id')->count()... | true |
66ec24d31dea4bbfde6b075ef3680b795091dfd6 | PHP | Andriykutsak/ruha | /user.php | UTF-8 | 3,017 | 2.625 | 3 | [] | no_license | <?
include_once ('config.php');
if(!empty($user)){
echo '<div class="head"><center>Кабинет</center></div>';
echo '<div class="kabi"><center><a href="kabik.php">Личный Кабинет</a></center></div>';
$num = 10;
$page = $_GET['page'];
$result00 = mysql_query("SELECT COUNT(*) FROM `users`");
$temp = mysql_fetch_array($r... | true |
7bcd6cf27e4cf187078648fe2c9023d15fdbea47 | PHP | vipin73/res-scheduler | /database/migrations/2017_06_26_124718_create_skills_used_table.php | UTF-8 | 488 | 2.65625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSkillsUsedTable extends Migration {
public function up()
{
Schema::create('skills_used', function(Blueprint $table) {
$table->increments('id');
$table->integer('skill_id')->unsigned();
$table->times... | true |
47a2c60b2363e8647ccee235d3fd55f4067900d6 | PHP | OhkaBaka/Bag-O-Tricks | /permutations/perm1.php | UTF-8 | 570 | 3.09375 | 3 | [] | no_license | <?php
//6Zu, 6uZ, Z6u, Zu6, u6Z, uZ6
function perm( $input ) {
global $loopz;
$array = (is_array($input) ? $input :str_split($input) );
if(1 == count($array)) return $array;
$result = array();
foreach($array as $key => $head){
foreach( perm(array_diff_key($array, array($key => $head))) as $tail){
$result[] =... | true |
72afb581b4bc181ec48bdaf86584d85bee1568eb | PHP | mohammad79-ch/php-challenges | /challenge19.php | UTF-8 | 249 | 3.96875 | 4 | [] | no_license | <?php
/** Given a string, return true if its length is even or false if the length is odd. */
function oddOrEven($str){
$length = strlen($str);
return $length % 2 == 0 ? "Even" : "Odd";
}
echo "<pre>";
die(var_dump(oddOrEven("mamad"))); | true |
05378e5d287b4c8ea6d22a9ec2615c8724ba0cbd | PHP | Setono/SyliusAlgoliaPlugin | /src/Exception/NonExistingIndexException.php | UTF-8 | 614 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Setono\SyliusAlgoliaPlugin\Exception;
final class NonExistingIndexException extends \InvalidArgumentException
{
/**
* @param list<string>|null $availableIndexes
*/
public static function fromName(string $name, array $availableIndexes = null): self
{
... | true |
7b5f3b54c7b7383a6305559c4e3f4863e00c5f15 | PHP | RosaGonzalez/proyectoDAW | /ProyectoDAW/php/registroEjercicio.php | UTF-8 | 1,781 | 2.828125 | 3 | [] | no_license | <?php
require_once "conexion.php";
require_once "validacion.php";
/**
* Clase Registro
* la cual recoge el JSON de registro.js.
* valida los datos recibidos antes de enviarlos a la BBDD
* recoge id, login. ???????????
*/
class registroEjercicios{
public function conexion()
{
$dato... | true |
85e606aa02fbea4c07b9a2b2a06f37de85946249 | PHP | ikzzz/php_lvl_1 | /lesson_1/Zadanie_3.php | UTF-8 | 776 | 3.453125 | 3 | [] | no_license | <?php
$a = 5;
$b = '05';
var_dump($a == $b); // Почему true? - строковая переменная преобразовалась в числовое значение.
var_dump((int)'012345'); // Почему 12345? - целочисленный тип переменных начинается с единицы, ноль отбросился.
var_dump((float)123.0 === (int)123.0); // Почему false?... | true |
4df69931f56832f87486248cb3938e379c62288b | PHP | freepopo/anno-domini | /controllers/users_controller.php | UTF-8 | 3,969 | 2.640625 | 3 | [] | no_license | <?
/**
* Manages User records and access
*
*/
class UsersController extends AppController {
/**
* Controller name for backwards compatibility in PHP 4
*
* @var string $name Name of table & controller
*/
var $name = 'Users';
/**
* Default layout used by this controller
*
* @var $layout The filename (witho... | true |
65f75e06f8591912df78ebec13b64c16cbee3fc9 | PHP | sametsahindogan/response-object-creator | /src/SuccessResult.php | UTF-8 | 378 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Sametsahindogan\ResponseObjectCreator;
/**
* Class SuccessResult
* @package Sametsahindogan\ResponseObjectCreator
*/
class SuccessResult extends Result
{
/**
* SuccessResult constructor.
* @param array $data
*/
public function __construct(array $data = [])
{
$this... | true |
4f008a63af98c81b3da45ea3377a8ded2363c62b | PHP | ampproject/amp-toolbox-php | /src/Optimizer/Transformer.php | UTF-8 | 578 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace AmpProject\Optimizer;
use AmpProject\Dom\Document;
/**
* A singular transformer that is part of the transformation engine.
*
* @package ampproject/amp-toolbox
*/
interface Transformer
{
/**
* Apply transformations to the provided DOM document.
*
* @param Document $docume... | true |
52b2c9209067c11d89fe9e471a1307f6ab08bedc | PHP | Suchawadeee/yii-app | /common/models/Authority.php | UTF-8 | 802 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "authority".
*
* @property integer $authority_id
* @property string $authority_name
*/
class Authority extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'au... | true |
186e417daa880e189f30a4d5ca54f18a9428207c | PHP | Hesham-Fahed/hip-hop-goblin | /upload/id3.php | UTF-8 | 3,570 | 2.796875 | 3 | [] | no_license | <?php
mysql_connect('localhost', 'devsquid_hhg', 'SAVAGERY99');
mysql_select_db('devsquid_hhg');
function encrypt($string, $key) {
$result = '';
for($i=0; $i<strlen($string); $i++) {
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key))-1, 1);
... | true |
749c5b8b85c8c667d635bf45799efcb1b633e144 | PHP | stevenrichter16/UW-Oshkosh-Projects | /Android Wishlist Application/PHP/checkLogin.php | UTF-8 | 409 | 2.515625 | 3 | [] | no_license | <?php
$db = new PDO("mysql:dbname=credentials;
host=localhost","richts@localhost", "0741322");
$username = $_GET['u_name'];
$password = $_GET['p_word'];
$sql = "SELECT `u_name`,`p_word` FROM `creds` WHERE `u_name`='$username' AND `p_word`='$password'";
$result = $db->query($sql)->fetchAll(PDO::FETCH_ASSO... | true |
8000aec01a577bffad8f6f89bd7e8c8c3a15d096 | PHP | Comp-MC/vultr-php | /src/ReservedIPs.php | UTF-8 | 6,115 | 2.875 | 3 | [] | no_license | <?php
/**
* PHP Wrapper to Interact with Vultr 2.0 API
*
* @package Vultr
* @version 2.0
* @author https://github.com/dutchie027
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @see https://github.com/dutche027/vultr-php
* @see https://packagist.org/packages/dutchie027/vultr
* @se... | true |
160c3d855a6993db33a18991063069888cd57ddb | PHP | kevindierkx/LaravelS3v2 | /src/Bridge/Adapter.php | UTF-8 | 428 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Kevindierkx\LaravelS3v2\Bridge;
use League\Flysystem\AwsS3v2\AwsS3Adapter;
class Adapter extends AwsS3Adapter
{
/**
* Get the URL for the file at the given path.
*
* @param string $path
* @return string
*/
public function getUrl($path)
{
$path = $this->a... | true |
486a5fd2694d4e45f88c5231a0c72698442df50f | PHP | libis/ReIReSearch | /front/app/Helpers/Parser.php | UTF-8 | 2,820 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Helpers;
use Illuminate\Support\Facades\Log;
function swap(&$a,&$b) {
$t = $a;
$a = $b;
$b = $t;
}
class Leaf {
private $field;
private $query;
public $type;
public function __construct($field,$query) {
$this->field = $field;
$this->query = $query;
... | true |
6d504e4c2930152b318ba7a36a205a1c51fb6b3f | PHP | Ziggeo/simple-box-integration | /src/Base/BoxHttpClientInterface.php | UTF-8 | 656 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Ziggeo\BoxContent\Base;
/**
* BoxHttpClientInterface
*/
interface BoxHttpClientInterface
{
/**
* Send request to the server and fetch the raw response
*
* @param string $url URL/Endpoint to send the request to
* @param string $method Request Method
* @param string|... | true |
a55d7c59adda39fadf54b28f5ee91fbffe391ba2 | PHP | tehfoxen/corrosion | /source/application/classes/fieldsform__.php | UTF-8 | 7,901 | 3.078125 | 3 | [] | no_license | <?
/** Набор отображений различных полей формы */
class FieldsForm{
function Select(array $value_array, string $selectName, $options=array()) {
/**
1. array $value_array : массив значений для селекта $key=>$value
2. string $selectName : название поля name
3. selected_value : ... | true |
b8fd255ad50e8a0fdcec20d2f130a619d0c22ab1 | PHP | vistait2018/eclean | /functions/editableInclude.php | UTF-8 | 1,783 | 2.609375 | 3 | [] | no_license | <?php
function editableInclude($file,$id,$editable=false, $toolbar=true) {
$file = __SITEPATH__.'contents/'.$file;
$isFile = is_file($file);
//var_dump($_POST);
if($editable){
if(isset($_POST['Editable-'.$id])){
$fh = fopen($file,'w+');
$content = $_POST['Editable-'.$id];
if($fh and fwrite($fh, $cont... | true |
459ade0fc9ee99d3c5374d026ad70392f4dcc252 | PHP | ProjetTuteure2017/notation | /Model/CompetenceGateway.php | UTF-8 | 3,345 | 2.796875 | 3 | [] | no_license | <?php
class CompetenceGateway
{
public function SelectAll($grilleId)
{
include '../notation/Includes/connect.php';
$stmt = $conn->prepare("SELECT * FROM competence WHERE grilleId= :GrilleID");
$stmt->execute(array("GrilleID"=>$grilleId));
$result = $stmt->fetchAll();
return $result;
}
public function... | true |
bdf793dfe1b16e62cef4f129a51787b6f5b98b9e | PHP | noprobzcoder09/helixdev | /app/EmployeeProject.php | UTF-8 | 808 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Project;
use DB;
class EmployeeProject extends Model
{
protected $table = 'employee_projects';
public static function insertProjects($employee, $projects)
{
foreach($projects as $project) {
$company_projec... | true |
fd74cc4451a67c8dbad707e812416905634a39da | PHP | ricky2151/patrol | /laravelweb_PSy/app/Http/Controllers/IotController.php | UTF-8 | 5,876 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Salman\Mqtt\MqttClass\Mqtt;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Arr;
use Carbon\Carbon;
use App\Models\Room;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception... | true |
ad472e8016bc36c8767885dc50f9fa2ba3efb00a | PHP | godfern13/karbens_edetailing | /classes/classes_14_09_2013.php | UTF-8 | 13,236 | 2.75 | 3 | [] | no_license | <?php
/***********************************************************************************************************
CONTENT CLASS
************************************************************************************************************/
class contentClass
{
private $name;
private $addedDate;
priv... | true |
6863522717f38d570789311afee5f8b6565d7793 | PHP | nibblegap/PHP-Search-Engine-Using-Bing-API | /Script/public/image.php | UTF-8 | 2,218 | 2.703125 | 3 | [] | no_license | <?php
/**
* This file serves as a proxy between the end-user and the requested resource.
*/
require_once('../app/includes/config.php');
$referrer = parse_url($_SERVER['HTTP_REFERER'] ?? null);
$image = parse_url($_SERVER['REQUEST_URI'] ?? null);
$host = parse_url(URL_PATH);
// If there's no referrer set
if(isset(... | true |
d1795f133c673414e8c228508ebfceb92a8e11ac | PHP | wesleynw/tinyweatherstation.com | /getdata.php | UTF-8 | 1,109 | 2.609375 | 3 | [] | no_license | <?php
header("content-type: application/json");
date_default_timezone_set('America/Los_Angeles');
require 'vendor/autoload.php';
use Carbon\Carbon;
//this mysql user is granted only select privileges, you may use it to fetch data if you would like...
$connection = new MySQLi('178.128.152.62', 'webuser', '1234', 'weat... | true |
edb80db30c23d64f8537e47fda72ba702f704e75 | PHP | babuenop/PHP | /Lab10/lab102.php | WINDOWS-1258 | 875 | 2.796875 | 3 | [] | no_license | <?PHP
if(array_key_exists('enviar', $_POST))
{
$expire=time()+60*5;
setcookie("user", $_REQUEST['visitante'],$expire);
header ("Refresh:0");
}
?>
<HTML LANG="es">
<HEAD>
<TITLE>Laboratorio 10</TITLE>
<LINK REL="stylesheet" TYPE= "text/css" HREF="css/estilo.css">
</HEAD>
<BODY>
<H1> Creacion de Cookies</H1... | true |
9f32b2ff8b69f03a8ed91f1c61133e3026f98c5d | PHP | Hichmovixh/composer2 | /profil/public.php | UTF-8 | 105 | 2.5625 | 3 | [] | no_license | <?php
require '../vendor/autoload.php';
$talkAgain = new HelloWorld\SayHello;
echo $talkAgain->world();
| true |