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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0a39c5eb55ef6068b55c951b293028859f68fc0c | PHP | RafaelRamosR/cms-blog | /app/models/ModeloBase.php | UTF-8 | 1,146 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
require_once '../app/libs/DB.php';
class ModeloBase extends DB {
public $db;
public $string;
public function __construct() {
$this->db = new DB();
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
}
public function inse... | true |
58d5488182679cc7aac03969df0dafd26b0bd2df | PHP | tsengel11/csv_import | /user_upload.php | UTF-8 | 4,865 | 3.140625 | 3 | [] | no_license | <?php
define("HELP", " --file [csv file name] – this is the name of the CSV to be parsed
\n --create_table – this will cause the MySQL users table to be built (and no further
\n action will be taken)
\n --dry_run – this will be used with the --file directive in case we want to run the
s... | true |
b850fbd9675f1e8f3fd4d0f403a540181e611c88 | PHP | GajdaD/WayToFortune | /index.php | UTF-8 | 4,988 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
session_start();
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
header("location: game.php");
exit;
}
require_once 'connect.php';
$username = $password = "";
$username_err = $password_err = "";
if($_SERVER["REQUEST_METHOD"] == "POST"){
if(empty(trim($_POST["username"]))){
... | true |
42e1fd3c4c1c9a86a1cec589cc4a934f2013a3d8 | PHP | Quentin2706/DWQuentin | /PHPWEB/Projet_Film2/PHP/VIEW/Nav.php | UTF-8 | 2,602 | 2.9375 | 3 | [] | no_license | <?php
/* construction de l'url en fonction de l'uri existante */
// var_dump($_SERVER);
$uri = $_SERVER['REQUEST_URI'];
if (substr($uri, strlen($uri) - 1) == "/") // se termine par /
{
$uri .= "index.php?";
}
else if (in_array("?", str_split($uri))) // si l'uri contient deja un ?
{
$uri .= "&";
}
else
{
$... | true |
1a6b31485ba44825d57480a4363ebd26a79091e0 | PHP | marimont/DP1-Project | /stat.php | UTF-8 | 1,037 | 2.671875 | 3 | [] | no_license | <?php
function isLogged(){
if(!isset($_SESSION["login_time"]) || time() - $_SESSION["login_time"] > 2*60)
return false;
else
return true;
}
function cookiesEnabled(){
//to set an expiration date which is different from default you need to specify the domain
//localhost won't work -> setco... | true |
9b534a39edeb7eeda4eaae4cb389ec29bb0ca884 | PHP | cergel/wxadmin | /protected/models/CmsComment.php | UTF-8 | 4,892 | 2.625 | 3 | [] | no_license | <?php
class CmsComment extends CActiveRecord
{
public $a_info='';
/**
* @return string the associated database table name
*/
public function tableName()
{
return 't_cms_comment';
}
/**
* @return array validation rules for model attributes.
*/
public function rules()
{
// NOTE: you should only defi... | true |
6c089dd47ce34b75019c642ac84da6d4a03f2b96 | PHP | lx-s/slim-picture-gallery | /clear_cache.php | UTF-8 | 898 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
require('includes/config.php');
?><!doctype html>
<html lang="<?php echo HTML_LANG; ?>" dir="<?php echo HTML_DIR; ?>">
<head>
<meta charset="utf-8">
<title>Clear Cache</title>
</head>
<body>
<?php
if (CLEAR_THUMB_SECRET == '' || (isset($_GET['s']) && CLEAR_THUMB_SECRET == $_GET['s'])) {
function recur... | true |
ed4ab7f1072b20144b92a926bbbfcfcb3e46bcbf | PHP | live-admin/business | /czy_www/colourlife/common/models/SetableAdCommunityRelation.php | UTF-8 | 2,137 | 2.578125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "small_loans_community_relation".
*
* The followings are the available columns in table 'small_loans_community_relation':
* @property integer $small_loans_id
* @property integer $community_id
* @property integer $update_time
*/
class SetableAdCommunityRelation exten... | true |
682a913f17513ac11306387aeb8836a66816739d | PHP | mins01/mh | /application/modules/mh/views/bbs/skin/default/pagination.php | UTF-8 | 3,098 | 2.65625 | 3 | [] | no_license | <?
//$page,$max_page
//def_url
$def_url = preg_replace('|\?$|','',$def_url);
if(!isset($page)) $page = 1;
$page = (int)$page;
if(!isset($cut)) $cut = 5;
$st = floor(($page-1)/$cut)*$cut+1;
$ed = min($st+($cut-1),$max_page);
//echo $st,':',$ed,';',$max_page;
if($page>1){
$first_url = str_replace('{{page}}',1,$def_ur... | true |
985451866871a9c981d4efb73ea06cdf5c44c9c5 | PHP | brick/postcode | /src/Formatter/MTFormatter.php | UTF-8 | 705 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Brick\Postcode\Formatter;
use Brick\Postcode\CountryPostcodeFormatter;
/**
* Validates and formats postcodes in Malta.
*
* Postcode format is AAA NNNN, A standing for a letter and N standing for a digit.
*
* @see https://en.wikipedia.org/wiki/List_of_postal_codes
* @se... | true |
e9de429ee08d426adcf2188de4869bbe64866c9c | PHP | junwoung/myProjectBackend | /protected/models/Log.php | UTF-8 | 430 | 2.59375 | 3 | [] | no_license | <?php
class Log extends CActiveRecord{
const REGISTER = 0;
const LOGIN = 1;
const OTHER = 2;
public function tableName(){
return 'wj_log';
}
public function search(){
$criteria = new CDbCriteria;
$criteria->compare('id',$this->id);
return new CActiveDataProvider($this,array(
'criteria' => $criteria,... | true |
b6c45be8fcf9a7b67aad55b785a0351c17289aaa | PHP | cannonerd/learningphp | /learning/index.php | UTF-8 | 583 | 2.703125 | 3 | [] | no_license | <?php
//this is the front controller file
require_once dirname(__DIR__) . '/vendor/autoload.php';
$app = new Silex\Application();
$app['debug'] = true;
$pages = array(
array(
'title' => 'The first page',
'body' => '<p>Foo bar is here!</p>'
),
array(
'title' => 'The second page',
... | true |
fca8c8874ca9756849e50f6cc6f3a1824f4e1c4a | PHP | svsoft/yii2-lib | /modules/main/files/FileAttributeHelper.php | UTF-8 | 638 | 2.53125 | 3 | [] | no_license | <?php
namespace svsoft\yii\modules\main\files;
use \svsoft\yii\modules\main\files\FileAttributeTrait;
use \yii\helpers\Html;
class FileAttributeHelper
{
/**
* @param FileAttributeTrait $model
* @param bool $attribute
* @param array $imgOptions
*
* @return string
*/
static functi... | true |
f47423a2d922cd4c8e1469c9f8ef468e91c36ba9 | PHP | MahemaAzeem/MHARVR | /signupcheck.php | UTF-8 | 2,695 | 2.765625 | 3 | [] | no_license | <?php
include "db_conn.php";
if (isset($_POST['email']) && isset($_POST['password']) && isset($_POST['name']) && isset($_POST['con_pass']) && isset($_POST['reg'])) {
function validate($data){
$data = trim($data);
$data = stripcslashes($data);
$data = htmlspecialchars($data);
... | true |
484b1a5358f369d79b3aa1cbb84c93ba079077ab | PHP | pieterw3/phptesting | /index.php | UTF-8 | 5,909 | 3.078125 | 3 | [] | no_license | <?php include('header.php') ?>
<div class="container">
<div class="row">
<div class="col-md-6">
<h1>IF ELSE</h1>
<?php
//geboortejaar met DateTime
$flverjaardag = new DateTime('1993-11-03');
$geboortejaar = $flverjaardag->format('y');
$flhuidigjaar = new DateTime('today');
$flleeftijd = $flverjaardag->diff($flhuidigj... | true |
f5cd0b781e038096b90e3c6ff31eca210edf1a73 | PHP | i-am-chitti/StreamGirl | /admin/deleteEntity.php | UTF-8 | 5,781 | 2.765625 | 3 | [] | no_license | <?php
$errorMessages = null;
if(!isset($_GET["id"]) && isset($_GET["entityType"])) {
header("Location: ../error");
exit;
}
else {
require_once("../includes/config.php");
require_once("../includes/classes/ErrorMessage.php");
require_once("../includes/classes/Entity.php");
require_once(".... | true |
654ac9549bd22a60c7f132b7056918992da3d414 | PHP | tomaszdurka/mocka | /tests/mocks/TraitMock.php | UTF-8 | 203 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace MockaMocks;
trait TraitMock {
abstract function abstractTraitMethod();
public function traitMethod() {
}
public function bar () {
return 'traitbar';
}
}
| true |
620da90eeab9fe8da5d5ae78053140599d3f816c | PHP | ifeanyi-ajimah/previous-inventory-for-porkoyum | /app/Listeners/PermissionEventSubscriber.php | UTF-8 | 1,764 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Listeners;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
class PermissionEventSubscriber
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Hanlde creation e... | true |
aa303b39d0be2b1bbc49e91cc35ae385e26a6186 | PHP | johndavedecano/Hello-API | /src/Modules/User/Transformers/UserTransformer.php | UTF-8 | 699 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Hello\Modules\User\Transformers;
use Hello\Modules\User\Models\User;
use Hello\Modules\Core\Transformer\Abstracts\Transformer;
/**
* Class UserTransformer.
*
* @author Mahmoud Zalt <mahmoud@zalt.me>
*/
class UserTransformer extends Transformer
{
/**
* @param \Hello\Modules\User\Models\U... | true |
4043d3ecdbd54c523156bbfd48ff7220510cd782 | PHP | flexsim/flexnet-operations | /flexnet/EntitlementOrderService/Type/UpdateSimpleEntitlementDataType.php | UTF-8 | 8,544 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Flexnet\EntitlementOrderService\Type;
class UpdateSimpleEntitlementDataType
{
/**
* @var \Flexnet\EntitlementOrderService\Type\EntitlementIdentifierType
*/
private $entitlementIdentifier;
/**
* @var \Flexnet\EntitlementOrderService\Type\IdType|null
*/
private $enti... | true |
1fbf9132469724e79f1ff5b2987586dfecb42596 | PHP | mrFanBender/retail_store_system | /classes/validationException.php | UTF-8 | 337 | 2.796875 | 3 | [] | no_license | <?php
namespace Application\Classes;
class validationException extends \Exception{
public $messages = array();
public function __construct($msg, $target='msgBox', $type='error'){
$this->messages[] = array('message'=>$msg, 'target'=> $target, 'type'=>$type);
}
public function getMessages(){
return $this->mes... | true |
6c255029ed0bf520cce6ceae397734056178340f | PHP | Anushkakk/Recycle | /bookFinder/src/app/home/retrieve-data.php | UTF-8 | 32,377 | 2.78125 | 3 | [] | no_license | <?php
//GLOBAL VARIABLES {
//LIBRARY OF CONGRESS
//Define global variables for beginning, ending, and user call numbers
$BC_Subject;
$BC_ClassNum;
$BC_Cutter1;
$BC_Cutter2;
$BC_Cutter3;
$BC_Version;
$BC_Copy;
$EC_Subject;
... | true |
7b69a13bb400c1aceacbe6ffa8481afe97b6b884 | PHP | dasumenaria/Xavier-Exam | /download.php | UTF-8 | 2,097 | 2.515625 | 3 | [] | no_license | <?php
function cleanData(&$str)
{
$str = preg_replace("/\t/", "\\t", $str);
$str = preg_replace("/\r?\n/", "\\n", $str);
if(strstr($str, '"')) $str = '"' . str_replace('"', '""', $str) . '"';
}
// file name for download
$filename = "student_register.xls";
header("Content-Disposition: attach... | true |
b2d7d8d6fa2df435771863ac17cc0675c74a6488 | PHP | tarreislam/php-46elks | /src/Utils/Helper.php | UTF-8 | 3,371 | 3 | 3 | [] | no_license | <?php
namespace Tarre\Php46Elks\Utils;
use Tarre\Php46Elks\Exceptions\InvalidE164PhoneNumberFormatException;
use Tarre\Php46Elks\Exceptions\InvalidSenderIdException;
class Helper
{
public const E164PhoneNumberRE = '\+\d{1,3}\d+';
protected static $baseUrl;
protected static $defaultQueryParams;
/**... | true |
703a6abb84b662e2c89c55f9c70eba41b03d0eae | PHP | allomani/upgrade_scripts | /songs260_to_songs270/upgrade/ClassSQLimport.php | UTF-8 | 3,264 | 2.953125 | 3 | [] | no_license | <?php
class sqlImport {
function is_comment($text){
if ($text != ""){
$fL = $text[0];
$sL = $text[1];
switch($fL){
case "#":
$text = "";
break;
case "/":
if ($sL == "*")
... | true |
0112cb28dd43140939d4925b774694ac765c59bf | PHP | winzou/CommentBundle | /Controller/ThreadController.php | UTF-8 | 2,975 | 2.515625 | 3 | [] | no_license | <?php
/**
* This file is part of the FOS\CommentBundle.
*
* (c) Thibault Duplessis <thibault.duplessis@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace FOS\CommentBundle\Controller;
use Symfony\Component\DependencyInjection... | true |
db7d112357413afdbb306368743b873681952b26 | PHP | marcomag89/Graphene | /src/controllers/Filter.php | UTF-8 | 3,870 | 2.515625 | 3 | [] | no_license | <?php
namespace Graphene\controllers;
use Graphene\controllers\http\GraphResponse;
use Graphene\Graphene;
use Graphene\models\Module;
use Graphene\controllers\http\GraphRequest;
class Filter
{
public function setUp($ownerModule, $settings)
{
$this->scope = $settings['scope'];
$this->own... | true |
f44e06e9e2986a4750ccade5257698d4ae9d6448 | PHP | r02nils/webtop | /php/signup.php | UTF-8 | 2,727 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Sign up</title>
<link rel="stylesheet" href="../css/login.css">
<link rel="icon" href="icon.png">
</head>
<body>
<div class="wrapper fadeInDown">
<div id="formContent">
<!-- Tabs Titles -->
<h2 class="i... | true |
25e0169ddf7a210d25df90704f7191f6f53273b1 | PHP | ChallengeTheGods/platform-racing-2-server | /multiplayer_server/process/send_message_to_player.php | UTF-8 | 396 | 2.59375 | 3 | [] | no_license | <?php
function process_send_message_to_player($socket, $data)
{
if ($socket->process == true) {
$obj = json_decode($data);
$user_id = $obj->user_id;
$message = $obj->message;
$player = id_to_player($user_id, false);
if (isset($player)) {
$player->write('message`... | true |
0f8f120438e4b360dfbd034469e413ca6dd08982 | PHP | YveOne/PHP-Static3D-0.1.0alpha | /static3d/static3d_skinhandler.php | UTF-8 | 4,514 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
//TODO: docu
class S3D_SkinHandler
{
static private $_texture = null;
static function setTexture(&$res)
{
self::$_texture = &$res;
}
// destroy image
static public function dispose()
{
imagedestroy(self::$_texture);
self::$_texture = null;... | true |
c2a24c060fe6e36cd4ac607dd15e39e670f582a7 | PHP | asanchez75/efq_views | /handlers/efq_views_handler_filter_property.inc | UTF-8 | 5,421 | 2.875 | 3 | [] | no_license | <?php
// $Id$
/**
* Filter on an entity property
*/
class efq_views_handler_filter_property extends views_handler_filter {
/**
* This filter is not exposable.
*/
function can_expose() {
return FALSE;
}
function admin_summary() {
// Avoid generating notices if the field hasn't been set up yet.
... | true |
55021fa8bcb67e4245631cd9ac1e424305cbeab1 | PHP | swnsma/coursework3.1 | /src/Lancer/LanceBundle/Model/MagicObject.php | UTF-8 | 3,069 | 2.84375 | 3 | [] | no_license | <?php
namespace Lancer\LanceBundle\Model;
abstract class MagicObject
{
private $_data = array();
private $_originData = array();
private static $_underscoreCache = array();
/**
* Change requested field name to underscore type.
*
* @param $name
*
* @return string
*/
pr... | true |
e79d88b34534c0610b7355cea457fa30efc3c62d | PHP | hallowelt/mwstake-mediawiki-component-datastore | /tests/phpunit/FiltererTest.php | UTF-8 | 2,499 | 2.59375 | 3 | [] | no_license | <?php
namespace MWStake\MediaWiki\Component\DataStore\Tests;
use MWStake\MediaWiki\Component\DataStore\Filter;
use MWStake\MediaWiki\Component\DataStore\Filterer;
use MWStake\MediaWiki\Component\DataStore\Record;
class FiltererTest extends \PHPUnit\Framework\TestCase {
protected $testDataSets = [
[
'field1' =>... | true |
f9ecc9de537bbede964188bbd47074073a2cf4b1 | PHP | Luvslo/text_based_mmo | /web_application/libs/sysplugins/smarty_internal_templateparser.php | UTF-8 | 147,342 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Class TP_yyToken
*/
class TP_yyToken implements ArrayAccess
{
public $string = '';
public $metadata = array();
/**
* TP_yyToken constructor.
*
* @param $s
* @param array $m
*/
public function __construct($s, $m = array())
{
if ($s instanceof T... | true |
fa78c245aad95dcba348a4a30a5e2d075a408ff5 | PHP | omnicode/lara-tools | /src/Utility/LaraUtil.php | UTF-8 | 4,070 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace LaraTools\Utility;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Schema;
class LaraUtil
{
/**
* returns the relation type as string (without namespace)
*
* @param Obj... | true |
ff2b469885729c7c69049b86106a6346b64ef225 | PHP | agrezak/calculator | /backend/src/scripts/helpers.php | UTF-8 | 208 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
function to_csv($data)
{
$fp = fopen('calculations.csv', 'a+');
$request_body = file_get_contents('php://input');
fputcsv($fp, $data, true);
fclose($fp);
return $request_body;
}
?> | true |
ac8b1c80ac1e88840dc0d7a5feb709f10a8b7e07 | PHP | sapnasharmanaresh/bdeal.in | /application/modules/orders/views/totalSales.php | UTF-8 | 896 | 2.84375 | 3 | [] | no_license | <?php
if(empty($this->sales)){
echo "No product is sold yet";
}
else{
?>
<table class="table">
<tr>
<th>Sr no</th>
<th>Shop name</th>
<th>Client Name</th>
<th>Shipping Address</th>
<th>Sold items</th>
<th>Total price</th>
<th>Date of delivery</th>
... | true |
8f5cfb27e21f9692444e4dfd6970962f6343f764 | PHP | syl-viadcc/scientists4futureKit | /plugins/stb/letter/classes/StbCrypto.php | UTF-8 | 1,269 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
namespace Stb\Letter\Classes;
class StbCrypto
{
const METHOD = 'aes-256-ctr';
public static function getIV( ) {
$enc_iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length(self::METHOD));
return bin2hex($enc_iv);
}
/**
* Encrypt and decrypt
*
* @param string ... | true |
e9366ef5563262ae8be763b188dfa723a37b56f9 | PHP | Pravpro/New-Article-Plugin | /New Article Plugin/adminMenuNewArticle.php | UTF-8 | 10,411 | 2.875 | 3 | [] | no_license | <?php
/*
Plugin Name: New Article
Description: A plugin to create article publication entries
Version: 1.0
Author: Pravir Adlakha and Warren Chisasa
License: GPL2
*/
/* This plugin creates a new menu page.
* This plugin allows for the addition of New Article Entries for faculty members in a depar... | true |
bec1db4647a2cb6db7e1e4ac142de65f4cd415a6 | PHP | WoB-OSS/cssizer.com | /application/helpers/strip_helper.php | UTF-8 | 2,320 | 2.5625 | 3 | [] | no_license | <?php
function strip_only_tags($str, $tags, $stripContent=false)
{
$str = str_replace( "\t", " ", $str );
$str = str_replace( "</ script >", "</script>", $str );
$str = str_replace( "</ script>", "</script>", $str );
$str = str_replace( "</script >", "</script>", $str );
$str = str_replace( "</ script... | true |
86f0ebc10c4b393949a70cc8f3a8864f66233dcf | PHP | fpapadopou/pde | /Symfony/src/PDEBundle/FileSystemHandler/FileHandler.php | UTF-8 | 7,060 | 3.046875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace PDEBundle\FileSystemHandler;
/**
* Class FileHandler
* Low level file operations. Restrictions related to the app context apply.
*
* @package PDEBundle\FileSystemHandler
*/
class FileHandler extends BaseHandler
{
/**
* Creates a file in the specified directory.
*
* @param $dire... | true |
7143c7a3b445183cdc76cb97b0cb00c999508586 | PHP | Ak-Army/Stss | /src/Stss/Parser.php | UTF-8 | 10,340 | 2.84375 | 3 | [] | no_license | <?php
namespace Stss;
/**
* Parser class.
*/
class Parser
{
/**#@+
* Default option values
*/
const BEGIN_COMMENT = '/';
const BEGIN_ML_COMMENT = '/*';
const END_ML_COMMENT = '*/';
const BEGIN_SL_COMMENT = '//';
const BEGIN_INTERPOLATION = '#';
const BEGIN_INTERPOLATION_BLOCK =... | true |
8b39da3dcc09edfcd813aa75d834fbef5529e74d | PHP | wsqun/PHPModel | /observer/Subject.php | UTF-8 | 681 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | <?php
class Subject implements SplSubject
{
private $observers;
private $data;
public function setObserver()
{
$this->observers = new SplObjectStorage();
}
public function attach(SplObserver $observer)
{
$this->observers->attach($observer);
}
public function detach... | true |
b75d9fdfd98616ab22b7249469df75b4e13c9887 | PHP | AureleSarrail/P6_OC | /src/Service/UpdateVideoService.php | UTF-8 | 488 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Entity\Video;
use Doctrine\ORM\EntityManagerInterface;
class UpdateVideoService
{
private $em;
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
public function updateVideo(Video $newVideo, Video $video)
{
$vid... | true |
631732ad5eeee7d790961e508f6dac0245dca222 | PHP | serebro/reach-sphinx | /src/Reach/Sphinx/XmlPipe.php | UTF-8 | 5,341 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Reach\Sphinx;
use InvalidArgumentException;
use Traversable;
use XMLWriter;
class XmlPipe
{
const OUTPUT_MEMORY = 1;
const OUTPUT_STDOUT = 2;
/** @var XMLWriter */
protected $xml;
/** @var array */
protected $attributes = [];
protected $documents;
protected $kill_... | true |
2d0f08759b84583676226580b95525e728699f27 | PHP | whanem/php2-urok1 | /App/ModelAbstract.php | UTF-8 | 2,478 | 3.015625 | 3 | [] | no_license | <?php
namespace App;
use App\Db;
abstract class ModelAbstract
{
const TABLE = '';
public $id;
public static function findAll()
{
$db = new Db();
return $db->query(
'SELECT * FROM ' . static::TABLE,
static::class
);
}
public static functi... | true |
2375cf0d7605c9b8916e057f36d88cb68883580d | PHP | tdevos/scrum4free | /module/Scrum/src/Scrum/Form/Sprint.php | UTF-8 | 880 | 2.671875 | 3 | [] | no_license | <?php
namespace Scrum\Form;
use Zend\Form\Form AS Zend_Form;
use Zend\Form\Element\Text AS Input_Text;
use Zend\Form\Element\Textarea AS Input_Textarea;
use Zend\Form\Element\Submit AS Input_Submit;
use Zend\Form\Element\Date AS Input_Date;
class Sprint extends Zend_Form{
function __construct($name = null) ... | true |
2edb362e9dbad432b150625822586c45322f0b6a | PHP | masitings/lavender | /app/Html/Form/Tree.php | UTF-8 | 1,549 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Html\Form;
class Tree
{
public function tree($selected, $options, $resource)
{
unset($options['name']);
return view('layouts.partials.tree', [
'options' => $options,
'list' => $this->buildList($selected, $resource)
]);
}
prot... | true |
350049103dcf7e2063ad9287f262bec46d418955 | PHP | Talicke/Extranet-GBAF | /nouveau_password.php | UTF-8 | 2,326 | 2.59375 | 3 | [] | no_license | <?php
$user = $_GET['user'];
$bdd = new PDO('mysql:host=localhost;dbname=gbaf;charset=utf8', 'root', '');
$req = $bdd->prepare('SELECT question, reponse FROM comptes where username = :user');
$req->execute(array(
'user' => $user));
$donnees = $req->fetch();
?><!DOCTYPE html>
<html la... | true |
c45170d8f0a556fc1bc4f0678a40c2d542a88df6 | PHP | alexcaiza/snq | /php/consultas.php | UTF-8 | 13,619 | 2.75 | 3 | [] | no_license | <?php
include_once("conectar.php");
function consultarTipoNotaByParams($params) {
if (is_null($params)) {
return null;
}
$sql = "";
$sql .= " SELECT ";
$sql .= " tn.* ";
$sql .= " FROM ";
$sql .= " tiponota tn ";
$sql .= " inner join dominio d on d.codigodominio = tn.codigodominio ";
$sql .= " WHERE 1=1... | true |
f4fcd9251947affd90fa4e0f60e6341a6c1a5ac6 | PHP | sdrh/innomedia | /source/core/classes/innomedia/Page.php | UTF-8 | 36,908 | 2.59375 | 3 | [] | no_license | <?php
/**
* Innomedia
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.
*
* @copyright 2008-2014 Innoteam Srl
* @license http://www.innomatic.io/license/ BSD License
* @link http://www.innomatic.io
* @since Class avail... | true |
39b3f6181056fac68921dc6a0f947448a4b6bb31 | PHP | emilioorq/tfg_gestransport | /ajax/mantenimientos.php | UTF-8 | 3,580 | 2.65625 | 3 | [] | no_license | <?php
require_once "../modelos/Mantenimientos.php";
$mantenimiento = new Mantenimiento();
$idmantenimiento = isset($_POST['idmantenimiento']) ? limpiarCadena($_POST['idmantenimiento']) : "";
$fecha = isset($_POST['fecha']) ? limpiarCadena($_POST['fecha']) : "";
$nombre = isset($_POST['nombre']) ? limpiarCadena($_PO... | true |
2bc527d5e93235d79ccca8cdb4d59d8ebe591b40 | PHP | iRNano/ecommercephp | /controllers/process_register.php | UTF-8 | 736 | 2.8125 | 3 | [] | no_license | <?php
$firstName = $_POST['firstName'];
$lastName = $_POST['lastName'];
$email = $_POST['email'];
$password = sha1($_POST['password']); //encrypt
$new_user = [
"firstName" => $firstName,
"lastName" => $lastName,
"email" => $email,
"password" => $password
];
if($lastName !== "" && $lastName !== "" && $e... | true |
0fb05a80ff7eddcb9ee8a4159c43977ee5fb9d2a | PHP | mmiller093/Projects | /tutoring2.php | UTF-8 | 884 | 4.1875 | 4 | [] | no_license | <?php
//Each new term is generated by adding to the previous two terms
//$fibb[i] = $fibb[i-1] + $fibb[i-2]
//for a=0; a
// highest number to get
$max = 4000000;
// create array of fibonacci numbers
// we know it starts with 1, 1
$fibonacci = Array(1,1);
// index of n... | true |
6844564fefcd2cd4a9569411267898bdb0287e3e | PHP | alifahfathonah/dishub | /protected/controllers/FrontpageController.php | UTF-8 | 2,320 | 2.703125 | 3 | [] | no_license | <?php
class FrontpageController extends Controller
{
/**
* @var string the default layout for the views. Defaults to '//layouts/column2', meaning
* using two-column layout. See 'protected/views/layouts/column2.php'.
*/
public $layout='column3a';
private $_model;
/**
* @return array action filters
*/
pu... | true |
a7ab312c2664f6bc9bb8e458441a2324fcfb4f2e | PHP | jarmas8611/proyect | /src/Taskeet/MainBundle/EventListener/CalendarEventListener.php | UTF-8 | 3,178 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by JetBrains PhpStorm.
* User: rafix
* Date: 13/06/13
* Time: 16:01
* To change this template use File | Settings | File Templates.
*/
namespace Taskeet\MainBundle\EventListener;
use ADesigns\CalendarBundle\Event\CalendarEvent;
use ADesigns\CalendarBundle\Entity\EventEntity;
use Doctrine\ORM... | true |
ede4c1ee148f08d7705f0573912156efc5007ee8 | PHP | WebMechanicR/l5system | /site/classes/Mail.php | UTF-8 | 863 | 3.0625 | 3 | [] | no_license | <?php
/**
* класс для отправки почты
* @author riol
*
*/
class Mail extends System {
public function __construct() {
parent::__construct();
/**
* подключаем необходимые файлы
*/
require_once dirname(__FILE__).'/external/PHPMailer/class.phpmailer.php';
}
/**
* отправляет письмо
* @param array $t... | true |
233c19c63133b5208f505dd2bc10469c1954f3f8 | PHP | yazaki-ryo/line_api_test | /app/Http/Views/Composers/StoresComposer.php | UTF-8 | 2,007 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Http\Views\Composers;
use App\Services\DomainCollection;
use Cookie;
use Domain\Models\Company;
use Domain\Models\Store;
use Domain\Models\User;
use Illuminate\Http\Request;
use Illuminate\View\View;
final class StoresComposer
{
/** @var Request */
private $reques... | true |
98414ff18143bbf64ad75a195eabed671cfa86b1 | PHP | DrevardSteven/temperatureVilles | /affichage_temperature.php | UTF-8 | 1,229 | 2.765625 | 3 | [] | no_license | <html>
<?php
$bdd = new PDO('mysql:host=localhost;dbname=bdd_temperaturevilles;charset=utf8', 'root', '');
?>
<h1>Température météo</h1>
<?php
$bdd->query('SET lc_time_names = "fr_FR"');
$ville_sel = $_POST['ville_select'];
//echo $_POST["ville_select"];
$reponse = $bdd->prepare('SELECT ville, temperature, DATE_FORMAT(... | true |
0628b4ce3a492546b99c1d6aae306dfc8d6955bd | PHP | superdev7/mdreptime-laravel | /app/Models/System/Traits/HasProductAttributes.php | UTF-8 | 3,140 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Models\System\Traits;
use App\Models\System\ProductAttribute;
/**
* Has Product Attributes Relations Trait
*
* @author Antonio Vargas <localhost.80@gmail.com>
* @copyright 2020 MdRepTime, LLC
* @package App\Models\System\Traits
*/
trait HasProductAttributes
{
... | true |
05795f19a0a1808e22a52798b3e60df07c2c05a3 | PHP | metodikati/hospitaria | /admin/database/seeds/SpecialtiesSeeder.php | UTF-8 | 744 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use MetodikaTI\Specialties;
class SpecialtiesSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data = [
[
'name' => 'Alergia e inmunología ',
'estatus' => '... | true |
a52674eb62aa5cff281e4505d9ea6381ed4614d0 | PHP | benen005/jz | /include/cache.php | UTF-8 | 2,333 | 2.90625 | 3 | [] | no_license | <?php
$cache = new cache('../cache/1');
$data = file_get_contents("http://127.0.0.1/ben/index.php");
echo $cache->readData('index.php', $data);
//echo "<br />";
//echo $cache->get_url();
class cache {
/*
Class Name: cache
Description: control to cache data,$cache_out_time is a array to save cache date time out. ... | true |
e756184ba793faebe57a45aa28cabd01ea09dbb7 | PHP | reload/ting-client | /lib/request/rest-json/RestJsonTingClientRequestFactory.php | UTF-8 | 1,741 | 2.53125 | 3 | [] | no_license | <?php
require_once dirname(__FILE__) . '/../TingClientRequestFactory.php';
require_once dirname(__FILE__).'/RestJsonTingClientSearchRequest.php';
require_once dirname(__FILE__).'/RestJsonTingClientScanRequest.php';
require_once dirname(__FILE__).'/RestJsonTingClientObjectRequest.php';
require_once dirname(__FILE__).'/... | true |
b801a0079886087b83af7b3ae85d94f2f3da88cc | PHP | Sithira/StarMarketing | /app/Services/TreeBuilder.php | UTF-8 | 1,611 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: sithira
* Date: 2019-01-15
* Time: 07:33
*/
namespace App\Services;
use App\User;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Str;
class TreeBuilder
{
/**
* Build tree for a single user.
*
* @param Collection $users
* @re... | true |
23f231b47c0de2e5a5669b1eeb0a0e1423600964 | PHP | open-telemetry/opentelemetry-php | /src/API/Trace/StatusCode.php | UTF-8 | 563 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace OpenTelemetry\API\Trace;
/**
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#set-status
*/
final class StatusCode
{
public const STATUS_UNSET = 'Unset';
public const STATUS_OK = 'Ok';
public const STATU... | true |
87750206aafa42dae498e7e9ef48ebccddab13fc | PHP | fnj1017/ee4717-case-study-part-4-i-and-ii | /CaseStudyPt4_i_ii/update.php | UTF-8 | 1,121 | 2.6875 | 3 | [] | no_license | <?php
function redirect($url, $statusCode = 303)
{
header('Location: ' . $url, true, $statusCode);
die();
}
$name = $_POST['name'];
$size = $_POST['size'];
$price=$_POST['price'];
if (!$name || !$price || !$size) {
echo "<br>You have not entered all the required details.<br />"
... | true |
b2d26eac33464ba1d3a390a412129f6aa67bff01 | PHP | bossanyit/PrestashopControlling | /classes/ControllingMarketingSource.php | UTF-8 | 3,217 | 2.734375 | 3 | [] | no_license | <?php
class ControllingMarketingSource extends ObjectModel {
public $id;
public $id_controlling_source;
public $ad_expense;
public $reach;
public $visits;
public $ctr;
public $subscription_count;
public $oto_count;
public $oto_sum;
public $oto_... | true |
42a3bad9775a28d809b2d3e1200295a797f52342 | PHP | DulceDeLio/Group-Project | /post.php | UTF-8 | 1,272 | 2.578125 | 3 | [] | no_license | <?php
session_start();
include('database.php');
$sql = "SELECT * FROM department";
$stmt = $db->prepare($sql);
$stmt->execute();
$department = $stmt->fetchAll();
$email = $_SESSION['email'];
?>
<html>
<form action="listingHandler.php" method="post" enctype="multipart/form-data">
Category/Subject:<input type = "te... | true |
4e67846dc4c9d57184580d314ed299167618b7ab | PHP | ognjenm/maverick | /mgmt/save_photo.php | UTF-8 | 1,503 | 2.65625 | 3 | [] | no_license | <?php
require("includes.php");
$link = db_connect();
$type = $_REQUEST['type'];
$id = null;
if(intval($_REQUEST['photo_id']) > 0) {
$id = intval($_REQUEST['photo_id']);
$sql = "UPDATE images SET type='$type' WHERE id=$id";
} else {
$imgFile = basename(saveUploadedImage('photo', PHOTOS_DIR, 600, 600));
$thumb = c... | true |
a4572490a7bef03fc313a53a76a74ec2bb6c7757 | PHP | rifkyalamsyah/Pweb2 | /P2/array.php | UTF-8 | 1,453 | 3.890625 | 4 | [] | no_license | <?php
// Array
$nama0 = "Joe";
$nama1 = "Atan";
$nama2 = "Dia";
$nama3 = "Sholeh";
$nama4 = "Belewah";
$nama4 = "Tiyasan";
$nama4 = "Timo Ho";
?>
<?php
// Contoh Array
$nama1 = array(
0 => "Joe",
1 => "Atan",
2 => "Dia",
3 => "Sholeh",
4 => "Belewah",
5 => "Tiyasan"
);
// Contoh Array
$nama2 =... | true |
5e26a376e90f061d853d6188fb9793a1741ab6a3 | PHP | LucasS-a/ecommerce | /vendor/hcodebr/function/Functions.php | UTF-8 | 768 | 2.734375 | 3 | [] | no_license | <?php
namespace FunctionHcode;
use Hcode\Model\User;
class Functions
{
private $function = array();
public static function getFunctions()
{
$function = new Functions;
$function->setFunction(new \Twig\TwigFunction('getNameUser', function () {
$user = User::getFromSession... | true |
e36d55b5d3ddcc6dc040637b1fbfe62bae9dc945 | PHP | smelge/Cramond-Island | /includes/booking_process.php | UTF-8 | 8,152 | 2.796875 | 3 | [] | no_license | <?php
session_start();
// Load essential files
include_once('./user_db.php'); //$cramond_db
// Debug
/*
print_r($_POST);
echo '<hr>';
*/
// Get the type of room booked
$bookingType = explode("-",$_POST['availableRooms']);
$bookingRoomNo = $bookingType[0];
$bookingRoom = $bookingType[1];
$bookingDisabl... | true |
7e6557f74c02e73eef39c4fa571a685e7db2c27c | PHP | CIS553/projcect | /sqlTest.php | UTF-8 | 1,643 | 2.984375 | 3 | [] | no_license | × close edit hex TEXT viewer: /waffleoctopus.com/cis553/sqlTest.php
<!DOCTYPE HTML>
<html>
<body>
<?php
include('dbConnect.php');
//this tells if the screen is new, or being posted to by itself.
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (!empty($_POST["sqlSelectText"])) {
... | true |
2defaf553b85e27374bc2b18c5a051eeb787aeb4 | PHP | Dovtutis/slotMachine | /Class/Validation.php | UTF-8 | 4,168 | 3.125 | 3 | [] | no_license | <?php
class Validation
{
public $validErrors = [];
public function emptyAndClean($var)
{
if ($this->checkPostVar($var)) {
$var = $this->cleanPostVar($var);
return $var;
}else {
$this->validErrors[$var] = 'not set or empty';
}
}
public f... | true |
46fd881235f876f53df260c132ffb71dc1752731 | PHP | gabriedasilva/2020.2_P3_CodSystems | /Web/app/Controllers/Login.php | UTF-8 | 2,016 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use App\Models\Turma;
class Login extends BaseController
{
public function index()
{
return view('login');
}
//--------------------------------------------------------------------
public function login()
{
$email = $this->request->getPost('email');
$senha = md5($this->r... | true |
1f6ced189c08537500fceb41a40330d570698a7c | PHP | kristjanAnd/invoice | /module/Application/src/Application/Entity/Subject.php | UTF-8 | 3,822 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: kristjan
* Date: 13.04.15
* Time: 17:04
*/
namespace Application\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Subject
*
* @ORM\Table(name="subject")
* @ORM\Entity
* @ORM\HasLifecycleCallbacks
* @ORM\InheritanceType("JOINED")
* @ORM\DiscriminatorColumn(name="disc... | true |
45e5955216a89681beea2c3b7eb31b214fc7b2c1 | PHP | naciriii/erp | /Modules/Stores/Repositories/BaseRepository.php | UTF-8 | 2,476 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Stores\Repositories;
use Modules\Stores\Entities\Store;
//use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Client;
use Session;
use Cookie;
use Crypt;
use Cache;
class BaseRepository
{
protected $store;
protected $client;
protected $api_token;
protected $token;
... | true |
75ded05b921644809caed96eef49f34c911cb15d | PHP | CamileGhastine/Exos-solid | /O-exo5/ShippingFeet.php | UTF-8 | 179 | 2.8125 | 3 | [] | no_license | <?php
class ShippingFeet extends Shipping
{
public function getCost(Order $order): float
{
return $order->getWeight() < 10 ? 5 : $order->getWeight() / 2;
}
}
| true |
f6ad0b59a8d2311cb5d59ceeb2b940a79c6c775f | PHP | indivisualvj/enhavo | /src/Enhavo/Bundle/BlockBundle/Maker/Generator/PhpClass.php | UTF-8 | 6,073 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author blutze-media
* @since 2021-09-22
*/
namespace Enhavo\Bundle\BlockBundle\Maker\Generator;
class PhpClass
{
/** @var string */
private $namespace;
/** @var string */
private $name;
/** @var string */
private $extends;
/** @var array */
private $use;
/** @va... | true |
aa9f2886736f126ae3541994784121cbfa486f44 | PHP | Rickyvit/parcial1_programacion3 | /api/class/Connection.php | UTF-8 | 696 | 3.0625 | 3 | [] | no_license | <?php
class Connection
{
private static $db;
const SERVIDOR = 'localhost';
const USUARIO = 'root';
const PASSWORD = '';
const BASE = 'forum';
public function __construct()
{}
public static function obtener()
{
if (self::$db === null) {
self::abrir();
... | true |
c5976989b3474ad81c7a2c4c9fa21bcc612b1032 | PHP | capirucho/php-shoppingcart-and-cms | /storefront/product_detail.php | UTF-8 | 2,787 | 3 | 3 | [] | no_license | <?php
require 'header.php';
?>
<?php
if ( isset($_GET['product_id']) ) {
$productId = $db->real_escape_string( $_GET['product_id'] );
//tables to query
$product_category_table = "shopcart_product_category";
$products_table = "shopcart_products";
//the queries
$queryTheCategoryTable = "select * ... | true |
b6077d0b6a33cba01ef6b0da3d830c57504b23ed | PHP | yessicas/bodats | /protected/components/StandardFuelDB.php | UTF-8 | 2,394 | 2.84375 | 3 | [] | no_license | <?php
class StandardFuelDB {
public static function getStandardFuel($id_vessel_tug, $id_vessel_barge, $id_start, $id_end, $fuel_price=1){
//Get Tug Vessel
$TUG = Vessel::model()->findByAttributes(array('id_vessel'=>$id_vessel_tug, 'VesselType'=>'TUG'));
$TUG_POWER = 0;
if(isset($TUG_POWER)){
$TUG_POWER = $... | true |
5f6dec75f42b37341d0737943eced2022db75f4d | PHP | norse-blue/php-sikker | /src/Sanitization/Sanitizers/XssSanitizer.php | UTF-8 | 1,057 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Sikker is a PHP 7.0+ Security package that contains security related implementations.
*
* @package NorseBlue\Sikker
* @version 0.3.8
* @author NorseBlue
* @license MIT License
* @copyright 2016 NorseBlue
* @link https://github.com/NorseBlue/Sikker
*/
declare(strict_types = 1);
... | true |
14c5ad455447e387408104ccae9b7fa9ed1aacf9 | PHP | Lerinai/Suggest | /Web_Suggest/AppSuggest - Sign up/index.php | UTF-8 | 3,858 | 2.59375 | 3 | [] | no_license | <?php
session_start();
if(!empty($_POST['fullname']) && !empty($_POST['email']) && !empty($_POST['password']) && !empty($_POST['confirmpassword'])){
// VARIABLE
$fullname = $_POST['fullname'];
$email = $_POST['email'];
$password = $_POST['password'];
$confpassword = $_POST['confirmpass... | true |
529d1fc79df805075a13afb957f2c99d804216b1 | PHP | riskienf/WorkshopSem4 | /web/sayur-mayur/database/migrations/2021_06_09_131511_create_recipe_table.php | UTF-8 | 908 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRecipeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('recipe', functio... | true |
88846a52a8f7a4a1328b27036aecf15440807090 | PHP | SatishNidhi/voting-system | /backend/models/Contacts.php | UTF-8 | 1,770 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use Yii;
use common\models\User;
/**
* This is the model class for table "wd_contacts".
*
* @property integer $id
* @property string $name
* @property string $email
* @property string $phone
* @property string $subject
* @property string $body
* @property integer $postby_id
... | true |
328fbfd7332d0a73031cdb3dcd1fee8868b4a802 | PHP | douggr/emyi | /library/Emyi/Db/Statement.php | UTF-8 | 2,151 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
/*
* Emyi
*
* @link http://github.com/douggr/Emyi for the canonical source repository
* @license http://opensource.org/licenses/MIT MIT License
*/
namespace Emyi\Db;
use PDOStatement;
/**
* Represents a prepared statement and, after the statement is executed,
* an associated result set.
*
* @protecte... | true |
b1e2b3a91e8f556e182fa76215827fc86653eee3 | PHP | Stellarya/Equestria | /src/Entity/Reproduction.php | UTF-8 | 3,347 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\ReproductionRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ReproductionRepository::class)
*/
class Reproduction
{
/**
* @ORM\Id
*... | true |
93b750cc4ce37307a6d6e8e0fe491ac07db24629 | PHP | qwe2525033/lucklybet | /modules/guess/utils/xmlparser/PlayWayXmlParser.class.php | UTF-8 | 2,405 | 3.21875 | 3 | [] | no_license | <?php
/**
* 玩法XML解析器
* @author blueyb.java@gmail.com
* @since 1.0 2012-03-30
*/
class PlayWayXmlParser{
/**
* xml文件对应的对象
* @var SimpleXMLElement
*/
private $xml;
/**
* 玩法
* @var PlayWay
*/
private $playWay;
/**
* 解析xml文件,返回PlayWay对象
* @param string $xml xml文档
*/
public function parse(... | true |
ecc3f421f01bbd7221a1cb8824a47357d3459cdf | PHP | jarick/bx | /src/BX/Http/Session.php | UTF-8 | 3,868 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php namespace BX\Http;
use BX\Http\Store\NativeSessionStore;
class Session implements \ArrayAccess
{
use \BX\Config\ConfigTrait;
const VALUE = 'value';
const IS_MULTY = 'is_multy';
const FLASH_KEY = 'BX.Http.Flash';
/**
* @var IRequest
*/
private $request;
/**
* @var array
*/
protected static $flash ... | true |
3b746bcca4796c92f915c4fbfe535823f8eae55c | PHP | zsyzlyj/hr_seven | /application/models/Model_wage_gw_attr.php | UTF-8 | 1,324 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Model_wage_gw_attr extends CI_Model{
public function __construct(){
parent::__construct();
}
/* get the brand data */
public function getWageGwData(){
$sql = "SELECT * FROM wage_gw_attr";
$query = $this->db->query($sql);
return $query->result_array();
}
public function getData(){
$sql = "... | true |
963854801443a74e5dfe799ec34ac6af5339e10f | PHP | bruno-costa/sintonize-platform | /app/Repositories/Promotions/PromotionTest.php | UTF-8 | 2,812 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Promotions;
use App\Exceptions\HttpInvalidArgument;
use App\Models\AppUser;
use App\Models\ContentParticipation;
use App\Repositories\Option;
use Illuminate\Support\Collection;
class PromotionTest extends PromotionAbstract
{
/** @var Option[]|Collection */
public $options;
... | true |
4e2c39c692912fcf65cc471765e5bab9f4083277 | PHP | andparsons/mage-app-start | /app/code/Magento/Support/Model/Report/Group/Data/DuplicateOrdersByIncrementIdSection.php | UTF-8 | 2,251 | 2.625 | 3 | [] | no_license | <?php
namespace Magento\Support\Model\Report\Group\Data;
/**
* Report Duplicate Orders By Increment Id
*/
class DuplicateOrdersByIncrementIdSection extends AbstractDataGroup
{
/**
* {@inheritdoc}
*/
public function generate()
{
return [
(string)__('Duplicate Orders By Increm... | true |
fe2f9f8d2684f3f3175b2e62575b924e8ac88b55 | PHP | hsemix/yuga-framework | /src/Yuga/Console/Application.php | UTF-8 | 4,583 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Yuga\Console;
use Closure;
use Exception;
use Throwable;
use Yuga\Container\Container;
use Yuga\Interfaces\Events\Dispatcher;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\... | true |
013d166590cada93322b89277ecb12e10fc8ab90 | PHP | silverstripe/silverstripe-ckan-registry | /src/Model/ResourceFilter/Dropdown.php | UTF-8 | 2,140 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace SilverStripe\CKANRegistry\Model\ResourceFilter;
use InvalidArgumentException;
use SilverStripe\CKANRegistry\Forms\PresentedOptionsField;
use SilverStripe\CKANRegistry\Model\ResourceFilter;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
/**
* Provides a single select option f... | true |
ecc5c12c9cd46de67942063ad129c28e55dd547d | PHP | benoitmignault/myWebSite | /calculatrice/calcul.php | UTF-8 | 14,191 | 3.359375 | 3 | [] | no_license | <?php
// Cette fonction sera appellée lors de la création des deux nombres.
// Elle ne fait pas la distinction entre nombre 1 et nombre 2
function constructionNombre(float $nombre, float $unChiffre) {
if (empty($nombre)) {
$nombre = (float) $unChiffre;
} else {
// Exemple : on avait 5 et... | true |
d015af3d17f7248a1246c4fd1ee8d7b9dd5a5eab | PHP | jahangiralamdiu/PersonProject | /Person.php | UTF-8 | 1,275 | 3.65625 | 4 | [] | no_license | <?php
/**
* Description of Person
*
* @author bcc
*/
class Person {
public $frist_name;
public $middle_name;
public $last_name;
public function __construct($first_name, $middle_name, $last_name)
{
$this->frist_name = $first_name;
$this->middle_name = $middle_n... | true |
8102fa5c9a3f324d3862f6ab4f6a81a203c5fa61 | PHP | szotin/mafiaratings | /club_rules.php | UTF-8 | 2,655 | 2.515625 | 3 | [] | no_license | <?php
require_once 'include/club.php';
require_once 'include/rules.php';
class Page extends ClubPageBase
{
protected function show_body()
{
$view = RULES_VIEW_FULL;
if (isset($_REQUEST['view']))
{
$view = (int)$_REQUEST['view'];
}
$option = 0;
if (isset($_REQUEST['option']))
{
$option = (int)... | true |
b8c7cb75582ce056c297bd0a914e64f8b83c1179 | PHP | rajamgkvp/guruwe | /transferadmin/app/View/Helper/PostHelper.php | UTF-8 | 4,453 | 2.75 | 3 | [] | no_license | <?php
/**
* Session Helper provides access to the Session in the Views.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the ab... | true |
0c03413fc46a160d250019a1924dec6a9fe5cc8d | PHP | tuomomakela/Routechoice | /class/ManMadeFeature.class.php | UTF-8 | 628 | 2.953125 | 3 | [] | no_license | <?php
require_once(dirname(__FILE__).'/Point.class.php');
class ManMadeFeature extends Point
{
public function draw($image)
{
$size = 12;
$drawable = true;
imagesetthickness($image, 2.2);
imageline(
$image,
$this->x($drawable) - $size / 2,
$this->y($drawable) - $size / 2,
$this->x($drawabl... | true |