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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ca49d74001bd58c9f7fef966978175e77a5ac447 | PHP | rubiyet/WT_MID_SUM21 | /Project/18-37646-1/admin/user_acc_insert_form.php | UTF-8 | 4,409 | 2.609375 | 3 | [] | no_license | <?php
include '../../model/db_config.php';
$userid = "";
$error_userid = "";
$type = "";
$error_type = "";
$password = "";
$error_password = "";
$success_connect = "";
$success_connect1 ="";
$status = "";
$error = false;
$array_type= array("Admin","Teacher","Student");
$array_status = array("Active","... | true |
6f3d58bf8a528da54943a2e0038f0ad7c9a6a863 | PHP | jakubmann/slum_old | /classes/Post.class.php | UTF-8 | 1,639 | 3.25 | 3 | [] | no_license | <?php
class Post extends DbObject {
protected $mapping = [
'id',
'author',
'title',
'body',
'post_date'
];
protected $timePosted;
protected $datePosted;
public function getAuthorName() {
$sql = 'SELECT * FROM users WHERE id = :id';
$statement = App::getInstance()->getConn()->prep... | true |
0586182437b2ac5d52ef75dfc12b97c0b797ab0b | PHP | alexbonavila/ProgramacioConcurrent | /index.php | UTF-8 | 213 | 3.453125 | 3 | [] | no_license | <?php
function myEcho($callback){
if (is_callable($callback)){
call_user_func($callback);
}else{
echo $callback;
}
}
function otro(){
echo "a\n";
}
myEcho('otro');
$x=5;
myEcho($x); | true |
0ed35c79590e77efba2892df9f477d0b6a901247 | PHP | henriquerocha2004/sisnoc-4.1 | /app/Utils/TextUtil.php | UTF-8 | 186 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Utils;
class TextUtil
{
public static function clearText($value): String
{
return str_replace(['(', ')', '-', '.', ' ', '/'], '', $value);
}
}
| true |
0d0055e68968cc8c5a4edbc4e8aa1f9fe89a64d7 | PHP | madmis/jira-api | /src/JiraApi/Model/Issue.php | UTF-8 | 5,197 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace madmis\JiraApi\Model;
use JMS\Serializer\Annotation\Type;
use JMS\Serializer\Annotation\AccessType;
use JMS\Serializer\Annotation\SerializedName;
/**
* Class Issue
* @package madmis\JiraApi\Model
*
* @AccessType("public_method")
*/
class Issue
{
/**
* @Type("string")
* @var string... | true |
21887665957a7218e3c4f309bfe5b29d778f520a | PHP | sergiotabanelli/mysqlnd_ms | /tests/bench/micro_benches/mysqli_insert_id.php | UTF-8 | 2,328 | 2.875 | 3 | [
"PHP-3.01"
] | permissive | <?php
$rows = array(100000); // equals #rows
foreach ($rows as $k => $num_rows) {
$times[$num_rows . 'rows: overall'] = 0;
$times[$num_rows . 'rows: insert_id()'] = 0;
}
$description = 'Connect, n-times INSERT a row and call insert_id(), close.';
$errors = array();
do {
if (!$link = mysqli_connect($host,... | true |
8ac52ffaa30b8590a3d8b51fd6852a333a11473f | PHP | ZikulaGroupware/Main | /src/modules/Profile/lib/Profile/Api/Account.php | UTF-8 | 2,410 | 2.578125 | 3 | [] | no_license | <?php
/**
* Copyright Zikula Foundation 2009 - Profile module for Zikula
*
* This work is contributed to the Zikula Foundation under one or more
* Contributor Agreements and licensed to You under the following license:
*
* @license GNU/GPLv3 (or at your option, any later version).
* @package Profile
*
* Please... | true |
432cd4b03bc2822e2a638d06c8fe8d6af14371fa | PHP | fcusay/Email_Plain-Html | /email.php | UTF-8 | 1,445 | 3.3125 | 3 | [] | no_license | <html>
<body>
<?php
function spamcheck($field){
//Sanitize email add
$field = filter_var($field,FILTER_SANITIZE_EMAIL);
// validate email add
if(filter_var($field,FILTER_VALIDATE_EMAIL)){
return true;
}else{
return false;
}
}
?>
<h2>Sending Emails Using PHP</h2>
<?php
//dislay form if the us... | true |
dc8da5106bd19d84b3b23d707de8de44d1f90b23 | PHP | joxika/prioris_teszt | /prioris/authentication/registrationProcessor.php | UTF-8 | 1,043 | 2.53125 | 3 | [] | no_license | <?php
if ($_POST['password'] != $_POST['password_confirm']) {
header('Location: ../authentication/registrationPage.php?message='.urlencode("Password and confrim password has to match!"));
die();
}
include('../database/dbconnection.php');
$loadUserSql = "SELECT username FROM users WHERE username='$_POST[... | true |
1050609448a2b6c31f246986e57e1e7bab9e7368 | PHP | pixelfed/laravel-ffmpeg | /src/SegmentedExporter.php | UTF-8 | 2,266 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Pbmedia\LaravelFFMpeg;
class SegmentedExporter extends MediaExporter
{
protected $filter;
protected $playlistPath;
protected $segmentLength = 10;
protected $saveMethod = 'saveStream';
public function setPlaylistPath(string $playlistPath): MediaExporter
{
$this->play... | true |
0b70f851311318a202f3073c3add5bb8d19598d9 | PHP | theosgr/mini-projet-php | /modele/Villes.php | UTF-8 | 3,073 | 3.46875 | 3 | [] | no_license | <?php
// cette classe ne doit pas être modifiée
require "Ville.php";
class Villes{
private $villes;
function __construct(){
// tableau représentatif d'un jeu qui servira à développer votre code
$this->villes[0][0]=new Ville("0",3,0);
$this->villes[0][6]=new Ville("1",2,0);
$this->villes[3][0]=new Ville("2",... | true |
44070c7012c6725c2265b389a74ece2ed562c95e | PHP | phantase/nendos_collection | /php-api/classes/CountMapper.php | UTF-8 | 1,833 | 2.671875 | 3 | [] | no_license | <?php
class CountMapper extends Mapper
{
protected $tablename = "";
public function get() {
$count = new CountEntity();
$count->_setAccessories( (new AccessoryMapper($this->db))->count()['count']*1 );
$count->_setBodyparts( (new BodypartMapper($this->db))->count()['count']*1 );
$count->_setBoxes(... | true |
5cecb194b392a42b34dc8baba1c1e5fd4fd90045 | PHP | fromsep/php-design-pattern | /CreationalPatterns/BuilderPattern/MealBuilder.php | UTF-8 | 813 | 3.046875 | 3 | [] | no_license | <?php
namespace PHPDesignPatterns\CreationalPatterns\BuilderPattern;
use PHPDesignPatterns\CreationalPatterns\BuilderPattern\Burger\ChickenBurger;
use PHPDesignPatterns\CreationalPatterns\BuilderPattern\Burger\VegeBurger;
use PHPDesignPatterns\CreationalPatterns\BuilderPattern\Drink\Coke;
use PHPDesignPatterns\Creatio... | true |
f2e36033c3bb00e0a098b87f8473f1152a873768 | PHP | HamidiMehdi/FLT-APP | /src/Service/UserService.php | UTF-8 | 2,221 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Entity\Manager;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
class UserService
{
/** @var EntityManagerInterface */
private $em;
/**
* UserService constructor.
* @param EntityManagerInterface $em
*/
public function __construct(Ent... | true |
930e2c26fa0b3943134ed688e174580630d111c2 | PHP | angacu/actividad20 | /filtrado.php | UTF-8 | 952 | 3.03125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Filtrado</title>
</head>
<body>
<?php
//conexiones a la BBDD
include "dbNBA.php";
//comprobación de errores:
//comprobación de $_POST
if(isset($_POST["equipo_local"])&&(!empty($_POST["equipo_local"]))){
echo "MENSAJE RECIBIDO";
$nba... | true |
b1ecd0758441de13f8e6271a5906452285bfbeef | PHP | DavidSmallwood/masterclass-repo | /src/Model/Story.php | UTF-8 | 1,093 | 2.875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
namespace MasterClass\Model;
use MasterClass\Dbal\AbstractDb;
class Story {
protected $db;
protected $dbconfig;
public function __construct(AbstractDb $db) {
$this->db = $db;
}
public function getStory ($id) {
$sql = 'SELECT * FROM story WHERE id = ?';
return $this->db->fetchOne... | true |
d1682f671c23283bc553bd5bc1e91c3344f58f81 | PHP | mmilosheski/codeable-user-tables | /src/init.php | UTF-8 | 7,625 | 2.578125 | 3 | [] | no_license | <?php
if ( !defined( 'ABSPATH' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
add_action( 'plugins_loaded', [ 'Codeable_Users_Table', 'codeable_users_table_load_plugin_textdomain' ] );
register_activation_hook( PLUGIN_FILE_URL, [ 'Codeable_Users_Table', 'plugin_activated' ]... | true |
b1b38bc5f7dd5c9b6ee32a911c4b96ef8c7c0c00 | PHP | sndpbay20/opps | /basic_php/basics/index.php | UTF-8 | 597 | 4.0625 | 4 | [] | no_license | <?php
class calculation {
public $a,$b,$c;
function sum(){
$this-> c = $this -> a + $this-> b;
return $this-> c;
}
function sub(){
$this-> c = $this -> a - $this -> b;
return $this-> c;
}
}
$A = new calculation();
$A->a = 4;
$A... | true |
5392482fe940cd5025ce27e18f07691e3e44754b | PHP | Jess247/php-basics | /classes/functions_class_objects.php | UTF-8 | 1,739 | 3.59375 | 4 | [] | no_license | <?php
// to check if a class exists
if(class_exists('Carclass')){
$volkswagen = new Carclass();
}
// -----------------------------------------------------------
// to create an alisa for a class
// this creates a alias of a class with a different class name
if(!class_exists('ShortName')) {
class_alias('Long... | true |
63b494652957e9e665f7fe342fe79e05b4e3cf56 | PHP | Stevenhr/CS_Contrato | /Datos/ManejadorAsignacion.php | UTF-8 | 32,710 | 2.609375 | 3 | [] | no_license | <?php
if(!class_exists('Query')){ include 'Query.php'; }
include("SeguimientoContrato.php");
class ManejadorAsignacion
{
private $seguimientoContrato;
private $db;
public function __construct()
{
$this->db = new Query('Principal');
$this->seguimientoContrato = array();
}
public function o... | true |
c35209b4c965910606c47a168cba83d2c6c5b73e | PHP | djrosl/CALLBACKER | /src/migrations/m170117_153133_create_schedule_table.php | UTF-8 | 720 | 2.5625 | 3 | [] | no_license | <?php
use yii\db\Migration;
/**
* Handles the creation of table `schedule`.
*/
class m170117_153133_create_schedule_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('schedule', [
'id' => $this->primaryKey(),
'rule_id' => $... | true |
e7538d98213cbca39451bbba96917a6b04b163ce | PHP | nuwanpriyamal/hotel-menu-card-php | /basket.php | UTF-8 | 2,449 | 3.015625 | 3 | [] | no_license | <?php
if (!isset($_SESSION)) {
session_start();
}
include "db.php"; //include db.php file to connect to DB
$pagename = "Your Smart Bucket"; //create and populate variable called $pagename
echo "<link rel=stylesheet type=text/css href=mystylesheet.css>";
echo "<title>" . $pagename . "</title>";
echo "<body>";
includ... | true |
e4bf0a9c5b29c004cefadec1592c25272c61b2df | PHP | sammymwangangi/car-rental | /app/Imports/ImportCars.php | UTF-8 | 613 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Imports;
use App\Car;
use Maatwebsite\Excel\Concerns\ToModel;
class ImportCars implements ToModel
{
/**
* @param array $row
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function model(array $row)
{
return new Car([
'name' => $row[0... | true |
ceec27ac600dd8e6c4607bdc26b387ba01976e85 | PHP | vijay4004/Scientia | /Scientia/templates/info.php | UTF-8 | 566 | 2.734375 | 3 | [] | no_license | <?php
$connect = mysql_connect(“</localhost:3306>”, “root”, “vijay4004”);
if (!connect) { die('Connection Failed: ' . mysql_error());
{
mysql_select_db(“employees”, $connect);
$user_info = “INSERT INTO empdetails (name,designation,address,phone) VALUES ('$_POST[name]', '$_POST[designation]', '$_... | true |
098881cff9603ea04718b5df4b4d5eefeb8c0006 | PHP | Cristovao-bit/manutencaolira | /admin/_system/categorias/create.php | UTF-8 | 2,828 | 2.515625 | 3 | [] | no_license | <?php
if(!class_exists('Login')):
header('Location: ../../painel.php');
die;
endif;
?>
<form method="post" action="" name="CategoryForm" enctype="multipart/form-data" class="container main_class_form">
<fieldset>
<legend>Criar Categoria</legend>
<?php
$data = filter_input_array(INPU... | true |
1846bca68b7f9b742c7e215454a8478826f18722 | PHP | plagunov/comitka | /app/models/UnregisteredContributor.php | UTF-8 | 1,152 | 2.796875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use yii\base\Object;
/**
* Unregistered contributor model
*/
class UnregisteredContributor extends Object implements ContributorInterface
{
/**
* @var string Contributor name
*/
public $contributorName;
/**
* @var string Contributor e-mail
*/
public $... | true |
a2504e4b24aff9fa5b2152d74e70946838b5354c | PHP | marcaube/hex | /tests/EventSourcing/Storage/MemoryStoreTest.php | UTF-8 | 1,047 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Ob\Hex\Tests\EventSourcing\Storage;
use Ob\Hex\EventSourcing\Storage\MemoryStore;
/**
* @covers Ob\Hex\EventSourcing\Storage\MemoryStore
*/
class MemoryStoreTest extends \PHPUnit_Framework_TestCase
{
/**
* @var MemoryStore
*/
private $store;
private $events = [];
public ... | true |
09a3bdc167b36a2ea5162c6731e903888437e9c2 | PHP | K-Kasp/LaracastLaravel | /database/seeders/DatabaseSeeder.php | UTF-8 | 1,649 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use App\Models\Category;
use App\Models\User;
use App\Models\Post;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeders.
*
* @return void
*/
public function run()
{
User::truncate();
Cat... | true |
7757e51f51f880ad56d755b8aaab692bb01367a6 | PHP | pivovarcik/cms-gambik | /server/core/library/Gambik/G_Paginator.php | UTF-8 | 12,717 | 2.78125 | 3 | [] | no_license | <?php
/**
*
*
* @version $Id$
* @copyright 2011
*/
class G_Paginator {
private $konecek;
private $akt_page;
private $total;
private $count;
private $perpage;
private $ajax;
public function __construct($akt, $total, $perpage, $ajax = false){
$this->akt_page = $akt;
$this->total = $total;
//$this->cou... | true |
8379593e68bedf02b3a2cd9140d83ba1c6ff5d15 | PHP | MonitoresSena/senaPensum | /app/Http/Controllers/ProgramsController.php | UTF-8 | 4,022 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Program;
class ProgramsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$progr... | true |
34d8d7b1cdc5044b83e21e65077cd958e549cddf | PHP | haolinbird/phpFamily | /Vendor/MNLogger_set/MNLogger0.5.3-beta/DATALogger.php | UTF-8 | 1,108 | 2.65625 | 3 | [] | no_license | <?php
namespace MNLogger;
class DATALogger extends Base{
protected static $filePermission = 0777;
protected $_logdirBaseName = 'data';
protected static $configs=array();
protected static $instance = array();
/**
* @param string $config
* @return static
*/
public static function... | true |
5f6266bc011a94f18326fb9bf8f8e939a24f73e9 | PHP | TPTShipbrokers/tptWeb | /modules/admin/views/select-control.php | UTF-8 | 614 | 2.953125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
Parameters:
rows - options array
name - name for select control
multiple - true/false, wheter is a multiple choice or not
value - attribute name for option value
text - attribute name for option text
*/
?>
<select name="<?= $name ?>" class="form-control" <?= $multiple ? "multiple" : "" ?>>
... | true |
fa545400cda0d7f117d3dcf2340c45255e65f864 | PHP | KaiHelsen/Warehouse_bots | /src/Model/Cell.php | UTF-8 | 1,933 | 3.1875 | 3 | [] | no_license | <?php
namespace App\Model;
class Cell
{
private coordinate $coordinate;
private string $ingredient;
private bool $occupied;
private bool $isEdge;
public function __construct(int $x, int $y, string $ingredient, bool $isEdge, bool $robot = false)
{
$this->coordinate = new Coordinate(... | true |
072b6f56be829f2cf380938ceae15c04e465c077 | PHP | luispflamminger/sem3-skriptsprachen | /04_Datentypen/Aufgabe_4_2.php | UTF-8 | 442 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Zufallsbilder</title>
</head>
<body>
<?php
$bilder = array("blumen.jpg", "boot.jpg", "landschaft.jpg", "stadt_am_meer.jpg", "strand.jpg");
$max = count($bilder) - 1;
$zufallszahl = rand(... | true |
ba2cb76c578fbf4b1e648cce238ca24b36a63f05 | PHP | evanceit/evance-api-php-client | /src/Evance/Resource/Shipping/Services.php | UTF-8 | 2,791 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Evance\Resource\Shipping;
use Evance\AbstractResource;
use Webmozart\Assert\Assert;
/**
* The Shipping Service resource class is a direct representation of the API endpoint.
* If you do not wish to use our
* @package Evance\Service\Shipping\Resource
*/
class Services extends AbstractResource
{
... | true |
30ea606510ac5ec50467a9082143858e4e0a8d27 | PHP | noobintheshell/ctfs | /2019-replyctf/web/web300/_var_www_html_forgot.php | UTF-8 | 2,681 | 2.640625 | 3 | [] | no_license | <link href="style.css"rel="stylesheet"type="text/css">
<?php
$fertig=$_POST["fertig"];
$benutzername=$_POST["benutzername"];
$rc=0;
$conn=new mysqli("localhost","admin","pass","company");
if($conn->connect_error)
{
die("ERROR: Unable to connect: ".$conn->connect_error);
}
e... | true |
be2c7b70866f6aeca8b46150b572c48b8962e863 | PHP | sagarstalwartdigital/sweda-test | /code/Stalwart/Sweda/Api/OrderlineRepositoryInterface.php | UTF-8 | 1,257 | 2.578125 | 3 | [] | no_license | <?php
namespace Stalwart\Sweda\Api;
use Magento\Framework\Api\SearchCriteriaInterface;
use Magento\Framework\Data\SearchResultInterface;
/**
* Interface OrderlineRepositoryInterface
* @package Stalwart\Sweda\Api
*/
interface OrderlineRepositoryInterface
{
/**
* Save a Order
*
* @param \Stalwart... | true |
05b71ac89d334304948684afc6d2603b94237561 | PHP | syaiful6/expressive | /src/app/Middleware/ErrorHandler.php | UTF-8 | 1,439 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Middleware;
use Zend\Diactoros\Stream;
use App\Functional\Singledispatch;
use Zend\Expressive\Template\TemplateRendererInterface as Template;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Zend\Diactoros\Response\HtmlResponse;
class... | true |
fbb0800453b0b7bc2c13f408cebe59c41563eacb | PHP | douglaszuqueto/blog | /app/Support/Http/Controllers/Traits/FileUpload.php | UTF-8 | 1,347 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Support\Http\Controllers\Traits;
use Illuminate\Http\UploadedFile;
use Intervention\Image\Facades\Image;
trait FileUpload
{
protected $basePath = 'uploads/';
protected $imagePath;
public function upload(UploadedFile $image, $name, $width = null)
{
$data['image_name'] = $this->getFile... | true |
3b4bb67d52480da6a456a6abb1f31f5903f9b694 | PHP | erziebart/graphzapp | /parser_test.php | UTF-8 | 1,258 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Parser Test</title>
<?php
include "compiler/report.php";
include "compiler/lexer.php";
include "compiler/parser.php";
include "compiler/imports.php";
include "compiler/codegen.php";
$expr = '2cos(t;1,0)';
GraphzappLexer::init();
$input_toks = Graphz... | true |
dc45a014eb565156d6cb7f27be659ff982d57380 | PHP | lyfewithcode/web-development-course-6 | /return-function.php | UTF-8 | 318 | 3.3125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
<style type="text/css">
</style>
</head>
<body>
<?php
function add($x, $y) {
return $x + $y;
}
echo $z = add(5, 10).'<br>';
echo $z = add(15, 10).'<br>';
echo $z = add(25, 10).'<br>';
?>
</body>
</html> | true |
9e298af167d4c429e9f152f7cb5c2820716af422 | PHP | ZacZabawa/Storybox | /public/TablePHP/components/grid/columns/extended_hyper_link_column_decorator.php | UTF-8 | 1,030 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
class ExtendedHyperLinkColumnDecorator extends CustomFormatValueViewColumnDecorator
{
private $template;
private $target;
private $dataset;
public function __construct($innerField, $dataset, $template, $target = '_blank')
{
parent::__construct($innerField);
$this->template = ... | true |
01b6a5b006633403881b3aa5ea7d1d5898238820 | PHP | codie1982/kymrest | /app/models/topban_gallery.php | UTF-8 | 7,369 | 2.5625 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of adres
*
* @author engin
*/
class topban_gallery extends model {
private $_selectta... | true |
befcca3acfc57fae0fcc44eb67d28052a46aec52 | PHP | Anianyan/Algorithms | /selectionSorting.php | UTF-8 | 692 | 3.90625 | 4 | [] | no_license | <?php
require 'common.php';
/**
* Sorting array using selection sorting algorithm.
* Space -> O(1)
* Time -> O(n^2)
*
* @param array $arr unsorted array passed by reference.
*/
function sortArrayWithSelection( &$arr ) {
$i = 0;
$size = count( $arr );
while ( $i < $size - 1 ) {
$j = $i;
... | true |
36b014c432156981cdb973bb9f24aab4bd208af1 | PHP | cabrelken/restaurantapi-master | /database/seeds/OrdersTableSeeder.php | UTF-8 | 765 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Models\Dish;
use App\Models\Table;
use App\Models\Order;
use App\Models\Restaurant;
class OrdersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//factory(App\Models\Restaurant::... | true |
62204a796955c7f5bac8ac773b8b5ce9c1168d7b | PHP | mrTimofey/laravel-admin-api | /src/RequestTransformer.php | UTF-8 | 5,855 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php /** @noinspection PhpUnused */
namespace MrTimofey\LaravelAdminApi;
use Exception;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Http\Request;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Str;
use InvalidArgumentException;
use MrTimo... | true |
0cff2a43fafc5e6d1b38c13b4d3806aa4df41940 | PHP | TomasRebot/mvc-php | /App/Core/Model.php | UTF-8 | 2,779 | 2.90625 | 3 | [] | no_license | <?php namespace App\Core;
use App\Helper\DB;
/**
* Core Model:
*
* @author tomi rebot <tomas.devel@gmail.com>
* @since 1.0.2
*/
class Model {
/** @var Database An instance of the database class. */
protected $Db = null;
/** @var array The record from the database */
protected $data = [... | true |
5abd3425b1b3a55c26156d7be25d6f2295b35e86 | PHP | liucunzhou/oxcrm | /application/index/validate/User.php | UTF-8 | 486 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\index\validate;
use think\Validate;
class User extends Validate
{
protected $rule = [
'nickname' => 'require|max:25',
'password' => 'notbetween:6,120'
];
protected $message = [
'nickname.require' => '用户名不能为空',
'nickname.unique' => '用户名... | true |
449521d7adaa8ce71f6c7bd6752c964280b41879 | PHP | ishmar82/curso | /php/embed.php | UTF-8 | 1,395 | 2.734375 | 3 | [] | no_license | <?php
$nombre = [];
$nombre["name"] = "Andrea";
$nombre["lastName"] = "Maldonado";
$sorteo = rand(0, 1);
$socialMedia = [
"<a href='https://google.com'>Google</a>",
"<a href='https://facebook.com'>Facebook</a>",
"<a href='https://twitter.com'>Twitter</a>"
];
$socialMedia[] = "<a href='htt... | true |
7ae70d032c5dc1ef3c594be6f2295a94d64cacc1 | PHP | nschirmer/FloPoker | /src/AppBundle/Entity/PlayerInterface.php | UTF-8 | 348 | 3.296875 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
interface PlayerInterface
{
public function __construct(string $name = null);
public function getId();
public function setName(string $name): PlayerInterface;
public function getName(): string;
public function setCoins(int $coins): PlayerInterface;
public ... | true |
c9cd15dcdd813563df203783a2cc4ad126f03c2b | PHP | Archer70/desmond | /src/functions/docs/ObjectQuestion.php | UTF-8 | 496 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Desmond\functions\docs;
use Desmond\functions\Doc;
class ObjectQuestion implements Doc
{
public function id()
{
return 'object?';
}
public function synopsis()
{
return 'Returns TRUE if the supplied argment is an Object, otherwise FALSE.';
}
public function ... | true |
248beda0a174b792c2982836b19a9c58fe402b43 | PHP | tempobrasil/driverup | /includes/obj.form.php | UTF-8 | 5,791 | 2.78125 | 3 | [] | no_license | <?
class girafaFORM{
private $title;
private $html;
private $script_action;
private $boxes = array();
private $table;
private $fieldLegend;
public $reg;
public $isEdit = false;
public $linkVoltar;
public $linkNovo;
public $class = null;
function girafaFORM($title, $script_ac... | true |
7f0a2cd1e51ce00a78534a881a00c0b752e5e0ef | PHP | DallingtonAsin/CommercialBanksSystem | /app/Providers/AuthServiceProvider.php | UTF-8 | 3,203 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace MillionsSaving\Providers;
use MillionsSaving\Policies\EventPolicy;
use MillionsSaving\CustomModels\Event;
use MillionsSaving\User;
use MillionsSaving\Models\User\Role;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
use Illuminat... | true |
01b9f0fd7a975ac0a8fc45f5a86e4ef3627d6389 | PHP | JLCoreSys/SiteBundle | /Entity/IpAddress.php | UTF-8 | 7,720 | 2.640625 | 3 | [] | no_license | <?php
namespace CoreSys\SiteBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* IpAddress
*
* @ORM\Table(name="ip_address", indexes={@ORM\Index(name="ip_address_idx", columns={"ip_address"})})
* @ORM\Entity(repositoryClass="CoreSys\SiteBundle\Entity\IpAddressRepository")
* @ORM\HasLifecycleCallbacks
*/
class... | true |
3ab2f139e7365fbe4ad4713afb897a99bf77776b | PHP | davidzilli/watch_list | /login.php | UTF-8 | 2,014 | 2.734375 | 3 | [] | no_license | <?php
session_start();
require_once 'classes/Membership.php';
$membership = new Membership();
// If the user clicks the "Log Out" link on the index page.
if(isset($_GET['status']) && $_GET['status'] == 'loggedout') {
$membership->log_User_Out();
}
// Did the user enter a password/username and click submit?
... | true |
2f40482d898c7929a73afacac935dcf1ac464641 | PHP | Bw3th/TenMinutes | /server/app/Http/Frontend/Controllers/SearchController.php | UTF-8 | 1,085 | 2.75 | 3 | [] | no_license | <?php
namespace App\Http\Frontend\Controllers;
use App\Http\Controller;
use App\Repositories\Eloquent\PoemRepository as Poem;
use App\Repositories\Eloquent\AppreciationRepository as Appreciation;
use Illuminate\Http\Request;
class SearchController extends Controller
{
protected $poem;
protected $appreciation... | true |
a5d55299daaccb1dbdbb2f878b25ed70c3619357 | PHP | bbe-io/hubspot-api | /src/Resources/Contracts/CanRetrieveData.php | UTF-8 | 957 | 2.703125 | 3 | [] | no_license | <?php
namespace BBE\HubspotAPI\Resources\Contracts;
use Illuminate\Support\Collection;
interface CanRetrieveData
{
/**
* Perform a get request and return a Collection of models.
*
* @param String $endpoint
* @param array $options
* @return Collection
*/
public function get($endpo... | true |
8fd9412d622629e5032baf55886478154e5a081c | PHP | booster085/softuni | /PHP/Infostart/lect4/printBudget.php | UTF-8 | 640 | 3.140625 | 3 | [] | no_license | <?php
function printBudget($arr, $head){
$tableStr = "<table border=\"1\">\n<thead>\n
\t<tr><th>$head[0]</th><th>$head[1]</th><th>$head[2]</th><th>$head[3]</th></tr>\n</thead>\n<tbody>\n";
for ($i = 0; $i < count($arr) - 1; $i++) {
$row = $arr[$i];
$tableStr .= "\t<tr>";
foreach ($ro... | true |
a94666301974e5cb31eb800b9eb034f989eacfef | PHP | atif-shaikh/React-PHP-HRAPP | /src/routes/department.php | UTF-8 | 3,822 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Routes;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Slim\Routing\RouteCollectorProxy;
use App\Config\Db;
use App\Repository\Department;
use App\Utils\Sanitize;
use App\Action\PreflightAction;
$group->get('/departments', function... | true |
61da5f7b449058827e82155ef4fae9b768914678 | PHP | fcasaloti/Inventory-App | /inc/utilities/DataParser.class.php | UTF-8 | 14,681 | 2.796875 | 3 | [] | no_license | <?php
//class responsible to handle data
class DataParser
{
public static function parseDataHW($fileContents)
{
$c = new Computer();
$fileContents = str_replace('"', '', $fileContents);
$lines = explode("\n", $fileContents);
foreach ($lines as $key => $line) {
$co... | true |
9d2ecddbd95103aee6c5cf885a9f21bcfcd56bd7 | PHP | bahdcoder/nesabox | /linode/src/Api/LinodeType.php | UTF-8 | 552 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Bahdcoder\Linode\Api;
use GuzzleHttp\Client;
class LinodeType extends Api
{
/**
* The api client
*
* @var Client
*/
protected $client;
/**
* Initialize guzzle client
*
* @return void
*/
public function __construct(Client $client)
{
... | true |
b27043a60df2952023c32ba30c477ed74cfb1a20 | PHP | EugeneMondkar/e-commerce-site-php-based | /admin-add-product-process.php | UTF-8 | 1,939 | 2.546875 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['user_level']) or ($_SESSION['user_level'] != 1))
{ header("Location: login.php");
exit();
}
require("mysqli_connect.php");
$product_name = $_POST["product_name"];
$product_image = ... | true |
615ccce3d35c4e06da9e5e007ac3a6c524de9c7b | PHP | aristech/AltEnergy | /Laravel/app/Http/CustomClasses/v1/SendMail.php | UTF-8 | 12,295 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\CustomClasses\v1;
use App\Note;
use App\Damage;
use App\Http\Resources\DamageResource;
use App\Http\Resources\NoteResource;
use App\Service;
use App\Http\Resources\ServiceResource;
use DB;
//#TODO : Insert herefor services as well
class SendMail
{
private $reminderDmg = array();
pr... | true |
355021b2267ce1f97e496e9e49c9c33393e8fbd6 | PHP | JmyTest/btLearn | /algorithm/20190224_QuickSort/TaoQuickSort.php | UTF-8 | 1,286 | 3.625 | 4 | [] | no_license | <?php
function swap(array &$arr,$a,$b){
$temp = $arr[$a];
$arr[$a] = $arr[$b];
$arr[$b] = $temp;
}
function Partition(array &$arr,$low,$high){
$pivot = $arr[$low]; //选取子数组第一个元素作为枢轴
while($low < $high){ //从数组的两端交替向中间扫描
while($low < $high && $arr[$high] >= $pivot){
$high --;
... | true |
3c95d4582a2c9c304d4b43dcd60d069584b5be32 | PHP | mhmmd-nauman/Laravel-BackEnd | /app/models/PackageRoom.php | UTF-8 | 779 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
class PackageRoom extends \Eloquent {
protected $fillable = array('package_id','room_id');
public $timestamps = FALSE;
public function room()
{
return $this->belongsTo('Room');
}
public function package()
{
return $this->belongsTo('Package');
}
public function... | true |
030dd8c82b1a774672368c53562a468cdcb19527 | PHP | Davidd0099/Proyectos | /ClasePhP/ciclos3/6/l6.php | UTF-8 | 234 | 2.8125 | 3 | [] | no_license | <?PHP
$q=0;
for ($i=0; $i < $_POST["cantidad"] ; $i++) {
echo"El cliente #" . $i . " gasto " . $_POST["n".$i]." pesos <br>";
$q = $q + $_POST["n".$i];
}
echo"<br>";
echo"El total pagado en el dia es de " . $q;
?> | true |
d3d3f394ffc75856a7086aefe889593e61f3f9d9 | PHP | ilyatau/yii2_openroute_service | /src/BaseClass.php | UTF-8 | 1,095 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ilyatau
* Date: 16/11/18
* Time: 21:18
*/
namespace ilyatau\yii2_openroute_service;
use yii\httpclient\Client;
class BaseClass
{
private $api_key;
const VERSION = '4.7';
const URL = 'https://api.openrouteservice.org';
/**
* BaseClass constructor.
... | true |
82a84bd4e47fc069c28a4edb36f03e9825bede15 | PHP | kemalbehram/webserver | /nmskamaraj/public_html/upload.php | UTF-8 | 923 | 2.546875 | 3 | [] | no_license | <?php
$allowedExts = array("jpeg", "jpg", "png");
$temp = explode(".", $_FILES["file"]["name"]);
$extension = end($temp);
if ((($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/jpg")
|| ($_FILES["file"]["type"] == "image/png"))
&& ($_FILES["file"]["size"] < 2000000)
&& in_array(... | true |
6b64776a719363dc3467e3e4b77dead7a856b912 | PHP | axelitus/php-base | /src/Comparable.php | UTF-8 | 709 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP Package: axelitus/base - Primitive operations and helpers.
*
* @author Axel Pardemann (axelitusdev@gmail.com)
* @copyright 2015 - Axel Pardemann
* @link http://axelitus.mx/projects/axelitus/base
* @license MIT License ({@link LICENSE.md})
* @package axelitus\Base
* @version... | true |
3987a3fb28f7b7e47483fafeffafc805f2b40b61 | PHP | akidrizi/bp-activity-news-feed | /bp-activity-news-feed/inc/Models/NewsSources/LadyLike.php | UTF-8 | 499 | 2.609375 | 3 | [] | no_license | <?php
namespace BP_NewsFeed\Models\NewsSources;
use BP_NewsFeed\Models\Feed;
class LadyLike extends Feed {
// Atom Feed
const RSS_URI = 'https://www.ladylike.gr/?widget=rssfeed&view=feed&contentId=1309649';
// They are morons and tend to Feed the website with placeholder posts
// that are being pul... | true |
40f4ed1fe5c0b997312efdb5d39191aaa55c19e6 | PHP | ineersa/currency-converter | /src/Interfaces/ClientInterface.php | UTF-8 | 492 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ineersa\Converter\Interfaces;
/**
* Interface ServiceInterface
* @package Ineersa\Converter\Interfaces
*/
interface ClientInterface {
/**
* @param $path string
* @return mixed
*/
public function getCachedResponse($path);
/**
* @param $path
* @return mixed
*... | true |
9ee464491700e60ef50f05b42cf99e123dfaf2d5 | PHP | oxivanisher/openIDlogin | /login/openid.inc.php | UTF-8 | 9,679 | 2.546875 | 3 | [] | no_license | <?php
#initializing openid framework:
require_once "Auth/OpenID/Consumer.php";
require_once "Auth/OpenID/FileStore.php";
require_once "Auth/OpenID/SReg.php";
require_once "Auth/OpenID/PAPE.php";
#function definitions:
function &getStore() {
/**
* This is where the example will store its OpenID information.
... | true |
4d96571f598a1573604e13cf3b8eedf7e61418cb | PHP | ozorrilla/ZappReport | /Component/GraphicProperty.php | UTF-8 | 2,291 | 3.09375 | 3 | [] | no_license | <?php
/**
* GraphicProperty Class
*
* Clase para representar las propiedades comunes de los componentes graficos
* Ellipse, Line y Rectangle.
*
* @category ZappReport
* @package Component
* @version 1.0
* @author Osley Zorrilla Rivera <ozorrilla87@gmail.com>
* @copyright Zoapp, Todos los derechos r... | true |
968e161245b27ee9f5df9a0808937f74a13a27df | PHP | PH43/Sell-MenSportsShoes | /app/helpers/helper.php | UTF-8 | 156 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
if (!function_exists('format_money'))
{
function format_money($amount): string
{
return number_format($amount, 0, ',', '.');
}
}
| true |
cd05e5b07356154f2231284934288934bd06bc49 | PHP | rsaddington/mountain-george | /docroot/modules/custom/gd_product/src/Plugin/QueueWorker/GdProductQueue.php | UTF-8 | 1,580 | 2.515625 | 3 | [] | no_license | <?php
namespace Drupal\gd_product\Plugin\QueueWorker;
use Drupal\Core\Queue\QueueWorkerBase;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\gd_product\ProductSynchroniser;
/**
* Defines 'gd_product_product_synchronise_queue' queue wor... | true |
856f8f4273145478586f7eeb5d4cf8aaa5e8a56b | PHP | kgns/eBot-CSGO | /src/eTools/Task/Task.php | UTF-8 | 1,852 | 2.9375 | 3 | [
"CC-BY-3.0"
] | permissive | <?php
/**
* eBot - A bot for match management for CS:GO
* @license http://creativecommons.org/licenses/by/3.0/ Creative Commons 3.0
* @author Julien Pardons <julien.pardons@esport-tools.net>
* @version 3.0
* @date 21/10/2012
*/
namespace eTools\Task;
use \eTools\Utils\Logger;
c... | true |
7139a240bc1d055f943af26da1374e609009eeea | PHP | lobostome/FurryBear | /examples/capitol_words.php | UTF-8 | 646 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
require_once 'config/config_capitol_words.php';
$params1 = array('phrase' => 'free market');
$params2 = array('entity_type' => 'legislator','entity_value' => 'L000551');
try {
// Traverse entity
$fb->phrases->entity('legislator')->setParams($params1);
foreach ($fb->phrases as $page) {
if (!... | true |
71c6522dde8a203cb1fbec072d3eba02b5e32991 | PHP | l3m00r/gunwo | /code/server/remote/services/Now.php | UTF-8 | 441 | 2.65625 | 3 | [] | no_license | <?php
require_once '../logic/data/entities/Test.php';
require_once '../logic/data/ContextManager.php';
class Now {
public function getNow() {
return date('jS F Y @ g:i:s a');
}
/**
* @remotable
* @secured
*/
public function selectSample() {
$em = ContextManager::getD... | true |
39cc3e275a119c055a62799e2abc70da477a3e85 | PHP | CognitiveBuild/ThothPHP | /inc/controllers/abstract-controller.php | UTF-8 | 279 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | <?php
abstract class AbstractController {
protected $container;
protected $view;
public abstract static function get($method);
function __construct($container) {
$this->container = $container;
$this->view = $container->get('view');
}
} | true |
8a662ca07c88c05f509491c5526b35216f99f924 | PHP | samakunchan/samatech | /src/Entity/Category.php | UTF-8 | 6,006 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\CategoryRepository")
*/
class Category
{
/**
* ... | true |
fa873814494f39138a9e248bc56aec934b03bf48 | PHP | pressbooks/pressbooks-publisher-two | /template-parts/content-catalog.php | UTF-8 | 1,928 | 2.640625 | 3 | [] | no_license | <?php
/**
* @package Pressbooks Publisher
*/
?>
<?php $books = get_sites( array( 'public' => true ) );
$c = 0;
foreach ( $books as $book ) :
if ( get_blog_option( $book->blog_id, 'pressbooks_publisher_in_catalog' ) ) :
$c++;
switch_to_blog( $book->blog_id );
$metadata = pb_get_book_information();
restore_current... | true |
f9b04a384cbc91e969a60c718cbd3ae3847ecdb8 | PHP | culturemesh/culturemeshdevteam | /htdocs/tests/lib/stl/BinaryTreeTest.php | UTF-8 | 617 | 2.96875 | 3 | [] | no_license | <?php
class BinaryTreeTest extends PHPUnit_Framework_TestCase {
public function testConstruct() {
$tree = new stl\BinaryTree();
$this->assertInstanceOf('stl\BinaryTree', $tree);
}
public function testInsert() {
$tree = new stl\BinaryTree();
$test_value = 1;
$tree->insert( $test_value );
$this->ass... | true |
0d3717f9d4373eadf2da1c0c2b97c7565b2507d6 | PHP | catchup-forks/PackageEws365 | /src/StructType/EwsGetPeopleInsightsTokensType.php | UTF-8 | 1,976 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ews\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for GetPeopleInsightsTokensType StructType
* @package Ews
* @subpackage Structs
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class EwsGetPeopleInsightsTokensType extends EwsBaseRequestType
{
/**
* T... | true |
158411d4c46df82128fe6853978ceae713d4eeff | PHP | binnllii/housemap | /listing.php | UTF-8 | 1,546 | 2.765625 | 3 | [] | no_license | <?php
include_once 'header.php'
?>
<section class="searchbar">
<div class="container">
<h1>Search for your dream house</h1>
<form action="search.php" method="POST">
<input type="text" name="address" placeholder = "Enter an address, city, or ZIP code">
<in... | true |
6a37d0681aa74f5e487272918b1b04cf87098e80 | PHP | carono/php-commerceml | /src/Model/Property.php | UTF-8 | 1,359 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php namespace Zenwalker\CommerceML\Model;
/**
* Class Property
*
* @package Zenwalker\CommerceML\Model
* @property \SimpleXMLElement[] availableValues
* @property Simple valueModel
* @property mixed value
*/
class Property extends Simple
{
public $productId;
protected $_value;
/**
* @return ... | true |
b1cfd532cba731430ff9a65265f951357cfe99e2 | PHP | Ajayneethikannan/php-assign | /completeprofile.php | UTF-8 | 1,875 | 2.5625 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['u_id']))
{
header("Location: login_page.php");
}
else{
$id= $_SESSION['u_id'];
include 'dbh.inc.php';
$sql="SELECT * FROM users WHERE user_id ='$id';";
$result = mysqli_query($conn,$sql);
$row = mysqli_fetch_assoc($result);
}
?>
<!doctype html>
<html>
<he... | true |
96c557b73fc2c7b05f1eef7b6152637edb2d386f | PHP | bigschottkyd/registration | /validation2.php | UTF-8 | 5,082 | 2.953125 | 3 | [] | no_license | <?php
error_reporting(0);
require'private/db_connection.php';
/*second validation*/
/*initializing the array of errors as an empty array*/
$errorsCount = 0;
/* after the user pressed submit button, starts the second validation*/
if(isset($_POST['submitNewUser']))
{
/* variables*/
if(isset($_POST['gender']))... | true |
0536153d2ef414ec64bd40dc2b179ab0426e4542 | PHP | spikeygriffiths/Vesta | /database.php | UTF-8 | 7,981 | 2.796875 | 3 | [] | no_license | <?php
// database.php
if (PHP_SESSION_ACTIVE != session_status()) session_start();
//session_start();
function GetDbFileName()
{
return "vesta.db";
}
function DatabaseInit()
{
if ((file_exists(GetDbFileName())) || (readlink(GetDbFileName()))) {
try {
$db = new PDO("sqlite:".GetDbFileName()... | true |
4d7bf3d44117284ea4ed051bbaeed1bc25f02997 | PHP | Bejjoeqq/Basic-Web | /tes/coba1.php | UTF-8 | 300 | 2.8125 | 3 | [] | no_license | <?php
echo"
<form>
<input type=number min=1 max=100 name=a>
<input type=submit>
</form>";
$b=$_POST['a'];
function aa($b)
{
//$b=array("aa","bb","cc","dd","ee","ff","gg","hh","jj");
//for($a=0;$a<=8;$a++)
//{
//echo "$b[$a]</br>";
//}
if($b%2==0)
{
echo"Genap";
}
else
{
echo"Ganjil";
}
}
aa($b);
?> | true |
25b02cef04d19cd9807f5355e23abd16ab14fbb4 | PHP | Busfox/shopify-php-sdk | /lib/Service/InventoryLevelService.php | UTF-8 | 673 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Shopify\Service;
use Shopify\Object\InventoryLevel;
class InventoryLevelService extends AbstractService
{
/**
* Retrieves a list of inventory levels.
* You must include inventory_item_ids and/or location_ids as filter params.
*
* @link https://help.shopify.com/api/reference/... | true |
5b437d7c8c94b8b3de209d48731e65916411ec9c | PHP | assegaiphp/core | /src/Http/HttpStatusCode.php | UTF-8 | 298 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Assegai\Core\Http;
class HttpStatusCode
{
public function __construct(
public readonly int $code,
public readonly string $name,
public readonly string $description,
) { }
public function __toString(): string
{
return "$this->code - $this->name";
}
} | true |
3cf90361ab8ef6366249bc28698a26e43e3194dc | PHP | jackluo2012/php_slim | /module/domain/domainmodel.php | UTF-8 | 1,040 | 2.609375 | 3 | [] | no_license | <?php
/**
* author jackluo
* net.webjoy@gmail.com
*/
class DomainModel extends Module
{
/**
* init 初始化
*/
private $table = 'company';
private $table_mysql = 'company_mysql';
function __construct(){
parent::__construct();
}
/**
* get all domain list
*
*/
function all_domain(){
$domainlist =... | true |
ea625b070fd2504327d361f0366e5411efbbbfee | PHP | Zakupki/dj | /common/models/City.php | UTF-8 | 4,039 | 2.53125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "{{city}}".
*
* The followings are the available columns in table '{{city}}':
* @property integer $id
* @property integer $region_id
* @property string $title
* @property integer $sort
* @property integer $status
*
* @method City active
* @method City cache($dura... | true |
97e06ff2e5c1d77ef930bf51c007cba5339208dc | PHP | ziodave/react_w_p | /inc/gform.php | UTF-8 | 1,858 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
add_filter('gform_confirmation', 'gform_start_free_trial_form_confirmation', 10, 4);
/**
* Start Free Trial Form Type
* when the user types his emails and clicks on the button it should send that email to a platform
*/
function gform_start_free_trial_form_confirmation($confirmation, $form, $entry)
{
// G... | true |
5c5be6da85509bf49c6b164971a31eac50d0fb4a | PHP | dgstranz/PHP_2014-15 | /33/clases.php | UTF-8 | 1,073 | 3.34375 | 3 | [] | no_license | <?php
class Pelicula {
private $titulo;
private $genero;
private $anyo;
private $protagonista;
private $director;
public function __construct($titulo, $genero, $anyo, $protagonista, $director) {
$this->titulo = $titulo;
$this->genero = $genero;
$this->anyo = $anyo;
$this->protagonista = $protagonista;
... | true |
81c61e42b6ff0eee579ac7a08540d97fd5f5202c | PHP | HexagonSystems/TeamOfWinBlog | /controller/VerifyController.php | UTF-8 | 10,338 | 2.890625 | 3 | [] | no_license | <?php
class VerifyController{
private $template;
private $footer;
private $nav;
private $database;
private $mailView = 'mail';
private $newPassView = 'newPass';
private $mailData = array(
'header' => 'Hi!',
'content' => FALSE,
'link' => FALSE,
'footer' => 'TOW Blog'
);
private $instructions ... | true |
f45948758d59577cf9bac86c7247df0a45a1a2c3 | PHP | serge1946/liveresults2 | /app_tablet/scripts/SetResults.php | UTF-8 | 962 | 2.5625 | 3 | [] | no_license | <?php
/*
TODO : Restructure this script for the refactored database structure
*/
$data = $_POST['jsonstring'];
$data = json_decode($data, true); // Read as an associative array rather than an object
// UPDATE THE RESULTS DATABASE
$db = new SQLite3('../../core_data/results.sqlite');
foreach($data as $climber){
... | true |
9498a45ab7e7fed8eccf9ecc906ea6188fd45e8c | PHP | joshuahiwat/cases_dept | /view/api.php | UTF-8 | 1,149 | 2.875 | 3 | [] | no_license | <?php
use josegonzalez\Dotenv\Loader;
/**
* Class api
*/
class api
{
/**
* @var string
*/
private string $credentials;
/**
* api constructor.
*
* @param string $credentials
*/
public function __construct(string $credentials)
{
$this->credentials = $credenti... | true |
81e0f8fe448fe7a941c55956a9d96856a16ab77b | PHP | diegomirandac/Proyecto-Tiquetes-Aereos | /controlador/reservacionesController.php | UTF-8 | 4,771 | 2.625 | 3 | [] | no_license | <?php
require_once("../bo/reservacionesBo.php");
require_once("../domain/reservaciones.php");
/**
* This class contain all services methods of the table Reservaciones
* @author Diego Miranda
* Date Last modification: Fri Jul 24 11:28:43 CST 2020
* Comment: It was created
*
*/
//*******************************... | true |
ab659acbd93f2135e73f4fd0dbb32d54858ce623 | PHP | crimsoner18/PHP_and_JS | /app/Models/UserModel.php | UTF-8 | 424 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models;
use CodeIgniter\Model;
class UserModel extends Model
{
public function login($items)
{
$email = $items['email'];
$pass = $items['password'];
$query = $this->db->query("SELECT * FROM `users` WHERE `email`='$email' AND `password`='$pass'");
return $query->g... | true |