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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4d14f4c098371617d7b30d3a5fed0456c88fb82a | PHP | bnjunge/linode-api | /src/Api/LinodeApiResource.php | UTF-8 | 1,665 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Linode\Api\Api;
use GuzzleHttp\Exception\RequestException;
use Psr\Http\Message\ResponseInterface;
use Zurbaev\ApiClient\ApiResource;
use Zurbaev\ApiClient\Contracts\ApiProviderInterface;
use Zurbaev\ApiClient\Contracts\ApiResourceInterface;
use Zurbaev\ApiClient\Exceptions\Resources\UpdateResourceExc... | true |
830dfc9e292b1b4da34377907fc9046f8e452429 | PHP | ernanovia/spkprodi | /includes/alternatif.inc.php | UTF-8 | 2,009 | 2.84375 | 3 | [] | no_license | <?php
class Alternatif{
private $conn;
private $table_name = 'alternatif';
public $id_alternatif;
public $nama_prodi;
public $akreditasi;
public $fakultas;
public function __construct($db)
{
$this->conn = $db;
}
//memba... | true |
f499f6c1eec9f5c742def8141bbd6f9ea33c99b1 | PHP | franklinmelo/Social-event-Crud- | /createUser.php | UTF-8 | 2,158 | 2.78125 | 3 | [] | no_license | <?php
require 'db.php';
$message= '';
if(isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password_user'])){
$username = $_POST['username'];
$email = $_POST['email'];
$password_user = md5($_POST['password_user']);
$sql='INSERT INTO USUARIO(USUARIO, EMAIL,... | true |
4efe7dbd3706f586f49166938f886cf757cd1f01 | PHP | inunosinsi/soycms | /cms/common/site_include/plugin/sqlite_database_backup/config/SDBConfigPage.class.php | UTF-8 | 4,914 | 2.578125 | 3 | [] | no_license | <?php
class SDBConfigPage extends WebPage{
private $pluginObj;
private $sitePath;
private $dbFile;
private $backupDir;
const HASH_ALGO = "sha512";
const HASH_SALT = "a723f4bf4d023dacaff800376408b448";
function __construct(){
$this->sitePath = CMSPlugin::getSiteDirectory();
$this->dbFile = $this->sitePath ... | true |
a86b22d17013d392ec70dbc9622011c9df4dabe0 | PHP | bellrichies/Students_Result_management_System | /app_function/function.php | UTF-8 | 2,989 | 2.703125 | 3 | [] | no_license | <?php
//
function cgpa($student,$level){
$where = array('rank'=>$level);
if ($rows = $db->selectwhere('tbl_admin_class',$where)) {
$begin = $rows[0]['rank'];
$stop = $begin ;
}
switch ($course) {
case 'bachelor':
$class_start = 5;
$class_stop = ($class_start + $cn) -1;
break;
case 'diploma':
$cl... | true |
cd7bb455cf9a69ac9cafb28cf5f4536661ca987c | PHP | Fengly/PHP-Learning | /PHP/PHP_FlowLayout/FlowLayout.php | UTF-8 | 968 | 3.03125 | 3 | [] | no_license | <html>
<head>
<title>流程控制语句</title>
</head>
<body>
<?php
/**
* Created by PhpStorm.
* User: FLNuo
* Date: 2016/11/1
* Time: 16:12
*/
setlocale(LC_TIME, "chs"); // 设置本地环境
$week_day = strftime("%A"); // 声明变量, 并赋值
switch ($week_day) {
case "Monday":
echo "今天是$week_day";
... | true |
a9813138f98b1fe6ae58710e6b396c300a564c7b | PHP | Veerapuram/equitybulls | /model/NseModel.php | UTF-8 | 496 | 2.765625 | 3 | [] | no_license | <?php
class nseModel {
public $isin;
public $nse_symbol;
public $nse_dol;
public $nse_puv;
public $nse_face_value;
public $nse_status;
public function __construct($isin,$nse_symbol,$nse_dol,$nse_puv,$nse_face_value,$nse_status)
{
$this->isin = $isin;
$this->nse_symbol = $nse_s... | true |
03e98e7a96d6b1ad781d36966b8acad0dce27489 | PHP | rokmohar/gagchan | /app/Media/src/InputFilter/MediaFilter.php | UTF-8 | 8,940 | 2.59375 | 3 | [] | no_license | <?php
namespace Media\InputFilter;
use Zend\InputFilter\InputFilter;
use Category\Mapper\CategoryMapperInterface;
use Media\Mapper\MediaMapperInterface;
use User\Mapper\UserMapperInterface;
/**
* @author Rok Mohar <rok.mohar@gmail.com>
* @author Rok Založnik <tugamer@gmail.com>
*/
class MediaFilter extends Input... | true |
0585fbe32db6eb4414074acfa570d328005afba9 | PHP | ovidiumght/ooblog | /blog/Tests/Unit/Service/CommentServiceTest.php | UTF-8 | 3,212 | 2.609375 | 3 | [] | no_license | <?php
namespace Blog\Tests\Unit\Service;
use Blog\Post\Post;
use Blog\Repository\PostRepository;
use Blog\Repository\UserRepository;
use Blog\Service\CommentService;
use Blog\User\Guest;
use Blog\User\User;
class CommentServiceTest extends \PHPUnit_Framework_TestCase
{
const USER_ID = 10;
const POST_ID = 20;... | true |
5682bd6a03c6c8a719f5152ea81a06d982e1baee | PHP | ThemeHouse-XF/Objects | /library/ThemeHouse/Objects/DataWriter/Handler.php | UTF-8 | 3,471 | 2.53125 | 3 | [] | no_license | <?php
/**
* Data writer for handlers.
*/
class ThemeHouse_Objects_DataWriter_Handler extends XenForo_DataWriter
{
/**
* Title of the phrase that will be created when a call to set the
* existing data fails (when the data doesn't exist).
*
* @var string
*/
protected $_existingDataErro... | true |
2b283aff0592b0c5e37d343302131fca5e66ec40 | PHP | davidmbio/LicoreriaSanViernes | /src/Admin/Model/categoria/Cat_Modificar.php | UTF-8 | 560 | 2.53125 | 3 | [] | no_license | <?php
include "../conexion.php";
include "../basico.php";
/*verificamos si las variables se envian*/
if(empty($_POST['IdCategoria']) || empty($_POST['Categoria'])){
echo "Usted no a llenado todos los campos";
exit;
}
/*modificar el registro*/
$query = sprintf("UPDATE tblCategorias SET Categ... | true |
f489e2227d75d67e56b8d796906295ef1aca2149 | PHP | ikoncoders/ikonizercore | /src/Utility/FileUploadHandler.php | UTF-8 | 4,153 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace IkonizerCore\Utility;
class FileUploadHandler
{
private static array $errors = [];
private static array $success = [];
private static bool $ok = true;
private static ?string $targetFile = null;
/** */
protected const FILE_SIZE_LIMIT = 500000;
/**... | true |
263d2b22b69a94fe0a57362e34a57200e2825e2d | PHP | zimensky/Demo-Simple-Blog | /app/views/author/index.php | UTF-8 | 871 | 2.65625 | 3 | [] | no_license | <h1><?php echo $pageHeader; ?></h1>
<?php if(!empty($authors)): ?>
<?php foreach($authors as $author): ?>
<div class="author-item">
<h2>@<?php echo $author['username']; ?> <a href="/blog/author/<?php echo $author['username']; ?>">Read entries</a></h2>
<p>Write in total <?php echo $author['posts... | true |
d1c60b7d5fd315cd31eb657fd4834eb48512323a | PHP | pankaj-php/Hypleystaging | /staging/wp-content/plugins/wp-graphql/src/Type/Enum/ContentNodeIdTypeEnum.php | UTF-8 | 2,461 | 2.828125 | 3 | [
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"GPL-3.0-only",
"LicenseRef-scancode-free-unknown"
] | permissive | <?php
namespace WPGraphQL\Type\Enum;
class ContentNodeIdTypeEnum {
/**
* Register the Enum used for setting the field to identify content nodes by
*
* @return void
*/
public static function register_type() {
register_graphql_enum_type(
'ContentNodeIdTypeEnum',
[
'description' => __( 'The Type ... | true |
2ddf68a4995b40c9c73e145f75a061553599db75 | PHP | 38-TomomiHayashi/kadai | /7/sidebar.php | UTF-8 | 1,660 | 2.984375 | 3 | [] | no_license | <?php
// ====================
// 新着記事
// ====================
$sql = "SELECT post_id, post_title FROM post WHERE show_flg = 1 ORDER BY create_date DESC LIMIT 5";
$results = sqlContact($sql);
// リスト作成
$new_post = '';
$new_post = $new_post . '<ul>';
foreach($results as $row) {
$post_id = $row['post_id'];
$new_post =... | true |
b720baa5ba813c614b97b5c44baebaed96830b1b | PHP | neilfurry/SliderGallery | /src/Controller/RegisterController.php | UTF-8 | 2,779 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\User;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Compone... | true |
543c8c238ebdf05482f419fb301bece021fdfd23 | PHP | juhipark/s2019cst336 | /Assignments/eventPictureGallery/auth/login.php | UTF-8 | 1,134 | 2.6875 | 3 | [] | no_license | <?php
session_start();
$httpMethod = strtoupper($_SERVER['REQUEST_METHOD']);
switch($httpMethod) {
case "OPTIONS":
// Allows anyone to hit your API, not just this c9 domain
header("Access-Control-Allow-Headers: X-ACCESS_TOKEN, Access-Control-Allow-Origin, Authorization, Origin, X-Requested-With,... | true |
04cb0d0edbeb1b46529af7acd2771c76d8998b4b | PHP | cheerokee/botchampions | /module/Admin/src/Admin/Entity/CityRepository.php | UTF-8 | 584 | 2.5625 | 3 | [] | no_license | <?php
namespace Admin\Entity;
use Doctrine\ORM\EntityRepository;
class CityRepository extends EntityRepository
{
public function getCityByName($name){
$qb = $this->getEntityManager()->createQueryBuilder();
$qb->select(array(
'x'
))
->from('Admin\Entity\City', 'x')... | true |
f795e0d63c62ca27bf9a0cc9539c6d9bfee37b17 | PHP | kabalas2/mars-game | /app/code/Helper/Validation/InputValidation.php | UTF-8 | 1,316 | 3.109375 | 3 | [] | no_license | <?php
namespace Helper\Validation;
use Model\User;
use Session\Message;
class InputValidation
{
private $message;
public function __construct()
{
}
public const MIN_PASSWORD_LENGHT = 6;
public static function isEmailValid($email)
{
if (User::isEmailUnic($email) && self::isEmail... | true |
59af6c0b957ba2f9bc230f7cfaeeb9f7bf7c160d | PHP | coenond/freelance-hours-api | /app/Tax.php | UTF-8 | 587 | 2.578125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations;
class Tax extends Model
{
/**
* The table associated with the model.
*/
protected $table = 'taxes';
/**
* The attributes that should be visible in arrays.
*/
protected $visible = [
'id',
'name',
... | true |
ce80f872d5e63dbf8d9c161d1a692883646929bb | PHP | KaloyanAleksiev/PHP-Fundamentals-SoftUni | /Exercise5/TreasureLocator.php | UTF-8 | 933 | 3.484375 | 3 | [
"MIT"
] | permissive | <?php
$stringCoordinates = trim(fgets(STDIN));
$arrayCoordinates = explode(', ', $stringCoordinates);
function currentLocation(array $arrayCoordinates) {
$numberOfLocations = count($arrayCoordinates);
for ($i = 0; $i < $numberOfLocations; $i = $i + 2) {
$x = $arrayCoordinates[$i];
$y = $arrayC... | true |
9b67e0f24a61797f56fe2080ec805678c90b29c4 | PHP | izzuliman94/Skim- | /skim/skimclab/system/application/views/clab-serverbackup/payment/print_receipfull.php | UTF-8 | 17,168 | 2.78125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>SKIM - SPIM</title>
<style type="text/css">
th {
font-family: Ar... | true |
5af58347602eedf5add13b04becbc2576e7cd8da | PHP | cameldjoulako/phpleaning | /TransmissionDeDonneesPHP/traitementform.php | UTF-8 | 887 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang=fr>
<head>
<meta charset="utf-8">
<title>traitement du formulaires en php</title>
</head>
<body>
<?php
/* Auteur : Léonce Camel DJOULAKO
Date : 22 Mars 2017
Titre: traitement du formulaire en php avec url
*/
echo " <h1 style=\"color: skyblue; \">Traitemen... | true |
7193a45534eb33c24ea85cb00fc5d8ac5b5a142d | PHP | srinisim/UMich-CIS-ECE | /CIS 435/CIS435-Project3/Sports-Pro/project_starts/tech_support/product_register_6-4/product_registration.php | UTF-8 | 1,537 | 2.78125 | 3 | [] | no_license | <?php include '../view/header.php'; ?>
<?php if(isset($_POST['loginEmail'])): ?>
<?php
try {
require __DIR__ . "/../model/database.php";
require __DIR__ . "/../model/registrations_db.php";
$email = $_POST['loginEmail'];
$customer = get_customer_by_email($email);
$products = get... | true |
e7189c79774fd0486c749b8fbf242c77b57a2fde | PHP | mrhorse/crm_api | /lib/Api/esitWSevent.php | UTF-8 | 7,242 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Torchbox\Thankq\Api;
class esitWSevent extends baseDataType
{
/**
* @var string $eventId
*/
protected $eventId = null;
/**
* @var string $eventName
*/
protected $eventName = null;
/**
* @var string $webdescription
*/
protected $webdescription = ... | true |
c5b10bdabb31088a51e281c5b6caa80f957e55ed | PHP | mannye3/homehub | /core/search.php | UTF-8 | 1,139 | 2.578125 | 3 | [] | no_license | <?php
include('connect.php');
if(isset($_POST["query"]))
{
$strKeyword = $_POST["query"];
}
if(isset($_GET["query"]))
{
$strKeyword = $_GET["query"];
}
$sql = "SELECT * FROM property WHERE status='1' AND (`address` LIKE '%".$strKeyword."%' OR `state` LIKE '%".$strKeyword."%' O... | true |
c1c2193c3fb8b1a473870534eb18ee6b4162bbb4 | PHP | furuyatakayuki/GEEKJOB_Challenge | /010.組み込み関数/10_10_func_conclusion.php | UTF-8 | 1,492 | 3.5 | 4 | [] | no_license | <?php
// 多次元、連想配列の要素で並び替えを行うプログラム。
// 開始と終了の日時をlog.txtに保存する。
function hairetu_sort(&$target, $target_key){
$array = array();
foreach($target as $key => $value){
$array[$key] = $value[$target_key];
}
array_multisort($array, $target);
}
function hairetu_view($target){
foreach ($target as $k... | true |
dbb96d281308e82f0e4c2d56ce8918769944c024 | PHP | mlab817/ipmsv3 | /app/Policies/ProjectPolicy.php | UTF-8 | 5,067 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Policies;
use App\Models\SubmissionStatus;
use App\Models\Project;
use App\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Arr;
class ProjectPolicy
{
use HandlesAuthorization;
/**
* Create a new policy instance.
... | true |
982625e567198b775d694a70b4757dd3b7c9a76d | PHP | Jeong-Jimin/midterm_TEST-2017- | /DB_and_MVC.php | UTF-8 | 6,839 | 2.96875 | 3 | [] | no_license | <?php
class db_information
{
#DB 정보 저장
const HOST = "localhost";
const USER = "root";
const PASSWORD = "autoset";
const PORT = "3306";
const DB_NAME = "midtermexam";
const TABLE_NAME = "userinfo";
private $connect;
#객체 생성과 동시에 DB연결
function __construct()
{
... | true |
a391a40efa2255790bff775060d1e9c3f0744020 | PHP | kegren/fonto | /vendor/fonto/fonto/src/Fonto/View/Driver/Native.php | UTF-8 | 3,997 | 2.953125 | 3 | [] | no_license | <?php
/**
* Fonto - PHP framework
*
* @author Kenny Damgren <kenny.damgren@gmail.com>
* @package Fonto_View
* @subpackage Driver
* @link https://github.com/kegren/fonto
* @version 0.2
*/
namespace Fonto\View\Driver;
use Fonto\View\Driver\DriverInterface;
use Fonto\Facade\Fonto;
use Excep... | true |
e7c91a40c6bdb285a985f05a3295f88f73d51e97 | PHP | Lukas0025/r2cloud-reader-webpage | /src/php/templates.php | UTF-8 | 1,865 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/* By Lukáš Plevač
under apache 2.0
https://www.apache.org/licenses/LICENSE-2.0
*/
class template {
private $name;
private $dir;
function __construct($name, $dir = '.') {
$this->name = $name;
$this->dir = $dir;
}
public function create($data, $min = false){
//Načtení html souboru
$temp... | true |
4758d12f86fa7de07793fbe1779a998df1f5187a | PHP | gothaw/dynamic-website | /app/core/Input.php | UTF-8 | 1,429 | 3.546875 | 4 | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive | <?php
/**
* Class Input
* @desc Class with static methods to check if exist/get values from $_POST and $_GET super globals.
*/
class Input
{
/**
* @method exists
* @param $type {type of the HTTP method: 'post', 'get'}
* @desc ... | true |
9a41f6616331acfb9384a0880eeaec22afb451b9 | PHP | caropoeta/moviepass | /DAO/Session.php | UTF-8 | 2,069 | 2.90625 | 3 | [] | no_license | <?php
namespace DAO;
use Models\UserModel;
class Session
{
public static function ValidateSession()
{
if (!isset($_SESSION['current_user']) || !$_SESSION['current_user'] instanceof UserModel)
$_SESSION['current_user'] = null;
return ($_SESSION['current_user']) ? true : false;
... | true |
a519371ccb5986312601997052b653b4a1f8a079 | PHP | kartenmacherei/cqrs-framework | /src/Library/Collection/CollectionElementIdentifier.php | UTF-8 | 335 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Kartenmacherei\CQRSFramework\Library\Collection;
interface CollectionElementIdentifier
{
/**
* @return string
*/
public function __toString();
/**
* @param CollectionElementIdentifier $element
* @return bool
*/
public function equals(CollectionElementIdentifie... | true |
2d28f3361d240bc330a3bda349bfc59244f07a79 | PHP | sigma-z/Dive | /src/Dive/Console/Command/CommandLoader.php | UTF-8 | 3,435 | 2.96875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* This file is part of the Dive ORM framework.
* (c) Steffen Zeidler <sigma_z@sigma-scripts.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Dive\Console\Command;
use Dive\Console\ConsoleException;
/**
* C... | true |
8423239a3f0058826f07b91a250bb9d51fef6265 | PHP | gregzorb/home-work | /GenerateXml.php | UTF-8 | 2,829 | 3.0625 | 3 | [] | no_license | <?php
/**
* Description of generateXml
*
* @author gregzorb
*/
class GenerateXml {
private $xml = null;
private $version = '1.0';
private $encoding = 'UTF-8';
/**
* Initialize the root XML node
*/
public function init() {
$this->xml = new DomDocument($this->version, $this->e... | true |
c4fea68a64ac41c9815351e2a6dd2826e5de11c4 | PHP | conf/modgit-php | /tests/Modgit/Command/InitTest.php | UTF-8 | 1,743 | 2.640625 | 3 | [] | no_license | <?php
use Modgit\Command\Init;
class InitTest extends \PHPUnit_Framework_TestCase
{
public function testDirectoryModgitShouldExistAfterRunningInitCommand()
{
$command = new Init();
DirectoryHelper::removeRecursively($command->getDirectoryName());
$command->run();
$this->asser... | true |
8f752c16c90cc69adb0356d9d2ab898f09b392af | PHP | Pierre-Gilles/taxi | /models/entities/Disponibilite.php | UTF-8 | 1,849 | 2.921875 | 3 | [] | no_license | <?php
class Disponibilite {
protected $IDDisponibilite;
protected $dateDisponibilite;
protected $heuredebutDisponibilite;
protected $heurefinDisponibilite;
function __construct($IDDisponibilite, $dateDisponibilite, $heuredebutDisponibilite, $heurefinDisponibilite) {
$this->IDDisponibilite = $IDDisponibi... | true |
1c4b527c65074a369d997156da9b38f5220237ae | PHP | urmaul/httpclient | /test/CookieTest.php | UTF-8 | 1,414 | 2.578125 | 3 | [] | no_license | <?php
class CookieTest extends PHPUnit_Framework_TestCase
{
public function testSetRandomCookieFile()
{
$http = new HttpClient();
$http->setRandomCookieFile();
$this->assertNotEmpty($http->getCookieFile());
}
public function testUseRandomCookieFile()
{
$http = HttpClient::from(array('useRandomCookieFile... | true |
dc8c9ecf60b3ec6527036bccb9e77ff401ff32d9 | PHP | Mahmoud-Skafi/News-website | /admin/add_advertisement.php | UTF-8 | 3,496 | 2.546875 | 3 | [] | no_license | <?php
require_once('./config/dbcon.php');
include('./config/permissions.php');
session_start();
error_reporting(0);
$pagename = basename($_SERVER['PHP_SELF']);
$role = $_SESSION['roles'];
if (checkPermision($pagename, $role)) {
if (!isset($_SESSION['username'])) {
header('location:login.php');
} else {... | true |
4a4a949fa8fe9ac48d4a725bd09d99b5cae18f7a | PHP | danielthorr/VEF2A3U | /resources/PHP/signuptest.php | UTF-8 | 1,006 | 2.515625 | 3 | [] | no_license | <?php
SESSION_START();
require_once "connection.php";
require_once "Users.php";
$continue = true;
foreach ($_POST as $key => $value)
{
strip_tags($value);
htmlentities($value, ENT_QUOTES);
trim($value);
}
$firstName = $_POST['firstName'];
$lastName = $_POST['lastName'];
$email = $_POST['email']... | true |
4294d684155ecf71071b75b83d3ac35a42c009d5 | PHP | adedayomatt/protonhacker | /admin/admin.php | UTF-8 | 3,446 | 2.640625 | 3 | [] | no_license | <?php
require('../resources/mato/lib/php/global.php');
$passwordChangingReport = "";
class admin{
public $db = null;
private $password = "";
private $token = "";
function __construct(){
$this->db = new database();
$getAdmin = $this->db->query_object("SELECT * FROM admin");
$admin = $getAdmin->fetch(PDO:... | true |
739796d71a4bb4696e0b84c52a6a54fde7bd98e2 | PHP | mariano55555/aplicacionenlinea | /app/Controller/BecasController.php | UTF-8 | 2,455 | 2.6875 | 3 | [] | no_license | <?php
App::uses('AppController', 'Controller');
/**
* Becas Controller
*
* @property Beca $Beca
*/
class BecasController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$becas = $this->Beca->find("all");
$this->set(compact('becas'));
}
/**
* view method
*
* @t... | true |
7b3c737967da68b2af22544d04a9e1e4a71cf8d3 | PHP | dapineda10/php-app-segescot | /core/EntidadBase.php | UTF-8 | 5,090 | 3.015625 | 3 | [] | no_license | <?php
class EntidadBase
{
private $db;
private $conectar;
public function __construct($table, $adapter)
{
$this->table = (string)$table;
$this->conectar = null;
$this->db = $adapter;
}
public function getConetar()
{
return $this->conectar;
}
publ... | true |
2bfcb649aacd9d3e3291991a9ab4ffba58dfe040 | PHP | hettiger/seo-aggregator | /src/Hettiger/SeoAggregator/Sitemap.php | UTF-8 | 3,526 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php namespace Hettiger\SeoAggregator;
use Hettiger\SeoAggregator\Interfaces\SitemapInterface;
use Hettiger\SeoAggregator\Support\CustomObject;
class Sitemap extends Generator implements SitemapInterface {
protected $links;
protected $collections;
protected $lines;
/**
* Add a link to the site... | true |
7369c814291e498a3a120f8a77ed9e88ec6d1f1b | PHP | Ducatel/PHPCalibre | /src/class/Book.php | UTF-8 | 8,875 | 2.90625 | 3 | [] | no_license | <?php
require_once("CalibreDatabaseObject.php");
require_once("utilsFunctions.php");
require_once("SPDO.php");
require_once('Series.php');
require_once('BookFile.php');
/**
* Represent a Calibre Book
* @author D.Ducatel
*/
class Book extends CalibreDatabaseObject{
/**
* The Book's title
*/
private $name;
... | true |
f6fd8f5b4bb67a8b89c9f607098285659940d5f9 | PHP | PHPLei/Remember | /Asort.php | UTF-8 | 579 | 3.703125 | 4 | [] | no_license | <?php
class Asort
{
/**
* 对数组进行排序并保持索引关系
* asort ( array &$array , int $sort_flags = SORT_REGULAR ) : bool
* @param $array array 目标数组
*/
public function AsortLearn($array)
{
asort($array);
foreach ($array as $key => $val) {
echo "$key = $val \n... | true |
884826067f9ce1119ea6a30fc444f4e0b936e2f2 | PHP | MJFadeaway28/catering | /index.php | UTF-8 | 2,638 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<br>
<center>
<div>
<form action="create_customer.html">
<button type="submit">Add New Customer</button>
</form>
<table>
<tr>
<th>Customer ID</th>
<th>Firstname</th>
<th>Mi</th>
<th>Lastname</th>
<th>Cust... | true |
a29f7ff6759a62079df50ef61a3ddc2acbaefebe | PHP | yusronarif/laravel-core | /src/Database/Eloquent/Scopes/GeneralScope.php | UTF-8 | 700 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Yusronarif\Core\Database\Eloquent\Scopes;
use Yusronarif\Core\Database\Eloquent\Builder;
trait GeneralScope
{
/**
* @param Builder $query
* @param string $field
* @param $value
* @return mixed
*/
public function scopeByMd5(Builder $query, string $field, $value)
... | true |
a880ad731c932b78f263916719ba47c84c41a839 | PHP | vsambor/owasp-gr4 | /register.php | UTF-8 | 1,665 | 2.640625 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/security/owasp-gr4/config.php';
require_once $PATH . '/include/start.inc.php';
$pageTitle = 'Register';
require_once $PATH . '/include/header.inc.php';
// Erros holder.
$errors = '';
// When the form is submitted then this code is executed.
if(get_POST(... | true |
0a95b076c57f72c4e98f518f464e012b37bfe802 | PHP | Esysc/phpsocket | /server/libs/fgets_u.php | UTF-8 | 598 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Read from STDIN without blocking or waiting for input
* @param filehandle pointer to php://stdin'
* @return string the input from the stream if ready, otherwise empty string
*/
function fgets_u($fh) {
// the stream_select function will indicate if there is anything to read
$read = array($fh);
$... | true |
7f4de7a66f701f4e966490b9d5a271c5d6a344d4 | PHP | sidcoool/Buddy-WebProject | /friend_score.php | UTF-8 | 7,684 | 2.75 | 3 | [] | no_license | <?php
session_start();
$name = $_SESSION['name'];
$uid = $_SESSION['uid4'];
echo "<style> body {
background: linear-gradient(45deg,lightblue 50%, #fff 50%);
background-size: cover;
height: 100%;
overflow: auto;
} </style>";
echo"<h1> <style> h1 {
color: black;
text-decoration-color: none;
font-fam... | true |
d7fffb41e63faf853c58e3c78037978b762d1aa3 | PHP | don-reba/mor-tabletop | /index.php | UTF-8 | 1,485 | 2.75 | 3 | [] | no_license | <?php
function method_get()
{
$language = 'en'; // Default language
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) )
{
$str_langs = strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']);
if ($str_langs)
{
// Available languages (ISO 639-1 Code)
$available_langs = array('en' => 0, 'ru' => 0);
// Related langua... | true |
71ac6393e3d006914708fac2b2ecba00e404e528 | PHP | linyiyuan/laravel-vue-element-UI | /app/Http/Controllers/Api/Auth/LoginController.php | UTF-8 | 2,816 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api\Auth;
use App\Http\Controllers\Api\CommonController;
use App\Models\Users;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use JWTAuth;
class LoginController extends Comm... | true |
da0a623d2eb54b833f6c36ffe0c2046cd0b4b6f7 | PHP | google-code/astronomical-web-server | /skydetective/modules/_static/building_components/Input.php | UTF-8 | 1,423 | 3.234375 | 3 | [] | no_license | <?php
require_once 'ContentLeaf.php';
class Input extends ContentLeaf {
const BUTTON = 0;
const CHECKBOX = 1;
const HIDDEN = 2;
const PASSWORD = 3;
const RESET = 4;
const SUBMIT = 5;
const TEXT = 6;
private $type;
private $name;
public function __construct($id, $name = null, $type = Input::TEXT) {
pare... | true |
4be265c026806986b75c97966f6831045c6a2377 | PHP | timzdevz/tc24 | /includes/Twilio_API.class.php | UTF-8 | 1,412 | 2.515625 | 3 | [] | no_license | <?php
class Twilio_API
{
const TWILIO_VERIFICATION_START = 'https://api.authy.com/protected/json/phones/verification/start';
const TWILIO_VERIFICATION_CHECK = 'https://api.authy.com/protected/json/phones/verification/check';
const TWILIO_TEST_API_KEY = 'bYUtJ86gjz9aZcDDXOquAHHf9us7zCZn';
static $supported_count... | true |
b72439d4d61eee617947127908b9a43c62acbf4b | PHP | EuIgorLopes/dynamic-sitemap-with-PHP | /sitemap.class.php | UTF-8 | 3,735 | 2.734375 | 3 | [] | no_license | <?php
class SiteMap{
public function index(){
//Define a verção do encode.
//Define the encode version.
$xml = new DOMDocument( "1.0", "UTF-8" );
//Retirar espaços em branco.
//Remove white spaces.
$xml->preserveWhiteSpace = false;
//Ativa a formatação do documento (indentação).
//Active th... | true |
468b09887a5a19d3ec6dce04f74845f2610ef633 | PHP | LouisGJBertrand/RucheConnectee | /sys/login.php | UTF-8 | 1,471 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
function redirect($url)
{
header('Location: '.$url);
}
session_start();
$apiUrl = "http://rucheconnapi.free.fr/API";
if (!$_SESSION["CONN_Uuid"] && !$_SESSION["CONN_Upassword"]) {
$nullarray = array();
if ($_POST != $nullarray) {
$get["uuid"] = md5(... | true |
9840c7f9e48a3477a3ea3fa6f020c598946a6a44 | PHP | mutasim18/WT_FINAL_SUM21 | /lab1/login.php | UTF-8 | 1,730 | 2.96875 | 3 | [] | no_license | <?php
//session_start()
$uname="";
$err_uname="";
$pass="";
$err_pass="";
$hasError=false;
$hasError=false;
$users = array("mutasim18"=>"1234","tawsef19"=>"123");
if($_SERVER["REQUEST_METHOD"] == "POST")
{
//User name//
if(empty($_POST["uname"]))
{
$hasError=true;
... | true |
c8a51df8b7bd086e594457524d9cf715ee7d8072 | PHP | MarquiseRosier/LoanerSite | /loaned.php | UTF-8 | 899 | 2.65625 | 3 | [] | no_license | <?php
require $_SERVER['DOCUMENT_ROOT'] . '/form/processing/Connect.php';
$db = new Connect();
$dbc = $db->getPDO();
$stmt = $dbc->prepare('SELECT loaner_number FROM OutBook');
$stmt2 = $dbc->prepare('SELECT loaner_number FROM OutBook');
$stmt->execute();
$stmt2->execute();
$result = $stmt->fetchA... | true |
379c4c6a8b5036d8ebd64cd652371ee1cb387978 | PHP | musicsnap/advance.php | /025 变量.php | UTF-8 | 810 | 3.3125 | 3 | [] | no_license | <?php
/**
* User: GetcharZp
* Date: 2021/5/22 21:51
*/
// 1、变量定义方式 $
$name = "xxx";
// 2、传值赋值
$name = "xxx";
$name_ = $name;
echo $name . PHP_EOL;
echo $name_ . PHP_EOL;
$name_ = "xxxx";
echo $name . PHP_EOL;
echo $name_ . PHP_EOL;
// 3、引用赋值
$name2 = &$name;
echo $name . PHP_EOL;
echo $name2 . PHP_EOL;
$name =... | true |
8dce528449fe9706496e2e02f2b070e777126fc0 | PHP | AHDevelop/homework-api | /src/App/Controllers/RoomHomeworkController.php | UTF-8 | 1,263 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Controllers;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class RoomHomeworkController extends BaseController
{
protected $roomHomeworkService;
public function __construct($service)
{
... | true |
b7541a315c26637eb4e1818edccc84ce7ff2f538 | PHP | Rah1x/PHP-Library | /Parent-Child array into TREE.php | UTF-8 | 3,802 | 2.546875 | 3 | [] | no_license | <?php
function build_tree($rows, $id_column, $parent_column)
{
$tree = array();
$tree_index = array();
while(count($rows) > 0){
foreach($rows as $row_id => $row){
if($row[$parent_column]){
if((!array_key_exists($row[$parent_column], $rows)) and (!array_key_exists($row[$parent_column], ... | true |
c5a4bcd1a652c966d26af28eddb069f0ccd0f8c2 | PHP | garbageman/WhineAndCheese | /xampp/services/PairingService.php | UTF-8 | 1,968 | 2.6875 | 3 | [] | no_license | <?php
header('Content-Type: application/json');
require('connection.php');
$db = establishConnection();
// wine and cheese parameters will always be set
$wine = $_GET["wine"];
$cheese = $_GET["cheese"];
// table names
$wine_table = "wine";
$cheese_table = "cheese";
$pairing_table = "pairing";
$review_ta... | true |
2abf4d5efad06e29ad0538d572de8ce30931ff21 | PHP | rdtsc/codeeval-solutions | /src/moderate/longest-lines/solutions/php/solution.php | UTF-8 | 246 | 2.796875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env php
<?php
$lines = file($argv[1], FILE_IGNORE_NEW_LINES);
$count = array_shift($lines);
usort($lines, function($lhs, $rhs)
{
return strlen($rhs) - strlen($lhs);
});
echo join(PHP_EOL, array_slice($lines, 0, $count)), PHP_EOL;
| true |
a4cdfe3e85cd20a00a5e628e038eed20fcc650a5 | PHP | sgr13/shop | /src/user/userMessages.php | UTF-8 | 3,412 | 2.53125 | 3 | [] | no_license | <?php
require_once '../../connection.php';
require_once '../../layout/Layout.php';
require_once 'autoload.php';
session_start();
//jeżeli ktoś wpisze z palca w przeglądarce userMessages.php to jeśli nie jest zalogowany zostanie wyrzucony na stronę główną.
if (!isset($_SESSION['id'])) {
header('Location: web/inde... | true |
a4fb759965d76b0286fe6358d5cf450f826a8421 | PHP | mingtsay/cart-php-session | /add.php | UTF-8 | 686 | 2.796875 | 3 | [] | no_license | <?php
include('include.inc.php');
// 讀取網址列上的 add.php?id=123 數字
$id = isset($_GET['id']) ? $_GET['id'] : 0;
$product_query = $db->prepare('SELECT `id`, `name`, `price`, `stock` FROM `products` WHERE `id` = :id');
$product_query->bindValue(':id', $id);
$product_query->execute();
$product = $product_query->fetch();
/... | true |
ab64e3493903f8db6f56255febafd74aa9bb820b | PHP | netlogix/Neos.EventSourcing | /Classes/Event/Decorator/EventWithIdentifier.php | UTF-8 | 1,470 | 2.6875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Neos\EventSourcing\Event\Decorator;
/*
* This file is part of the Neos.EventSourcing package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file wh... | true |
e3e7344ac117d2fa1cbd78b3deceea19120181cd | PHP | filipesilva1208/sistema | /application/helpers/data_helper.php | UTF-8 | 336 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive |
<?php
defined('BASEPATH') or exit('No direct script access allowed');
function dataHelper($data)
{
if($data !== null){
$nova_data = date('d/m/Y - H:i:s', strtotime($data));
}else{
$nova_data = '---';
}
return $nova_data;
}
function TimeHelper($data)
{
return date('H:i:s', strto... | true |
13aa670efa09b2ceacf8f9aef3dcb69b26fc2e2f | PHP | benji07/adventofcode | /2021/src/Day13/Fold.php | UTF-8 | 563 | 3.28125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace AOC2021\Day13;
use AOC2021\Day05\Point;
class Fold
{
public function __construct(
public string $direction,
public int $position
) {
}
public function apply(Point $point): Point
{
$newPoint = clone $point;
if ($newPoint->... | true |
1180d7a9d6b56d8ff06fd5e1b73d570d136f2e8b | PHP | mfrancisc/Pragmatic-Programmer | /ex12/addAfterFirstComment.php | UTF-8 | 1,702 | 3.203125 | 3 | [] | no_license | <?php
/**
* example call:
*
* php addAfterFirstComment.php '/folder/to/php/files' 'require "pippo.php"'
*
* @param filesPath if black it will assume the current folder
* @param statment the statment to add after the first comment block
*
* will add the "require pippo.php" after the first comment block
* in... | true |
b15a7320b1efb506787ac7d78e8dbe07b34f0aaa | PHP | prooph/processing | /library/Processor/Task/Task.php | UTF-8 | 872 | 2.578125 | 3 | [] | no_license | <?php
/*
* This file is part of the prooph processing framework.
* (c) 2014-2015 prooph software GmbH <contact@prooph.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Date: 30.09.14 - 22:32
*/
namespace Prooph\Processing\Pro... | true |
1b1e6cae9094680944e7dbf6aa0f6b5c33634dfb | PHP | AKSW/map.ontowiki | /classes/Cluster.php | UTF-8 | 4,432 | 3.140625 | 3 | [] | no_license | <?php
/**
* Cluster-Class of the OW MapPlugin
*
* @category OntoWiki
* @package Extensions_Map_Classes
* @author Natanael Arndt <arndtn@gmail.com>
* @author OW MapPlugin-Team <mashup@comiles.eu>
*/
class Cluster extends Marker
{
/**
* set isCluster on true, to identify this object as cluster in the js... | true |
e3f2652f97cda7c0b9ff11bb7b5e40c6bf382aa5 | PHP | lucaslim/Ass1st | /application/helpers/scoring_helper.php | UTF-8 | 3,514 | 2.953125 | 3 | [] | no_license | <?php
/**
* Assist
*
* This is the scoring helper class
*
* @package Assist
* @author Team Assist
*/
// --------------------------------------------------------------------
/**
* Get array of minutes (20)
*
*
*/
function get_20_minutes() {
$array = array();
for ($i = 0; $i <= 20; $i++) {
if($i < 10... | true |
8c2d7df99c36719103716fc91367077ebcf7a099 | PHP | vladimirbasaric/it-obuka | /PHP/58/1upload/upload.php | UTF-8 | 1,103 | 2.84375 | 3 | [] | no_license | <?php
$uploadOk = 1;
if(isset($_FILES['fileToUpload'])){
$target_file = "uploads/".basename($_FILES['fileToUpload']['name']);
$file_name = $_FILES['fileToUpload']['name'];
$file_size = $_FILES['fileToUpload']['size'];
$file_tmp = $_FILES['fileToUpload']['tmp_name'];
$file_type = $_FILES['fileToUpload']['type'];
... | true |
f08b1585069c7070afaed176f08f1104d090265a | PHP | kasundissa/bit_project | /c_pos.php | UTF-8 | 9,540 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: Kasun
* Date: 15-Aug-19
* Time: 11:58 AM
*/
include_once("config.php");
class pos{
public $pos_id;
public $tot_amount;
public $tot_discount;
public $sub_tot;
public $net_tot;
public $sold_product_id;
public $i_name;
public $price;
public $qty;
pu... | true |
2e20a7ab229d8197b21ed52f123cc99c963a3c13 | PHP | Jardineros/Proyecto-final | /Conexion_Nuevo_Producto_php.php | UTF-8 | 1,801 | 2.640625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
//Variables Para la conexion
$servidor = "localhost";//Ips, direcciones, nombres de
$basedatos = "casa_jardin";
$usuario = "nan";
$contrasena = "123456789";
//Variable para recuperar los datos
$producto = $_POST["Producto"];
$descripcion = $_POST["Descripcion"];
$costo = $_P... | true |
436d3be772af6daf2826003115939313d3ef8437 | PHP | andredcoliveira/SIBD_helpout | /something/database/users.php | UTF-8 | 6,982 | 2.640625 | 3 | [] | no_license | <?php
function createUser($realname, $username, $password) {
global $conn;
$options = [
'cost' => 12,
];
$hash = password_hash ($password , PASSWORD_DEFAULT, $options);
$stmt = $conn->prepare('INSERT INTO users (id, name, username, pw)
VALUES (DEFAULT, ?, ?, ?... | true |
2a763a3228b6ac7b3437f5d533d3dd8b1c6ba9ef | PHP | hetutrechtsarchief/HetVolk.org-CSV-JSON-to-Excel | /index.php | UTF-8 | 582 | 2.703125 | 3 | [] | no_license | <?php
$rows = [];
if (($file = fopen($argv[1], "r")) !== FALSE) {
if (fgets($file, 4) !== "\xef\xbb\xbf") rewind($file); //Skip BOM if present
while (($data = fgetcsv($file, 0, ";", "\"" , "\\")) !== FALSE) {
if ($data[0]=="itemID") continue; # skip first row
$row = [];
$row["id"] = $data[0];
$row... | true |
5d24a9d9ab88414c3b34efed8248f42448d8ce44 | PHP | 1986webdeveloper/project-1 | /app/Http/Requests/Admin/AddChurchAdminRequest.php | UTF-8 | 1,611 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Admin;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Contracts\Validation\Validator;
class AddChurchAdminRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authori... | true |
4086f9a493562b8ef62a7f0d1e3fdb11c70da307 | PHP | kevmul/invoicetracker | /tests/Feature/ProjectTest.php | UTF-8 | 4,590 | 2.578125 | 3 | [] | no_license | <?php
namespace Tests\Feature;
use App\Client;
use App\Project;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ClientTest extends TestCase
{
use RefreshDatabase;
protected function setUp() : void
{
parent::setUp();
$this->client = factory(Client::class)->cre... | true |
dbcd0fb83afabfa191a2f89b99c455edd818af77 | PHP | Fudex-sa/ad-back | /app/Tasks/Actions/DeleteTaskAction.php | UTF-8 | 486 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Tasks\Actions;
use App\Tasks\Domain\Models\Task;
use App\Tasks\Domain\Services\DeleteTaskService;
use App\Tasks\Responders\DeleteTaskResponder;
class DeleteTaskAction {
public function __construct(DeleteTaskResponder $responder, DeleteTaskService $services) {
$this->responder = $responder;
$... | true |
0b6ce7285336133230c6c7771a2a41fd3083214e | PHP | jameshalsall/tickit | /src/Tickit/PermissionBundle/Entity/Permission.php | UTF-8 | 1,579 | 2.578125 | 3 | [] | no_license | <?php
namespace Tickit\PermissionBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Represents a permission in the system. For this entity to make any real functional sense it needs to be used
* in conjunction with UserPermissionValue or GroupPermissionValue to map a permission and value to a user/group
*
* @... | true |
2eb493641d23088bb315386042ca8368c6f4528b | PHP | FestaMazreku/CoffeeAndDessert | /includes/functions/editReservation.php | UTF-8 | 2,213 | 2.578125 | 3 | [] | no_license | <?php
$con=mysqli_connect("localhost","root","","coffeeanddessert");
mysqli_select_db($con,"coffeeanddessert");
if(isset($_GET['edit'])){
$edit_id = $_GET['edit'];
$edit_query = "SELECT * FROM rezervimi WHERE re_id='$edit_id'";
$run_edit = mysqli_query($con, $edit_query);
?>
<html>
<body>
... | true |
df8ef12ecfa24df467aa020ea031e540c7873131 | PHP | grainnek/pharmacy-app | /src/Controller/RegisterController.php | UTF-8 | 2,364 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use App\Entity\PatientDetails;
class RegisterController extends AbstractContro... | true |
c70dfed89c5ebadd5ed364e81bc0df8ca3e4c3f7 | PHP | teknasyon-bootcamp/homework1_2-haydar | /app.php | UTF-8 | 1,758 | 3.4375 | 3 | [] | no_license | <?php
$gender = "male"; // cinsiyet (male/female)
$weight = 55; // kilo (kg)
$height = 170; // boy (cm)
$age = 25; // yaş (sene)
$guess = "1470"; // Tahmin edilen değer
/**
* Bu ödevde bazal metabolizma hesaplaması yapacağız.
* Yukarıdaki değişkenleri ve aşağıdaki formülü kullanarak
* kişinin günlük BMR ihtiyacın... | true |
44ce5ae9a0feeac92e299e1b7755e5a3187c5b89 | PHP | ravindrsharma99/developers | /app/Services/Auth/Dmobi.php | UTF-8 | 2,203 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Auth;
use App\AppUser as User;
use App\AppUserToken as UserToken;
class Dmobi
{
protected $user;
protected $userToken;
public function __construct($params)
{
}
public function check()
{
if (!empty($this->user)) {
return true;
}
... | true |
24e0e14af97cd11b3265f7df5861a8ccc6e9f7d0 | PHP | jcs99/PositiveCOVIDNews | /DataSources/Clients/Interfaces/NewsDataSourceClient.php | UTF-8 | 887 | 3.015625 | 3 | [] | no_license | <?php
namespace DataSources\Clients\Interfaces;
/**
* Interface NewsDataSourceClient The client that is responsible for making requests to the news datasource client.
* @package DataSources\Interfaces
*/
interface NewsDataSourceClient
{
/**
* Makes a request to the datasource.
* @param string $dataSo... | true |
c48c4fa40d63e164be52a3f31075873e30b1699e | PHP | thiagotalma/yii2-google-maps-library | /controls/ScaleControlOptions.php | UTF-8 | 1,563 | 2.65625 | 3 | [] | permissive | <?php
/*
*
* @copyright Copyright (c) 2013-2019 2amigos
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*
*/
namespace dosamigos\google\maps\controls;
use dosamigos\google\maps\ObjectAbstract;
use dosamigos\google\maps\OptionsTrait;
use yii\base\InvalidC... | true |
b99e3935138373e3db73302de35cde101f8b8724 | PHP | tommos23/tommos | /Assignment2/validation.php | UTF-8 | 1,359 | 2.953125 | 3 | [] | no_license | <?php
/*
Written by Aaron Thompson and Robert Chisholm
These validations are carried out after the user has submitted their input, they are included incase the user has javascript disabled. All but one use regular expressions to check validity.
*/
function validateEmail($input){
//REGEX string courtsey of http://ww... | true |
e1af1e507a9293146314a34df9ba2dbab3879756 | PHP | tomas2387/mantis-zendesk | /tests/controller/bugsControllerTest.php | UTF-8 | 5,852 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
require_once dirname(__FILE__) . '/../../src/controller/bugsController.php';
require_once __DIR__ . '/FakeConector.php';
class bugsControllerTest extends PHPUnit_Framework_TestCase
{
private function prepareBug($id, $summary, $description, $reporterName, $status)
{
$bug = new Bug();
$bu... | true |
352d0bb581dbf46b24cb2fc9392f0becbe743a27 | PHP | medbrat13/students-list | /kernel/base/DataMapper.php | UTF-8 | 1,978 | 3.109375 | 3 | [] | no_license | <?php
namespace StudentsList\Kernel\Base;
use StudentsList\Kernel\DB\Connection;
use StudentsList\Kernel\Helpers\QueryBuilder;
abstract class DataMapper
{
protected $connection;
protected $builder;
protected $countAllStmt;
protected $selectStmt;
protected $updateStmt;
protected $insertStmt;
... | true |
83b6cd5afbf1e7fafb504ad596516f57f76a8836 | PHP | ruplexus/beejee | /application/models/model_main.php | UTF-8 | 2,430 | 2.984375 | 3 | [] | no_license | <?php
class Model_Main extends Model {
// добавляем задачу в базу данных
public function add_task($name, $email, $text, $status){
// защита от SQL иньекций
$name = $this->db->real_escape_string($name);
$email = $this->db->real_escape_string($email);
$text = $this->db->real_escape_string($text);
... | true |
15359dbbd7f91fe1d6d08bc8295808cecec94ae0 | PHP | alexbayle/ValidatorLibrary | /tests/StringValidatorTest.php | UTF-8 | 1,485 | 2.828125 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: Alexandre
* Date: 24/11/14
* Time: 23:11
* To change this template use File | Settings | File Templates.
*/
namespace Tests\ValidatorLibrary;
use AB\ValidatorLibrary\StringValidator;
class StringValidatorTest extends \PHPUnit_Framework_TestCase
{
public f... | true |
4a428258a545cacff9b0c83c0e233f2e6cc9a2dc | PHP | dtomasiewicz/Frawst | /libs/Frawst/Core/Request.php | UTF-8 | 6,461 | 2.984375 | 3 | [] | no_license | <?php
namespace Frawst\Core;
/**
* Frawst Request Handler
*
* A Request object simulates an HTTP request to a particular route in your
* application.
*/
class Request {
const METHOD_GET = 'GET';
const METHOD_POST = 'POST';
const METHOD_DELETE = 'DELETE';
const METHOD_PUT = 'PUT';
private... | true |
a138fa3e8265457b84f98ee6b5fa00e00d675048 | PHP | vinhgiang/livewire | /app/Models/Comment.php | UTF-8 | 641 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;
class Comment extends Model
{
use HasFactory;
// Use this empty array instead of putting each field in $fillable array to allow modifying every c... | true |
c5fb2eb2a2de78c799b9851f3c582a0eb1ac15e9 | PHP | LavizaFalakNaz/quizzer | /add.php | UTF-8 | 3,673 | 3.203125 | 3 | [] | no_license | <?php include 'database.php';?>
<?php
if(isset($_POST['submit']))
{
//get post variables
$question_number = $_POST['question_number'];
$question_text = $_POST['question_text'];
$correct_choice = $_POST['correct_choice'];
//create an array for choices
$c... | true |
cf2f6c7f6e283cdf0a674ee48f90111aaa0b5e4e | PHP | vmoulin78/concorde | /system/helpers/reflection_helper.php | UTF-8 | 2,981 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Concorde
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2019 - 2020, Vincent MOULIN
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentat... | true |
940a4c77dc26430d087affa86dc9860ae4d1bc24 | PHP | golub95/ucionice | /test/index1.php | UTF-8 | 1,803 | 2.5625 | 3 | [] | no_license | <?
$dimenzija=8;
//pojašnjenje BOJA => BROJ REDAKA, BROJ STUPACA, ŠIRINA SKUPINE
$skupine=array(
'orange'=>array(7,10,50),
'red'=>array(4,10,50),
//'green'=>array(5,22,100),
//'grey'=>array(6,10,50),
);
$BrojStudenataNaRoku=76;
$BrojGrupa=1;
//-------------------DIV SOBA
echo "<div style='float:left;width:50%;border... | true |
9161d7ca7e2b228d6bd543155244edd159d1273c | PHP | baopham/laravel-dynamodb | /src/EmptyAttributeFilter.php | UTF-8 | 864 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace BaoPham\DynamoDb;
class EmptyAttributeFilter
{
public function __construct()
{
//
}
/**
* Set empty values to NULL since DynamoDB does not like empty values.
*/
public function filter(&$store)
{
foreach ($store as $key => &$value) {
$value... | true |