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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
16e881ae7ad51d8b00e000a24b0dfc2da463eddc | PHP | hahnmiranda/NaMedida-ferramenta | /php/perfil.php | UTF-8 | 1,519 | 2.53125 | 3 | [] | no_license | <?php
// conexao
include_once 'db_connect.php';
// header
include_once 'includes/header.php';
// message
include_once 'includes/message.php';
// sessao
session_start();
// verificando se usuario esta logado
// caso não esteja retorna para tela login
if (!isset($_SESSION['logado'])) {
header('Location: ../index.php... | true |
81b3675aca258553249932d9c1c2c2dfbcb8e7d7 | PHP | easyndfaster/SuccessTester | /Helper/Order.php | UTF-8 | 1,751 | 2.59375 | 3 | [] | no_license | <?php
namespace EasyAndFaster\SuccessTester\Helper;
use Magento\Eav\Model\Entity\Collection\AbstractCollection;
class Order
{
protected $orderFactory;
protected $orderRepository;
protected $searchCriteriaBuilder;
public function __construct(
\Magento\Sales\Api\OrderRepositoryInterfac... | true |
ecda70e28b8299c4bbc622f41ef2d0fe3cc1fad5 | PHP | joshuabarron1997/Portfolio-Site | /Contact.php | UTF-8 | 7,128 | 2.703125 | 3 | [] | no_license | <?php
require_once("email.class.php");
$status = "";
//self posting variables
$name = "";
$email = "";
$reason = "";
$message = "";
//self posting errors
$nameERR = "";
$emailERR = "";
$messageERR = "";
if (isset($_POST['submit'])){
$name = $_POST['name'];
$email = $_POST['email'];
$reason = $_POST['reaso... | true |
d64715e709c67430fe5eb9feb74ce672f0a12f36 | PHP | thexdesk/develop | /codex/core/src/Filesystem/Utils/Copier.php | UTF-8 | 5,348 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Codex\Filesystem\Utils;
use Codex\Filesystem\File;
use Codex\Filesystem\FileCollection;
use Codex\Filesystem\Local;
use Illuminate\Support\Arr;
use League\Flysystem\FilesystemInterface;
use Webmozart\Glob\Glob;
class Copier
{
/** @var \League\Flysystem\FilesystemInterface|\Codex\Filesystem\Loca... | true |
ca0dd23087ec3a2f70bde3d12d5f5d31b37518c7 | PHP | iyzico/iyzipay-php | /tests/Iyzipay/Tests/Request/RetrieveLoyaltyRequestTest.php | UTF-8 | 2,753 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Iyzipay\Tests\Request;
use Iyzipay\Model\Locale;
use Iyzipay\Model\Currency;
use Iyzipay\Tests\TestCase;
class RetrieveLoyaltyRequestTest extends TestCase
{
public function test_should_get_json_object()
{
$request = $this->prepareRequest();
$jsonObject = $request->getJsonObjec... | true |
54f61e9a67bc57325c58fff7ad21dbc109e1307f | PHP | V-labs/address-bundle | /VO/CoordinatesVO.php | UTF-8 | 572 | 2.921875 | 3 | [] | no_license | <?php
namespace Vlabs\AddressBundle\VO;
class CoordinatesVO
{
public $latitude;
public $longitude;
/**
* CoordinatesVO constructor.
* @param string $lat
* @param string $lon
*/
public function __construct($lat, $lon)
{
if(empty($lat)){
throw new \InvalidArg... | true |
b8577c1aafb061304cbede3fc250e62fabfcdeea | PHP | illuminatech/data-provider | /src/Filters/FilterCallback.php | UTF-8 | 1,595 | 2.875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @link https://github.com/illuminatech
* @copyright Copyright (c) 2019 Illuminatech
* @license [New BSD License](http://www.opensource.org/licenses/bsd-license.php)
*/
namespace Illuminatech\DataProvider\Filters;
use Illuminatech\DataProvider\FilterContract;
/**
* FilterCallback allows specification ... | true |
26799d11193ce86a7f996f8c6491c7acc6eeb53d | PHP | GBozhilov/PHP-Web-Development-Basics | /18. EXERCISE DEFINING CLASSES/DefiningClassesEx/Inheritance/04.OnlineRadioDatabase/Playlist.php | UTF-8 | 1,251 | 3.8125 | 4 | [] | no_license | <?php
/**
* Class Playlist
*/
class Playlist
{
/**
* @var Song[]
*/
private $songs;
/**
* @var int
*/
private $totalSeconds;
/**
* Playlist constructor.
*/
public function __construct()
{
$this->songs = [];
$this->totalSeconds = 0;
}
... | true |
e078a2bdcfe86357b5e173a20c97b7b2cc6f87de | PHP | wallacehenriquesilva/VilaVicentinaProvider | /service/SobreService.php | UTF-8 | 1,406 | 3.09375 | 3 | [] | no_license | <?php
require_once("business/SobreBusiness.php");
require_once("model/SobreDto.php");
/**
*
* @author Wallace e Cias
*
*/
class SobreService
{
var $sobreBusiness;
var $sobreDto;
/**
* Método construtor da classe CursoService
*/
public function SobreService()
{
$this->sobreBu... | true |
39827cd58c89c04c36ffc11afce3f4010a642774 | PHP | nhphong2009/Shoes-laravel | /app/Http/Controllers/CategoryController.php | UTF-8 | 4,882 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Category;
use Validator;
use Illuminate\Http\Request;
class CategoryController extends Controller
{
public function __construct()
{
$this->middleware('auth:admin');
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\... | true |
0350368d04277dec842e513bf72a282d77ed63d6 | PHP | magento-russia/3 | /app/code/local/Df/Core/Model/Css/Rule/Set.php | UTF-8 | 1,633 | 2.65625 | 3 | [] | no_license | <?php
/** @method Df_Core_Model_Css_Rule_Set addItem(Df_Core_Model_Css_Rule $item) */
class Df_Core_Model_Css_Rule_Set extends Df_Varien_Data_Collection {
/**
* @used-by i()
* @used-by Df_Core_Model_Css::addHider()
* @param string $name
* @param string $value
* @param string|null $units [optional]
* @retur... | true |
ff45bfa566bd73b2b5424280f328e2856bb2babb | PHP | rdmpage/geojson-phylogeny | /make_json.php | UTF-8 | 355 | 2.6875 | 3 | [] | no_license | <?php
// Read a NEXUS file and generate GeoJSON
require_once ('geojson_tree_drawer.php');
$filename = '';
if ($argc < 2)
{
echo "Usage: make_json.php <NEXUS file> \n";
exit(1);
}
else
{
$filename = $argv[1];
}
$file = @fopen($filename, "r") or die("couldn't open $filename");
fclose($file);
$json = create_geojs... | true |
180adcdfb740a908ee4103b180eb5b4f84ed6f45 | PHP | Axel1987/example | /api/app/Contract/ReviewInterface.php | UTF-8 | 1,301 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Contract;
use App\Http\Request\Client\CreateReviewRequest;
use App\Http\Request\Client\EditReviewRequest;
use App\Review;
use App\Service\ReviewService;
interface ReviewInterface
{
/**
* Return list of reviews with paginate
*
* @return \Illuminate\Contracts\Pagination\LengthAwa... | true |
e0d86d2a1ed7b2e606f9c07f7d68c559debcd9ac | PHP | businessprocess/payhub-sdk | /src/Service/Webhook.php | UTF-8 | 1,262 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Payhub\Service;
use Payhub\Contracts\HttpClient;
class Webhook
{
public function __construct(protected HttpClient $client)
{
}
/**
* @return array<\Payhub\Models\Webhook>
*/
public function all(): array
{
$response = $this->client->get('{key}/webhook');
... | true |
055ed22ff4da2f408a20201acbf831838455ac2b | PHP | hermany/nucleo | /ajax/ajax-mail-mainter.php | UTF-8 | 713 | 2.734375 | 3 | [] | no_license | <?php
require_once("../clases/class-constructor.php");
$fmt = new CONSTRUCTOR();
$nombre = $_POST["inputNombre"];
$email = $_POST["inputEmail"];
$telefono = $_POST["inputTelf"];
$motivo = $_POST["inputMotivo"];
$consulta = $_POST["inputConsulta"];
$mensaje = "<strong>Nombre: </strong>".$nombre."<br><strong>Email: <... | true |
9e63ed9734140716085a20f9047bfaab2029db8d | PHP | Phobus123/Grayink | /ContactForm.php | UTF-8 | 2,990 | 2.640625 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link type="text/css" rel="stylesheet" href="style.css">
</head>
<body>
<div>Hi
<?php
require '/home/cheekin/PHPMailer-master/class.phpmailer.php';
require '/home/cheekin/PHPMailer-master/class.smtp.php';
$firstName = $_POST["Firs... | true |
b1263e15d65c3d4e5004443af41db22c813b7a14 | PHP | hagakure202/imt | /index.php | UTF-8 | 1,710 | 2.84375 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['cart'])){
$_SESSION['cart']=['sum'=>0,'items'=>[]];
}
require 'products.php';
$products = getProducts();
$errors = [];
if(!empty($_POST)){
if(isset($_POST['product'])&&$_POST['product']!=0){
$product = $_POST['product'];
}else{
$errors['product']='Выберите товар ... | true |
e4f6176b8ebbae8ac46a279026e33c5777daf653 | PHP | zbateson/mail-mime-parser | /tests/MailMimeParser/IntegrationTests/EmailFunctionalTest.php | UTF-8 | 94,124 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | <?php
namespace ZBateson\MailMimeParser\IntegrationTests;
use DateTime;
use GuzzleHttp\Psr7\Utils;
use PHPUnit\Framework\TestCase;
use ZBateson\MailMimeParser\MailMimeParser;
use ZBateson\MailMimeParser\Message;
use ZBateson\MailMimeParser\Message\IMimePart;
/**
* Description of EmailFunctionalTest
*
* @group Fun... | true |
5f042c63ee21b8eaf5b2a2ecd03b846aaf8e2cb1 | PHP | DiazLighuen/Grupo10Taller | /model/HotelRepository.php | UTF-8 | 1,830 | 2.90625 | 3 | [] | no_license | <?php
/**
* Class LoginRepository
*/
class HotelRepository extends PDORepository{
private static $instance;
public static function getInstance(){
if (!isset(self::$instance)) {
self::$instance = new self();
}
return self::$instance;
}
public function __constru... | true |
072c35fcaed114bac9de4120441f8ea2b72e970b | PHP | worksolutions/bitrix-module-migrations | /lib/entities/setuplogmodel.php | UTF-8 | 2,029 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Maxim Sokolovsky <sokolovsky@worksolutions.ru>
*/
namespace WS\Migrations\Entities;
use Bitrix\Main\Type\DateTime;
use Bitrix\Main\UserTable;
use WS\Migrations\factories\DateTimeFactory;
class SetupLogModel extends BaseEntity {
public
$id, $userId;
/**
* @var \DateTime
... | true |
ef727891061866b0e7e65907dedd24963c1a9cf7 | PHP | alessandra24x/parcial_prog3 | /controllers/vehicleController.php | UTF-8 | 1,870 | 2.9375 | 3 | [] | no_license | <?php
function addVehicle($params, $token) {
if ($params === null) {
response('there are no params');
return;
}
if (validatorJWT($token) === null) {
response("Token no valido");
return;
}
$patenteYaExiste = Vehicle::getByPatente($_POST['patente']) !== null;
if ($... | true |
9f345670d8678785d49a36a690c2b9863f0bb1b4 | PHP | jamespjz/php-kong | /src/Controllers/ServiceController.php | UTF-8 | 2,787 | 2.953125 | 3 | [] | no_license | <?php
/**
* 服务相关操作类
* @package Jamespi\Kong\Controllers
* @author ZT PHP DEV TEAM PIJIANZHONG(jianzhongpi@163.com)
* @create 2020年1月29日 下午9:50
*/
namespace Jamespi\Kong\Controllers;
use Jamespi\Kong\Common\HttpHelper;
use Jamespi\Kong\Common\CheckHelper;
class ServiceController{
protected $baseUri;
/**... | true |
2f6bb7271fa006039d205c1c9fd53c7fc89079de | PHP | terigel/Campus-part-time-platform | /public_function.php | UTF-8 | 3,057 | 2.65625 | 3 | [] | no_license | <?php
function login_yz($val1,$val2,$val3,$link){
$sql="select id,username,password,type from user_table where username=? and password=? and type=?";
$stmt=mysqli_stmt_init($link);//建立预处理对象
mysqli_stmt_prepare($stmt,$sql);//将SQL语句赋给预处理对象
mysqli_stmt_bind_param($stmt, 'sss',$val1,$val2,$val3);//接收到传递的变量赋给SQL语句中的?
... | true |
5b46f931d6d09fb8e7dd4588df133d182cf86b47 | PHP | shogodev/argilla_simple_module_tutorial | /protected/models/product/filter/ProductFilterElementList.php | UTF-8 | 709 | 2.5625 | 3 | [] | no_license | <?php
/**
* User: tatarinov
* Date: 11.12.12
*/
class ProductFilterElementList extends ProductFilterElement
{
public function addPropertyCondition(CDbCriteria $criteria)
{
$criteria->compare($this->id, '='.$this->selected);
}
public function addParameterCondition(CDbCriteria $parameterCriter... | true |
1ccefac9b523cf84429bbb23aa8026a8c1778405 | PHP | namory-19/V2_extranet_gbaf_MVC | /model/dbConnection.php | UTF-8 | 483 | 3.015625 | 3 | [] | no_license | <?php
// function allows the connection to database
function connectionDb()
{
try
{
$db = new PDO('mysql:host=localhost;dbname=gbaf_mvc;charset=utf8', 'root', 'root');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); // affichage des erreurs SQL
array(PDO::ATTR_ERRMODE => P... | true |
5a16b5ae8ff81e858c542405c36b7868ab07722a | PHP | OlgaRomel/php | /lessonphp1.php | UTF-8 | 331 | 3.265625 | 3 | [] | no_license | <?php
$login = "admin";
echo "You are entered under the name - $login <br>";
unset($login);
$a = 2;
$b = 3;
$res = $a**2 + $b**2;
echo $res . "<br>";
$s = 180;
$t = 10;
$v = $s / $t;
$v2 = $s*1000 / ($t*3600);
echo $v ." km/h or " .$v2 ." m/s <br>";
const NAME1 = "admin <br>";
echo NAME1;
NAME1 == "day";
echo NA... | true |
3d81c70e7e95cbc709de7f5b3ec5b28f3ace1f50 | PHP | oleksiivv/phplab-tasks-2021 | /tests/SortByKeyTest.php | UTF-8 | 1,469 | 2.609375 | 3 | [] | no_license | <?php
require_once 'src/web/functions.php';
use PHPUnit\Framework\TestCase;
class SortByKeyTest extends TestCase
{
protected function setUp(): void
{
}
/**
* @dataProvider positiveDataProvider
*/
public function testPositive($input, $key, $expected)
{
$this->assert... | true |
1fec93f93858cefb1d1b69c78d15c8e272f9b196 | PHP | B00StER/openmailadmin | /inc/lib/model/Address.php | UTF-8 | 2,259 | 2.703125 | 3 | [] | no_license | <?php
class Address
extends AEmailMapperModel
{
public function set_active($boolean) {
$this->get_owner()->get_virtual_domain()->immediate_set('new_emails', 1);
return parent::immediate_set('active', ($boolean ? 1 : 0), self::$tablenames['virtual']);
}
public function get_domain() {
return Domain::get_by_ID(... | true |
1691e28b1609109692d44fd46c3747b2c28a7229 | PHP | ajibeshMohapatra/ml4e_task | /web/2/ml4e/application/controllers/Users.php | UTF-8 | 1,111 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Users extends CI_Controller{
public function register(){
$this->form_validation->set_rules('username','username','required');
$this->form_validation->set_rules('roll','Roll No.','required');
if ($this->form_validation->run() === FALSE){
$this->loa... | true |
f43314a2d1b930c28ac8c5489d1f23db15a273bf | PHP | tpageforfunzies/fatbooty | /app/Http/Controllers/Utility/DbController.php | UTF-8 | 553 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Utility;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\Controller;
class DbController extends Controller
{
public function __invoke()
{
/**
* Single Action Controller for /db endpoint
*
* @return View
*/
try {
$co... | true |
ca3b6b4c7cd08a4da25aa7deea45bf5cbafb0981 | PHP | caiminfang/Learning | /test/1207. 独一无二的出现次数/index.php | UTF-8 | 1,171 | 3.5625 | 4 | [] | no_license | <?php
/**
给你一个整数数组 arr,请你帮忙统计数组中每个数的出现次数。
如果每个数的出现次数都是独一无二的,就返回 true;否则返回 false。
示例 1:
输入:arr = [1,2,2,1,1,3]
输出:true
解释:在该数组中,1 出现了 3 次,2 出现了 2 次,3 只出现了 1 次。没有两个数的出现次数相同。
示例 2:
输入:arr = [1,2]
输出:false
示例 3:
输入:arr = [-3,0,1,-3,1,1,1,-3,10,0]
输出:true
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/unique-n... | true |
df33e443a2818dda13e236410b9d437a54dedeeb | PHP | GemsTracker/gemstracker-library | /classes/Gems/Snippets/Tracker/TrackVisualDefinitionTitleSnippet.php | UTF-8 | 1,399 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
*
* @package Gems
* @subpackage Snippets\Tracker
* @author Menno Dekker <menno.dekker@erasmusmc.nl>
* @copyright Copyright (c) 2019 Erasmus MC
* @license New BSD License
*/
namespace Gems\Snippets\Tracker;
use Gems\Snippets\Generic\ContentTitleSnippet;
/**
*
*
* @package Gems
* @s... | true |
7313451939c1723198f0859337ddb1ea0bab3025 | PHP | alphpkeemik/queue-command | /tests/StackMockTrait.php | UTF-8 | 956 | 2.546875 | 3 | [] | no_license | <?php declare(strict_types=1);
/*
* This file is part of the Ambientia QueueCommand package.
*/
namespace Ambientia\QueueCommand\Tests;
use ArrayObject;
/**
* @author mati.andreas@ambientia.ee
*/
trait StackMockTrait
{
private function createStackMock(ArrayObject $result, string $class)
{
$mockB... | true |
dba7b2d1beea777daeccb30a370a62926db5226d | PHP | mickaelvieira/imagery | /src/Imagery/Command/Rotate.php | UTF-8 | 786 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Imagery package
*
* (c) Mickaël Vieira <contact@mickael-vieira.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Imagery\Command;
use Imagery\Canvas;
use Imagery\Command;
use Imagery\... | true |
98b242cef78d84898f8c2fc020232a5b33b7784b | PHP | metrvrn/yii_e_shop | /utils/upload/ProductsUploader.php | UTF-8 | 551 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\utils\upload;
class ProductsUploader extends BaseUploader
{
protected function getFilename()
{
return 'products.csv';
}
protected function getTableName()
{
return 'products';
}
protected function getFieldsMap()
{
return ['name', 'section_... | true |
40f37780e134deec8174d0853d73b89cb232f2ab | PHP | arieftyo/fp-pbkk | /src/apps/modules/dashboard/Core/Domain/Model/Pemesanan.php | UTF-8 | 1,860 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Its\Example\Dashboard\Core\Domain\Model;
class Pemesanan {
protected $id_pemesanan;
protected $id_user;
protected $id_hotel;
protected $tgl_checkin;
protected $tgl_checkout;
protected $jumlah_kamar;
protected $total_harga;
protected $status_bayar;
protected $nama_pe... | true |
e82fb234c12b0101c7f1f9c47eb3500d4deaad64 | PHP | phplrt/phplrt | /libs/lexer/src/Lexer.php | UTF-8 | 8,284 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Phplrt\Lexer;
use Phplrt\Contracts\Lexer\Channel;
use Phplrt\Contracts\Lexer\LexerInterface;
use Phplrt\Contracts\Lexer\TokenInterface;
use Phplrt\Contracts\Source\ReadableInterface;
use Phplrt\Lexer\Config\HandlerInterface;
use Phplrt\Lexer\Config\OnEndOfInput;
use Phplrt\Le... | true |
0e36064d0f7c3fd703700bc11d27e0f2a1518c79 | PHP | dnaber-de/Git-Automated-Mirror | /test/Asset/DirectoryTools.php | UTF-8 | 1,028 | 2.84375 | 3 | [] | no_license | <?php # -*- coding: utf-8 -*-
namespace GitAutomatedMirror\Test\Asset;
use DirectoryIterator;
use RecursiveDirectoryIterator;
class DirectoryTools {
/**
* @type string
*/
private $path;
/**
* @param string $path
*/
public function __construct( $path ) {
$this->path = realpath( $path );
}
/**
* @... | true |
d3cec447755aa3d2b7ae6442f571cda674236235 | PHP | dronemill/foundationapi | /src/Database/Manager.php | UTF-8 | 3,000 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace DroneMill\FoundationApi\Database;
use Config;
use DroneMill\FoundationApi\Models\DbResolverConnection;
use DroneMill\FoundationApi\Models\DbResolverConnectionHost;
use Illuminate\Database\Connection;
use Illuminate\Database\Connectors\ConnectionFactory;
use Illuminate\Database\DatabaseManager;
use Inv... | true |
a6c5283ada1ab84cb3bfac9de5fae6ef14fe3a81 | PHP | kloentje2/Encryption | /class.defaultEncryption.php | UTF-8 | 607 | 2.9375 | 3 | [] | no_license | <?php
Class defaultEncryption {
protected $iv= "";
protected $key = "";
protected $method = "";
public function __construct() {
$this->iv = openssl_random_pseudo_bytes(16);
$this->key = openssl_random_pseudo_bytes(16);
$this->method = "AES-256-CTR";
}
public function encrypt($string) {
$string = op... | true |
85cdfd12cc5f73a8cb020d8292fa60cfd65f137b | PHP | ly2513/YP_Socket_Framework | /App/Core/CheckEnv.php | UTF-8 | 4,799 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* User: yongli
* Date: 17/9/6
* Time: 23:13
* Email: yong.li@szypwl.com
* Copyright: 深圳优品未来科技有限公司
*/
namespace App\Core;
$fatalErrorList = [];
$warningErrorList = [];
// 要求PHP环境必须大于PHP5.3
if (!substr(PHP_VERSION, 0, 3) >= '5.3') {
$fatalErrorList[] = 'Fatal error: Framework requires PHP version ... | true |
244704482eb92af8b6fe016d60426a538d5712f0 | PHP | heidipatja/oophp | /src/Dice/DiceRound.php | UTF-8 | 1,183 | 3.671875 | 4 | [] | no_license | <?php
/**
* Namespace
*/
namespace Hepa19\Dice;
/**
* A round in the dice game
*/
class DiceRound
{
/**
* @var int $roundSum Sum of all dices in round so far
* @var DicePlayer|DicePlayerComputer $currentPlayer Current player
*/
private $roundSum;
private $currentPlayer;
/**
... | true |
c57d6b93f67c1f4a21e6d8bb48910931b81ce3c9 | PHP | joramkimata/biggo-framework | /engine/boot/helper/EngineView.php | UTF-8 | 566 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
class EngineView {
public static function make($fv, $data=array()){
$view = getcwd() . DS. "..".DS."app".DS."views". DS . $fv . ".php";
if(file_exists($view)){
if(!empty($data))
extract($data);
return include_once $view;
}else{
$view = getcwd() . D... | true |
522a52d044d8cbd2093379f23738932cc2327404 | PHP | tech-is/Horii_Tagashira_Matsuda | /postpagination.php | UTF-8 | 2,649 | 2.71875 | 3 | [
"MIT"
] | permissive |
<?php
function pager($c, $t,$id) {
$current_page = $c; //現在のページ
$total_rec = $t; //総レコード数
$page_rec = 10; //1ページに表示するレコード
$total_page = ceil($total_rec / $page_rec); //総ページ数
$show_nav = 5; //表示するナビゲーションの数
$path = 'topic?id='; //パーマリンク
//全てのページ数が表示するページ数より小さい場... | true |
96001f7c821f5fac36ec023c432c643f08bb9d39 | PHP | ashishsharma45/pdf | /cdac/Core PHP Notes/Core PHP Code/127. ReadingFileIntoArray.php | UTF-8 | 402 | 3.203125 | 3 | [] | no_license | <?php
/*
$data = file("geek.txt");
echo $data[0] . "<br />";
echo $data[1] . "<br />";
echo $data[2] . "<br />";
*/
$data = file("geek.txt");
foreach($data as $line)
{
echo $line . "<br />";
}
// Display with Line Number
$data = file("geek.txt");
foreach($data as $num => $line)
{
echo "Li... | true |
098b056017bc2f6d7dd919c00367041227ab756a | PHP | AThompson027/Exercise02_03_01 | /Presidents2.php | UTF-8 | 813 | 3.28125 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<title>Presidents 2</title>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0">
<script src="modernizr.custom.65897.js"></script>
</head>
<body>
<h2>Presidents 2</h2>
<?php
// the strtok is to... | true |
97a07a036e6233136288186a15a51830362b5c61 | PHP | nicollassilva/Scripts-APIs | /Habbo BR-PT API/HabboAPI.php | UTF-8 | 589 | 2.78125 | 3 | [] | no_license | <?php
class HabboAPI {
private function GetUser($name) {
$url = 'https://habboapi.uwhosting.com.br/habbo/'.$name;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_... | true |
43a7d8eb11269ead13ee8ae6d1e88c131938ce8b | PHP | MOEopen/moe_logger | /models/moe_logger_screen.php | UTF-8 | 191 | 2.578125 | 3 | [] | no_license | <?php
class moe_logger_screen extends moe_logger_abstract {
public function execute() {
return $this->getLogAsString();
}
public function getName() {
return __CLASS__;
}
} | true |
79251c36f7daa5bc5324e2b7137c8e23dbf12109 | PHP | kyleiwaniec/candp | /EE/quickmysql.php | UTF-8 | 1,212 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
// set these variables accordingly
// if these are not set correctly, your project will not function properly
// database stuff
$host = "localhost:8889";
$user = "root";
$password = "root";
$databaseName = "test";
/////////////////////////////////////////////////////////////
// functions
//////... | true |
d5de38d8d6c578fb3b31aecbea95d50dfe1d805a | PHP | HelloWorlcl/Patterns | /src/StructuralPatterns/Flyweight/FlyweightFactory.php | UTF-8 | 540 | 3.15625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Everest
* Date: 28.05.2018
* Time: 19:12
*/
namespace StructuralPatterns\Flyweight;
class FlyweightFactory implements \Countable
{
/** @var FlyweightCharacter[] */
private $pool;
public function get(string $name): FlyweightCharacter
{
if (!isset($... | true |
a5e4bf67ec69b4cea37a3e3547e14d9bb2c3f875 | PHP | SamirNaggara/php | /05-get/cours.php | UTF-8 | 1,872 | 3.078125 | 3 | [] | no_license | <?php
$nom = ""; // On declare la variable $nom comme une chaine de caractère vide
if (isset($_GET["nom"])){ // Si un nom est renvoyé par la méthode GET, alors...
$nom = $_GET["nom"]; // Stocker la valeur dans la variable $nom
}
$prenom = "";
if (isset($_GET['prenom'])){
$prenom = ... | true |
b46d0e5110ad2742d18a89a47df6a61b3ce06e61 | PHP | mollyou/CSE330S-Coursework | /Module 2 partner - File sharing website/public_html/FileSharingSite.php | UTF-8 | 2,783 | 3.140625 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Ultra Secure File Sharing Site (very safe)</title>
</head>
<body>
<img src="../visuals/logo.jpg" alt="very good logo. paid graphic designer very much for it." />
<form action = "FileShari... | true |
b244c4b603a37a38eeb0252ad61541d8700f3840 | PHP | ExeCTU/redcap-pdf-injector | /template/field_variable_list.php | UTF-8 | 1,535 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Template file used via Ajax
*
*/
function sanitize($arg) {
if (is_array($arg)) {
return array_map('sanitize', $arg);
}
return htmlentities($arg, ENT_QUOTES, 'UTF-8');
}
$response = "";
$fields = sanitize($_POST["fields"]);
foreach ($fields as $key => $field ) {
if( empty($fi... | true |
30fa92e8972fc3b488f5806b6b0d9edb8807aab5 | PHP | jeylabs/vaultbox | /src/helpers.php | UTF-8 | 1,605 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Storage;
use Intervention\Image\Exception\NotFoundException;
if (! function_exists('vaultbox_file_path')) {
/**
* Get a path for the file.
*
* @param string $path
* @param bool $fullPath
* @param null $extraRemoves
* @return string
*/
fu... | true |
53307af2981f96b5f1185d0db4e7495dc03a2e42 | PHP | Itochan60/vontography-photo-submission | /app/Rules/CustomDimensions.php | UTF-8 | 4,030 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class CustomDimensions implements Rule
{
/**
* The constraints for the dimensions rule.
*
* @var array
*/
protected ... | true |
049d1822179db85055df962a3e1ddb20e8db584f | PHP | marcojrzx/lfrsVers | /validarFecha.php | UTF-8 | 479 | 2.765625 | 3 | [] | no_license | <?php
/* Aca llegan los datos del primer envío por Ajax para ser procesados*/
if(isset($_POST['fechaNacimiento'])){
$fechaNacimiento=$_POST['fechaNacimiento'];
}
$fecha = date('Y-m-d');
$nuevafecha = strtotime ( '-13 year' , strtotime ( $fecha ) ) ;
$nuevafecha = date ( 'Y-m-d' , $nuevafecha );
$val1 = $fechaNacim... | true |
cf40257124b15ee0105df032d23daaa0b2bfa20b | PHP | direktdemokraterna/dd | /src/web/helpers/db/db_error.inc | UTF-8 | 643 | 2.828125 | 3 | [] | no_license | <?php
class db_error
{
public static function insert_error_message ($user_id, $message, $color = "green")
{
$query = "insert into error_messages (user_id, message, color, timestamp) values (?, ?, ?, ?)";
$values = Array($user_id, $message, $color, time());
return db::insert($query, $values);
}
public stati... | true |
1bc35c8fb277d35b71cabb58104ae3f3ec7ffe49 | PHP | lksalbq/projeto_integrado | /controllers/logar.php | UTF-8 | 601 | 2.59375 | 3 | [] | no_license | <?php
session_start();
//faz o login do usuario de acordo com os dados passados
include_once ('../config/database.php');
include_once ('../model/usuario.php');
$database = new Database();
$db = $database->getConnection();
$usuario = new Usuario($db);
$usuario->login = strip_tags($_POST['login']);
$usuario->senha = ... | true |
fc1810856c35f166f7df9e9c594d2d550c3030ae | PHP | khawarwaraich1995/fastgoweb | /modules/Payfast/vendor/payfast/payfast-php-sdk/tests/PaymentIntegrations/OnsiteIntegrationTest.php | UTF-8 | 1,495 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
use PayFast\Exceptions\InvalidRequestException;
use PayFast\PayFastPayment;
use PHPUnit\Framework\TestCase;
final class OnsiteIntegrationTest extends TestCase
{
private static $payFastPayment;
private $data;
public static function setUpBeforeClass(): void
{
sel... | true |
5ceb2037a66e7c40f85b03a2008b4c186afdb3d7 | PHP | BGCX067/ezrpg-svn-to-git | /users/zeggy/modules/City/index.php | UTF-8 | 722 | 2.90625 | 3 | [] | no_license | <?php
//This file cannot be viewed, it must be included
defined('IN_EZRPG') or exit;
/*
Class: Module_City
This is a very simple module, designed to simply display a static template page.
*/
class Module_City
{
/*
Function: __construct
Displays the city.tpl template. That's all!
Parameters:
The p... | true |
237ae4cc23c51405acbe45004355a4a28c7bc9e1 | PHP | dazzle-php/http | /src/Http/Http/HttpServer.php | UTF-8 | 3,861 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Dazzle\Http\Http;
use Dazzle\Http\NetworkComponentAwareInterface;
use Dazzle\Http\Http\Driver\HttpDriver;
use Dazzle\Http\Http\Driver\HttpDriverInterface;
use Dazzle\Http\Null\NullServer;
use Dazzle\Http\NetworkMessageInterface;
use Dazzle\Http\NetworkComponentInterface;
use Dazzle\Http\NetworkConnect... | true |
5512f0679168e2d6940c293952c3a7769fb02d8b | PHP | sergiors/functional | /src/map.php | UTF-8 | 286 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Sergiors\Functional;
const map = __NAMESPACE__.'\map';
/**
* Just an alias.
*
* @author Sérgio Rafael Siqueira <sergio@inbep.com.br>
*
* @link http://php.net/array_map
*
* @param array ...$args
*
* @return mixed
*/
function map(...$args)
{
return partial('array_map')(...$args);
}
| true |
9c8aa64f8516a461379996c640b4f715cae7b9bd | PHP | tg-bot-api/bot-api-base | /src/Type/VideoType.php | UTF-8 | 1,285 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace TgBotApi\BotApiBase\Type;
/**
* Class VideoType.
*
* @see https://core.telegram.org/bots/api#video
*/
class VideoType
{
/**
* Unique identifier for this file.
*
* @var string
*/
public $fileId;
/**
* Unique identifier for this file, w... | true |
348ededeb9b54fcd03099256566338256efdc5d5 | PHP | hunnyk/phpapis | /registers/register.php | UTF-8 | 1,542 | 2.765625 | 3 | [] | no_license | <?php
class Registers{
function getAllReg(){
global $conn;
$sql = "select * from registerangtb";
$r = mysqli_query($conn, $sql);
while($row=mysqli_fetch_array($r,MYSQLI_ASSOC)) {
$res[]=$row;
}
echo json_encode($res,true);
}
function saveReg($data){
global $conn;
... | true |
d31a2917fc38e3bdc473eab427ad972669d21b7e | PHP | Maxime5462/games2020 | /views/games.php | UTF-8 | 2,184 | 2.78125 | 3 | [] | no_license | <?php $title = "Games"; ?>
<?php ob_start(); ?>
<h1 class="mt-3"style="text-transform: uppercase;text-align:center;color:blue;"><br>Liste de jeux vidéos</h1>
<div class="container">
<div class="row">
<?php foreach ($listGame as $game) { ?>
<div class="card mt-3 col-6" style="width: 18rem;">
... | true |
512b86723283ff02adb558cf018ac036c5143c16 | PHP | GaelleEK/ExplorerV2 | /src/helpers.php | UTF-8 | 81 | 2.515625 | 3 | [] | no_license | <?php
function e(string $string): string
{
return htmlentities($string);
} | true |
9676d2a0e49f5c8af9452311668f83f078a24a7d | PHP | nikhiltany/Blog-webiste-using-PHP | /edit.php | UTF-8 | 7,713 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<?php
include "database.php";
include "sidebar.php";
?>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="bootstrap/bootstrap.min.css" rel="s... | true |
1a7d89078ed260086372ef81290c9ec84d6fba04 | PHP | deepakurbansoft/scripts | /Ajax Full Featured Calendar 1.6.4.3/Version 1.6/Demos/Bootstrap 3.X/Modal View/Simple/Demo3/includes/calendar.php | UTF-8 | 16,562 | 3.09375 | 3 | [] | no_license | <?php
/*************************************************************************
* Ajax Full Featured Calendar
* - Add Event To Calendar
* - Edit Event On Calendar
* - Delete Event On Calendar
* - View Event On Calendar
* - Update Event On Rezise
* - Update Event On Drag
*
* Author: Paulo Regina
* Version: ... | true |
079957b1d5b767743b32396bdbfca8463a729025 | PHP | zaichiict/zcms | /app/libraries/Core/ZModel.php | UTF-8 | 5,010 | 2.71875 | 3 | [] | no_license | <?php
namespace ZCMS\Core;
use Phalcon\Di as PDI;
use Phalcon\Exception;
use Phalcon\Mvc\Model as PModel;
/**
* Class ZModel
*
* @package ZCMS\Core
* @since 0.0.1
*/
class ZModel extends PModel
{
/**
* @var string
*/
public $created_at;
/**
* @var string
*/
public $cre... | true |
a09c247b83754ffd8ad88aa29ce9c4f40badd726 | PHP | wojtekszydlowski/Pomocnik | /PHP_Komendy/25_Pliki.php | UTF-8 | 16,026 | 2.5625 | 3 | [] | no_license | <?php
/*
#Konfiguracja:
W przypadku access denied konsoli linux wpisać:
sudo chmod -R 777 [folder_workspace] , gdzie R oznacza rekirsive - folder i podkatalogi
Aby sprawdzić ściężkę do katalogu daj:
$_SERVER['DOCUMENT_ROOT'] + nazwa naszego katalogu
sudo chmod -R 777 ~/Workspace/fakturaweb/user/uploads/
sudo chmod -... | true |
57ca32944edd579bfe2c164237ed685589554d83 | PHP | chowhwei/store | /src/Contracts/ContentStore.php | UTF-8 | 929 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Chowhwei\Store\Contracts;
use Exception;
interface ContentStore
{
/**
* @param string $key
* @param $content
* @return void
* @throws Exception
*/
public function store(string $key, $content);
/**
* @param string $key
* @return mixed
* @throws Exce... | true |
cb3cb10d19df20f36c206aef97c2b9b2cb76dedf | PHP | 2br-dev/esayan_site | /modules/site/model/robotstxtapi.inc.php | UTF-8 | 6,585 | 2.578125 | 3 | [] | no_license | <?php
/**
* ReadyScript (http://readyscript.ru)
*
* @copyright Copyright (c) ReadyScript lab. (http://readyscript.ru)
* @license http://readyscript.ru/licenseAgreement/
*/
namespace Site\Model;
use RS\Helper\IdnaConvert;
use RS\Router\Manager as RouterManager;
use Site\Model\Orm\Site;
/**
* Класс управляет файлом R... | true |
c225542cd8af61ae7cd396c9e27bbee3a141ffa6 | PHP | espresso-china/huichangju | /app/Model/Role.php | UTF-8 | 944 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: tacker
* Date: 2018/4/9
* Time: 下午2:03
*/
namespace App\Model;
use Zizaco\Entrust\EntrustRole;
class Role extends EntrustRole
{
const TYPE_IS_ADMIN = 1;
const TYPE_IS_SHOP = 2;
protected $table = 'sys_roles';
//protected $dateFormat = 'U';
protecte... | true |
3fa0bd4b10c1b6bdeb119bf77426e576a436546b | PHP | Sywooch/forums | /library/MODM/AJAXChat/Listeners.php | UTF-8 | 1,437 | 2.65625 | 3 | [] | no_license | <?php
class MODM_AJAXChat_Listeners
{
/**
*
* Adds the "Chat" tab with permission-based links.
*
* @param array $extraTabs
* @param unknown_type $selectedTabId
*/
public static function navTabsListener(array &$extraTabs, $selectedTabId)
{
if (XenForo_Visitor::getInstance()->hasPermission('modm_ajaxcha... | true |
2a6461424f846d3dc246454c732cd4e0513c9de1 | PHP | elhadjialiouthiam/EL-HADJI-ALIOU-THIAM | /QuizzSA_DB/Admin/liste.php | UTF-8 | 2,154 | 2.703125 | 3 | [] | no_license | <?php
//session_start();
$username = 'Ass';
$password = 'Ass97';
$connection = new PDO( 'mysql:host=localhost;dbname=Quizz_SA', $username, $password );
if(isset($_POST["action"]))
{
if($_POST["action"] == "Load")
{
$statement = $connection->prepare("SELECT * FROM Joueur ORDER BY score DESC");
$statement->execute()... | true |
45d1cf1905fe64c8bdfae78ae0f4dac4ef6ce317 | PHP | bfarmstrong/mensio | /database/migrations/2018_11_06_202958_add_receipts_table.php | UTF-8 | 1,863 | 2.65625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Adds the receipt table to the database.
*/
class AddReceiptsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function u... | true |
77ce60b158a6418b0c06efdb923d8d023f8076ca | PHP | maksymenkool/yii2---rating | /migrations/m160505_202956_create_monograph_table.php | UTF-8 | 1,000 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation for table `monograph`.
*/
class m160505_202956_create_monograph_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('monograph', [
'id' => $this->primaryKey(),
'user_id' => $this-... | true |
88ead66633bce47a027c193fe12aeda6a99fc1e4 | PHP | codacy-badger/Blog-3 | /models/backend/backendCommentsManager.php | UTF-8 | 1,998 | 2.734375 | 3 | [] | permissive | <?php
require_once('models/Manager.php');
class CommentsManager extends Manager
{
public function getAwaitingComments()
{
$db = $this->dbConnect();
$all_awaiting_comments = $db->query(
'SELECT
comments.comment_id,
comments.comment,
DATE_FORMAT(comments.comment_date, "%d/%m/%Y") AS date,
DATE_... | true |
92051cb73dc265f1830fa358d20b254a636d553f | PHP | TimuXDXD/DBMS | /DBMS/search_keyword.php | UTF-8 | 5,966 | 2.59375 | 3 | [] | no_license | <?php
include 'db_conn.php';
if ($_SERVER["REQUEST_METHOD"] == "POST"){
$keyword = $_POST["keyword"];
$brand_name = $_POST["branches"];
$model = $_POST["models"];
$power = $_POST["power"];
$cc = $_POST["cc"];
$price = $_POST["price"];
}
if(isset($_POST['button']) or isset($_POST['branc... | true |
beb3b868a7dc3f0d99a3de60ca59c191276363df | PHP | Lecturize/Laravel-Tags | /src/Models/Tag.php | UTF-8 | 2,307 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Lecturize\Tags\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Str;
use Cviebrock\EloquentSluggable\Sluggable;
/**
* Class Tag
* @package Lecturize\Tags\Models
* @property string $... | true |
8b6f9a020f226efb135e9fcc6c823e8ba7fba309 | PHP | mallochine/Seattle-Sluggers-vs.Fans | /lib/LegalMoveGenerator.class.php | UTF-8 | 34,084 | 3.296875 | 3 | [] | no_license | <?php
// Note to self: this is TERRIBLY WRITTEN AND DESIGNED CODE
/**
* Here is how the bitboard for the chessboard will be stored
* in a multi-dimensional array called $chessposition
*
* negative signs means that the piece is a black piece
* 0 = nothing
* 1 = pawn
* 2 = knight
* 3 = bishop
* 4 = rook
* 5 ... | true |
c3425d324f34dd4379ba70948bcd051eb6fe08b6 | PHP | hushchian/XlsxToJson | /src/PriceCalculator.php | UTF-8 | 857 | 3.203125 | 3 | [] | no_license | <?php
namespace App;
class PriceCalculator
{
/**
* @var mixed float
*/
private $usdRate;
public function __construct()
{
$privatCourse = json_decode(
file_get_contents('https://api.privatbank.ua/p24api/pubinfo?json&exchange&coursid=5'),
true
);
... | true |
219923335f29bd5c6e9dc1427afc26bac6ad5d4b | PHP | raaydel/Serie-de-PHP | /class/index.php | UTF-8 | 161 | 2.890625 | 3 | [] | no_license | <?php
require 'Person.php';
$person = new Person('Italo', 'Morales');
echo $person->greet();
$person2 = new Person('Andres', 'Ayala');
echo $person2->greet(); | true |
889be473137524ad75e6c113ead95923cba37c9f | PHP | Torann/Elasticquent | /src/ElasticquentResultCollection.php | UTF-8 | 2,278 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php namespace Elasticquent;
use Illuminate\Support\Arr;
use Elasticquent\ElasticquentPaginator as Paginator;
class ElasticquentResultCollection extends \Illuminate\Database\Eloquent\Collection
{
/**
* Metadata
*
* @var array
*/
protected $meta = [];
/**
* Create a new instance ... | true |
a5446986ebb7cbc56a7c9592d04f73d0eb398f54 | PHP | Deutsche-Digitale-Bibliothek/ddb-virtualexhibitions | /omeka/plugins/GinaImageConvert/models/Compressor.php | UTF-8 | 9,672 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Image Compressor
* @copyright Copyright 2020 Viktor Grandgeorg
* @license http://www.gnu.org/licenses/gpl-3.0.txt GNU GPLv3
*/
/**
* Compressor.
*
*/
class Compressor
{
public $filename = '';
public $basePath = '';
// public $stateFile = '';
public $logFile = '';
public $options ... | true |
707a4ea3702d362cb6ec2af3eafef69e68e0fbf5 | PHP | osama1921/arka-batch2 | /lima.php | UTF-8 | 141 | 3.421875 | 3 | [] | no_license | <?php
function count_vowels($string){
$count = preg_match_all('/[aiueo]/i', $string, $matches);
echo $count;
}
count_vowels("programmer"); | true |
6b1ef0ff0a1df58c522f0a24018df3a138aa9659 | PHP | Informatica-UNASUR/rrhh2 | /entidades/Empleado.php | UTF-8 | 6,248 | 2.75 | 3 | [] | no_license | <?php
Class Empleado {
private $idEmppleado;
private $nombre;
private $apellido;
private $ci;
private $fechaNacimiento;
private $sexo;
private $telefono;
private $direccion;
private $email;
private $numCuenta;
private $nacionalidad;
private $nombreConyuge;
private $fo... | true |
5c9b1915724247e053680f2aafa0555adf0e77b0 | PHP | BlackSou/php-learning | /2019-01-28/files/lesson/lesson.php | UTF-8 | 2,100 | 2.765625 | 3 | [] | no_license | <?php
$arrOld = [
['amount'=>1, 'name'=>'product1'],
['amount'=>15, 'name'=>'product2'],
['amount'=>0, 'name'=>'product3'],
['amount'=>18, 'name'=>'product4'],
];
//
//$arrNew = [
// ['amount'=>0, 'name'=>'product3'],
// ['amount'=>1, 'name'=>'product1'],
// ['amount'=>15, 'name'=>'product2'],... | true |
4d5cf87f0a5b55ebc338d28b9b9687ea14d24b99 | PHP | JHutter/CapstoneDB | /php/contact_info.php | UTF-8 | 1,314 | 2.515625 | 3 | [] | no_license | <?php
include_once('database.php');
include_once('write_wrapper.php');
include_once('get_name.php');
include_once('forms.php');
function get_contact_form($target_url, $students) {
$form = "<Form action={$target_url} method=post>";
$form .= "<table><thead><tr><th colspan=2>Change Email</th></tr>";
$form .= "<tr><td>... | true |
f59bd6efe4c7f96b50e7c0e9af683d3e24cb7246 | PHP | GaussMedia/collabawrite | /webadmin/edit_question.php | UTF-8 | 3,200 | 2.5625 | 3 | [] | no_license | <?php
/*$edit_id=$_GET['edit_id'];
$sql=mysql_query("SELECT * FROM faq WHERE id='$edit_id'")or die(mysql_error());
$fetch=mysql_fetch_array($sql);
if($_POST['sub'])
{
$ques=addslashes($_POST['ques']);
$ans=addslashes($_POST['ans']);
if(empty($ques))
{
$error='1';
$err_msg[]="Please Type Any Question";
}
if($e... | true |
23309ed39114cde3c37ee75f6327652e07ece117 | PHP | zhihong01/ahgk | /ahgkyy.my71.com/php2html.php | UTF-8 | 508 | 2.6875 | 3 | [] | no_license | <?php
function createStaticPage($sourcePage, $objectPage) {
$data = file_get_contents($sourcePage);
file_put_contents($objectPage, $data);
return true;
}
if (createStaticPage("http://ssxfw.i.my71.com/index.php?c=header", "./header.html")) {
echo "header.html OK!<br />";
} else {
echo "header.html ... | true |
e651a2c55aff1786ef31ca438013a3ff623d81b7 | PHP | miaoer1/mysql | /mysql_nlkj_88888888_9999999999999999999999/dlt_mysql_xuanhao_88888888888888888888888888/dlt_myaql_999999999999999999.php | UTF-8 | 1,690 | 2.671875 | 3 | [] | no_license |
<html>
<head>
<body>
<h3 style=color:#FF0000>
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
//"dltxuanhaoku"是库名
mysql_select_db("dltxuanhaoku", $con);
$kongwei=mt_rand(5,10);
$result = mysql_query("SELECT * FROM `dltxh5` ORDER BY rand() LI... | true |
4ba0d01579745d6dc320d80d75b9d629c55463ab | PHP | flipty/hutch2 | /wp-content/plugins/google-analytics-async/core/helpers/class-template.php | UTF-8 | 3,640 | 2.640625 | 3 | [] | no_license | <?php
/**
* Defines template helper functionality of the plugin.
*
* @link http://premium.wpmudev.org
* @since 3.2.0
*
* @author Joel James <joel@incsub.com>
* @package Beehive\Core\Helpers
*/
namespace Beehive\Core\Helpers;
// If this file is called directly, abort.
defined( 'WPINC' ) || ... | true |
59162e6d02118080cdd34fe8b7f124541b068ad4 | PHP | Azerdin/System-nauki-slowek | /System-nauki-slowek/database/seeds/SetsTableSeeder.php | UTF-8 | 1,378 | 3.078125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class SetsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function add($user1,$subcat1,$lan1,$lan2,$name1,$words1)
{
$created_at1=date('Y-m-d H:i:s');
$updated_at1=date('Y-m-d H:i:s');
$... | true |
486ace800e739fe42a957cf545a3c82fb26a429a | PHP | capttrousers/Campaign | /_bk/2015-07-08/index.php | UTF-8 | 10,360 | 2.53125 | 3 | [] | no_license | <?php
// TODO:
// implement better session controls
// set session cookie for < 20 minutes
// resume session as needed
session_start();
// db connection
require_once('./database.php');
// db functions: select, insert, update
require_once('./db-admin.php');
$action = filter_input(INPUT_POST, 'action');
if ($action ... | true |
ac866f680580d57174cb9b8cfeec2fa25d548af3 | PHP | guptasanskriti445/csspro | /phppro/ajaxcontent.php | UTF-8 | 1,561 | 2.53125 | 3 | [] | no_license | <?php
session_start();
if(isset($_POST['type'])) {
require_once('admin/query.php');
$output = '';
switch (strtolower($_POST['type'])) {
case 'blogs':
$where = ' 1 ';
if(!empty($_POST['param'])) {
$where .= $_POST;
}
$page = $_POST['page']-1;
$page = $page*10;
$where .= ' ORDER BY id LIMIT ... | true |
02527adad4ad08bb17310afe1a5f1cfb72576d31 | PHP | conceito/congressogestaltrio | /tests/models/test_cms_survey_model.php | UTF-8 | 1,934 | 2.625 | 3 | [] | no_license | <?php
class Test_cms_survey_model extends CodeIgniterUnitTestCase
{
public function __construct()
{
parent::__construct('cms/survey_model');
// session_start();
$this->load->library('cms/cms_libs');
$this->load->model('cms/survey_model', 'survey');
}
public function... | true |
0f20ecb0781c62b5c9ae43aeb3c221f69f4a3933 | PHP | bestcn/WDXR | /app/common/models/Repositories/Salesman.php | UTF-8 | 1,786 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: DH
* Date: 2017/4/19
* Time: 17:01
*/
namespace Wdxr\Models\Repositories;
use Wdxr\Models\Entities\Salesmans as EntityAdmin;
use Wdxr\Models\Repositories\Exceptions\InvalidRepositoryException;
class Salesman
{
public function getLast()
{
return EntityAdmin... | true |
aaaf48c27c097f020bea6288c4da4b55151f09e7 | PHP | yuusukeshinoda/yuusukeshinoda | /PHP基礎学習1 応用課題/php_kiso1_ouyoukadai.php | UTF-8 | 1,308 | 3.609375 | 4 | [] | no_license | <?php
//【①商品種別の配列を作成し、foreach文で配列の値をすべて表示。】
$goods_category_array = array(1=>"雑貨",2=>"生鮮食品",3=>"その他");
echo "商品種別一覧".'<br>';
foreach($goods_category_array as $key => $value){
echo $key.':'.$value.'<br>';
}
//クエリストリングで商品種別の配列におけるインデックスを渡して変数に格納。そのインデックスを用いて特定の商品種別を表示
$index = $_GET['goods_category'];
echo '<br>';
ec... | true |
73359f1aaf6edfc74296c7a42f0912e902dd7082 | PHP | nik-web/stockfoto-nik | /module/User/src/Service/UserWriteManagerInterface.php | UTF-8 | 2,819 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* stockfoto-nik cms
*
* @author Niklaus Höpfner <editor@nik-web.net>
* @link https://github.com/nik-web/stockfoto-nik
* @license http://opensource.org/licenses/MIT The MIT License (MIT)
* @version 1.0.0
* @since 1.0.0
*/
namespace User\Service;
use User\Entity\User;
use User\... | true |