本文整理汇总了PHP中store函数的典型用法代码示例。如果您正苦于以下问题:PHP store函数的具体用法?PHP store怎么用?PHP store使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了store函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: store
function store($data, $csum)
{
$status = 0;
$csumn = new Csum($data);
if (!is_object($csum)) {
return null;
}
if (!$csum->matches($csumn)) {
return null;
}
return store($data, $csum);
}
开发者ID:achristensen3,项目名称:fracture-active,代码行数:12,代码来源:active.emInterface.php
示例2: PunkRecordIntakeHandler
function PunkRecordIntakeHandler()
{
global $l;
$l = new llog();
global $generalAuthKey;
if (authorized($generalAuthKey)) {
$l->a("Started DataIntakeHandler<br>");
$status = 0;
if (isset($_FILES['uploadedfile'])) {
$ulfilename = base64_encode($_FILES['uploadedfile']['name']);
$ulsize = base64_encode($_FILES['uploadedfile']['size']);
} else {
$ulfilename = null;
$ulsize = null;
}
$filename = "coal_temp/" . "data." . guidv4() . ".stt";
if (isset($_FILES['uploadedfile'])) {
if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $filename)) {
} else {
$status = 2;
$l->a("error 2<br>");
}
} else {
$status = 6;
$l->a("error 6<br>");
}
$csum = new Csum(null, $filename);
$insertion = store(file_get_contents($filename), $csum);
$id = $insertion['id'];
$status = $insertion['status'];
$db = new FractureDB('futuqiur_ember');
if (isset($_REQUEST['punkUser'])) {
$addedTree = $db->addRow('trees', 'user, collection, number, csum', "'" . $_REQUEST['punkUser'] . "', '" . $_REQUEST['punkCollection'] . "', '" . $id . "', '" . $csum->len . '|' . $csum->md5 . '|' . $csum->sha . '|' . $csum->s512 . "'");
}
if (check($status, true)) {
echo $id . '|' . $csum->len . '|' . $csum->md5 . '|' . $csum->sha . '|' . $csum->s512;
}
}
}
开发者ID:achristensen3,项目名称:fracture-active,代码行数:39,代码来源:active.responders.php
示例3: dirname
$logfile = dirname(__FILE__) . '/logs/storedata.log';
//si aggiorna verso le 10.00 del mattino
$biometeo_ITA_file = BIOMETEO_ITA_LINK;
$biometeo_ENG_file = BIOMETEO_ENG_LINK;
//si aggiorna verso le 8.30 del mattino
$meteo_file = METEO_LINK;
//si aggiorna dalle 10 alle 13 del mattino
//$risk_file = RISK_LINK. $today.".xml";
// RISK_LINK Puglia
$risk_file = RISK_LINK;
store($biometeo_ITA_file, dirname(__FILE__) . "/data/biometeo_ITA.xml", $logfile);
store($biometeo_ENG_file, dirname(__FILE__) . "/data/biometeo_ENG.xml", $logfile);
store($meteo_file, dirname(__FILE__) . "/data/meteo.xml", $logfile);
//cancello il file in locale in quanto cambia il nome da un giorno all'altro ed esiste un momento del giorno in cui non esiste il file (la mattina)
unlink(dirname(__FILE__) . "/data/risk.xml");
store($risk_file, dirname(__FILE__) . "/data/risk.xml", $logfile);
//download pics
download_remote_file(IDROMETRIA_Bisenzio_Prato, dirname(__FILE__) . "/data/IDROMETRIA_Bisenzio_Prato.jpg", $logfile);
download_remote_file(IDROMETRIA_Bisenzio_Vaiano_Gamberame, dirname(__FILE__) . "/data/IDROMETRIA_Bisenzio_Vaiano_Gamberame.jpg", $logfile);
download_remote_file(IDROMETRIA_Ombrone_PonteAlleVanne, dirname(__FILE__) . "/data/IDROMETRIA_Ombrone_PonteAlleVanne.jpg", $logfile);
download_remote_file(IDROMETRIA_Ombrone_PoggioACaiano, dirname(__FILE__) . "/data/IDROMETRIA_Ombrone_PoggioACaiano.jpg", $logfile);
download_remote_file(PLUVIOMETRIA_Prato_Città, dirname(__FILE__) . "/data/PLUVIOMETRIA_Prato_Città.jpg", $logfile);
download_remote_file(PLUVIOMETRIA_Prato_Università, dirname(__FILE__) . "/data/PLUVIOMETRIA_Prato_Università.jpg", $logfile);
download_remote_file(PLUVIOMETRIA_Galceti_Montemurlo, dirname(__FILE__) . "/data/PLUVIOMETRIA_Galceti_Montemurlo.jpg", $logfile);
download_remote_file(PLUVIOMETRIA_Vaiano_Gamberame, dirname(__FILE__) . "/data/PLUVIOMETRIA_Vaiano_Gamberame.jpg", $logfile);
download_remote_file(PLUVIOMETRIA_Vaiano_Acquedotto, dirname(__FILE__) . "/data/PLUVIOMETRIA_Vaiano_Acquedotto.jpg", $logfile);
download_remote_file(PLUVIOMETRIA_Fattoria_Iavello_Montemurlo, dirname(__FILE__) . "/data/PLUVIOMETRIA_Fattoria_Iavello_Montemurlo.jpg", $logfile);
download_remote_file(PLUVIOMETRIA_Cantagallo, dirname(__FILE__) . "/data/PLUVIOMETRIA_Cantagallo.jpg", $logfile);
download_remote_file(TERMOMETRIA_Prato_Università, dirname(__FILE__) . "/data/TERMOMETRIA_Prato_Università.jpg", $logfile);
download_remote_file(TERMOMETRIA_Galceti_Montemurlo, dirname(__FILE__) . "/data/TERMOMETIRIA_Galceti_Montemurlo.jpg", $logfile);
download_remote_file(ANEMOMETRIA_Prato_Università, dirname(__FILE__) . "/data/ANEMOMETRIA_Prato_Università.jpg", $logfile);
开发者ID:idlweb,项目名称:opendataleccebot,代码行数:31,代码来源:storage.php
示例4: deactivate
if (lateForms($value)) {
// echo "late with forms <br>";
deactivate($value["id"]);
} else {
if (lateAssessment($value)) {
deactivate($value["id"]);
} else {
if (needAssessmentReminder($curr)) {
remind($curr);
}
}
}
}
//store disabled users
if ($value["activated"] == -1) {
store($value["id"], $value["email"]);
remove($value["id"]);
}
}
}
}
function remind($curr)
{
//update reminder value
$assessments = getLastAssessment($curr);
$update = QueryFactory::Build("update");
$update->Table("assessments")->Where(["id", "=", $curr["id"]], ["TestNumber", "=", $assessments["TestNumber"]])->Set(["reminded", "1"]);
$cinfo = DatabaseManager::Query($complete);
//write email
Mailer::Send($curr["email"], "This is an email reminder that your Sit And Be Fit assessment is due in a week./nPlease go to sbfresearch.org and login to complete the assessment");
}
开发者ID:sam25,项目名称:website,代码行数:31,代码来源:manageUsers.php
示例5: array_filter
if (!is_dir($path)) {
$output->writeln('<error>Path "' . $path . '" not found.</error>');
return;
}
$locales = array_filter(scandir($path), function ($path) {
return '.' !== $path[0];
});
$availableLocales = array();
$root = (include __DIR__ . '/data_root.php');
foreach ($locales as $locale) {
$output->write('Processing locale <comment>' . $locale . '</comment>...');
$data = parse($path, $locale);
if (null === $data) {
$output->writeln('<error>No data found</error>.');
continue;
}
$filled = array_replace_recursive($root, $data);
store($locale, $filled);
$availableLocales[] = $locale;
$output->writeln('<info>Done</info>.');
}
$output->write('Storing root file...');
store('root', $root);
$output->writeln('<info>Done</info>.');
$output->write('Storing meta file...');
$meta = array('locales' => $availableLocales);
store('meta', $meta);
$output->writeln('<info>Done</info>.');
$output->writeln('<info>Finished processing ' . count($locales) . ' locales.</info>');
});
$console->run();
开发者ID:jsor,项目名称:locale-data,代码行数:31,代码来源:console.php
示例6: template
$filelist .= template($mode . '_image_' . $layout, $array);
} elseif ($extension == 'zip') {
# Item is a zip file=> add change to folder
$icone_visu = '<a class="tofolder" href="index.php?p=admin&unzip=' . $id . '&token=' . returnToken() . '" title="' . e('Convert this zip file to folder', false) . '"> </a>';
$array = array('#CLASS' => $class, '#ID' => $id, '#FICHIER' => $fichier_short, '#TOKEN' => returnToken(), '#SIZE' => $taille, '#NAME' => $nom, '#TITLE' => $title, '#EXTENSION' => $extension, '#ICONE_VISU' => $icone_visu, '#SLASHEDNAME' => addslashes($nom), '#SLASHEDFICHIER' => addslashes($fichier_short));
$filelist .= template($mode . '_file_' . $layout, $array);
} else {
# all other types
$array = array('#CLASS' => $class, '#ID' => $id, '#FICHIER' => $fichier_short, '#TOKEN' => returnToken(), '#SIZE' => $taille, '#NAME' => $nom, '#TITLE' => $title, '#EXTENSION' => $extension, '#ICONE_VISU' => $icone_visu, '#SLASHEDNAME' => addslashes($nom), '#SLASHEDFICHIER' => addslashes($fichier_short));
$filelist .= template($mode . '_file_' . $layout, $array);
}
}
}
echo $folderlist . $filelist;
if ($save) {
store($ids);
}
// save in case of new files
} else {
e('No file on the server');
}
?>
<script src="core/qr.js"></script>
<script>
function put_file(fichier){
document.getElementById('filename').value=fichier;
document.getElementById('filename_hidden').value=fichier;
}
function put_id(id){document.getElementById('ID_hidden').value=id;}
function put_link(id){document.getElementById('link').value="<?php
开发者ID:jz-de,项目名称:BoZoN,代码行数:31,代码来源:listfiles.php
示例7: load
} else {
$user = load($_GET['id']);
if ($user == NULL) {
$result['success'] = false;
$result['msg'] = "Error : User could not be found.";
$result['id'] = $_GET['id'];
} else {
if (property_exists('user', $_GET['field']) == false) {
$result['success'] = false;
$result['msg'] = "Error : Unknown field.";
$result['field'] = $_GET['field'];
} else {
//TODO check if field exists
$methodName = "set" . ucfirst($_GET['field']);
$user->{$methodName}($_GET['value']);
if (store($user) == false) {
$result['success'] = false;
$result['msg'] = "Error : User could not be saved.";
$result['id'] = $_GET['id'];
} else {
$result['success'] = true;
}
}
}
}
}
break;
default:
echo "ERR : No actions given. :(";
break;
}
开发者ID:Uinelj,项目名称:rpgmanager-server,代码行数:31,代码来源:action.php
示例8: updateIDs
function updateIDs($ids = null, $folder_id = null)
{
if (!$ids) {
$ids = unstore();
}
$ids = array_map(function ($id) {
return str_replace('//', '/', $id);
}, $ids);
$sdi = array_flip($ids);
$saveid = $savetree = false;
$ids = array_flip($sdi);
# here, all the redundant ids have gone ^^
# scann all uploads folder (can be long but it's important)
# or only the requested folder
if (!empty($folder_id)) {
$tree = recursive_glob(id2file($folder_id), true);
} else {
$tree = recursive_glob($_SESSION['upload_root_path'], true);
}
unset($tree[0]);
# add missing ids
foreach ($tree as $index => $file) {
if (!isset($sdi[$file])) {
$saveid = true;
$id = uniqid(true);
$ids[$id] = $file;
} else {
unset($sdi[$file]);
}
}
if (empty($folder_id)) {
# remove ids with no file (not required for single folder update)
if (!empty($sdi)) {
$saveid = true;
foreach ($sdi as $file => $id) {
if (!is_dir($file) && !is_file($file)) {
unset($ids[$id]);
if ($remove = array_search($file, $tree)) {
unset($tree[$remove]);
}
}
}
}
}
if ($saveid) {
store($ids);
regen_tree($_SESSION['login'], $ids);
}
return $ids;
}
开发者ID:Pluxopolis,项目名称:BoZoN,代码行数:50,代码来源:core.php
示例9: lstore
function lstore($data, $language)
{
//Store a localizable string.
$db = new FractureDB('futuqiur_ember');
$store = store($data);
$sid = $store['id'];
$id = $db->addRow('strings', 'language, data', '\'' . $language . '\', \'' . $sid . '\'');
$store['id'] = $id;
return $store;
}
开发者ID:achristensen3,项目名称:fracture-active,代码行数:10,代码来源:active.functions.php
示例10: ajaxCheckStoreSlugUnique
public function ajaxCheckStoreSlugUnique(Request $request)
{
if ($request->ajax() && $request->isMethod('POST')) {
$slug = str_slug($request->get('slug'));
$stores = Store::where('id', '!=', store()->id)->where('slug', $slug)->get();
return pong(1, ['data' => ['stores' => ['count' => $stores->count(), 'message' => _t('store_slug_unique')]]]);
}
}
开发者ID:vuongabc92,项目名称:ot,代码行数:8,代码来源:SettingController.php
示例11: copy_slice
function copy_slice($source, $dest)
{
global $SLICE_LEN;
$i = 0;
while ($i < $SLICE_LEN) {
store(fetch($source, $i), $dest, $i);
$i += 1;
}
}
开发者ID:swdunlop,项目名称:parable,代码行数:9,代码来源:parable.php
示例12: ajaxChangeCover
public function ajaxChangeCover(Request $request)
{
if ($request->isMethod('POST') && user()->has_store) {
$rules = $this->_getCoverRules();
$messages = $this->_getCoverMessages();
$validator = Validator::make($request->all(), $rules, $messages);
if ($validator->fails()) {
return file_pong(['status' => _const('AJAX_ERROR'), 'messages' => $validator->errors()->first()], 403);
}
/**
* 1. Get file, path and info
* 2. Generate file name
* 3. Upload
* 4. Resize
* 5. Delete old cover images and upload image
* 6. Save new info
*/
try {
// 1
$store = store();
$coverPath = config('front.cover_path');
$file = $request->file('__file');
// 2
$filename = new FileName($coverPath, $file->getClientOriginalExtension());
$filename->cover()->generate();
$filename->setPrefix(_const('COVER_PREFIX'));
$filename->cover()->group($this->_getCoverGroup(), true);
// 3
$upload = new Upload($file);
$upload->setDirectory($coverPath)->setName($filename->getName())->move();
// 4
$image = new Image($coverPath . $upload->getName());
$image->setDirectory($coverPath)->resizeGroup($filename->getGroup());
// 5
delete_file([$coverPath . $upload->getName(), $coverPath . $store->cover_original, $coverPath . $store->cover_big, $coverPath . $store->cover_medium, $coverPath . $store->cover_small]);
// 5
$resizes = $image->getResizes();
$store->cover_original = $resizes['original'];
$store->cover_big = $resizes['big'];
$store->cover_medium = $resizes['medium'];
$store->cover_small = $resizes['small'];
$store->update();
} catch (Exception $ex) {
$validator->errors()->add('__file', _t('opp'));
return file_pong(['status' => _const('AJAX_OK'), 'messages' => $validator->errors()->first()], 500);
}
return file_pong(['status' => _const('AJAX_OK'), 'messages' => _t('saved_info'), 'data' => ['big' => asset($coverPath . $resizes['big']), 'medium' => asset($coverPath . $resizes['medium']), 'small' => asset($coverPath . $resizes['small'])]]);
}
}
开发者ID:vuongabc92,项目名称:researchdrupal7cmsasbeginer,代码行数:49,代码来源:SettingController.php
示例13: lstore
function lstore($data, $csum, $language, $fallbackLanguage = 0)
{
//Store a localizable string.
$db = new FractureDB('futuqiur_ember');
$csumn = new Csum($data);
if (!$csum->matches($csumn)) {
return null;
}
$store = store($data, $csum);
$sid = $store['id'];
//deduplicate rows here...
$test = ltest($language, $sid);
if (is_null($test)) {
$id = $db->addRow('localized', 'language, data', '\'' . $language . '\', \'' . $sid . '\'');
$store['id'] = $id;
return $store;
}
$store['id'] = $test;
return $store;
}
开发者ID:achristensen3,项目名称:fracture-active,代码行数:20,代码来源:active.functions.php
示例14: save
function save()
{
inlog('Saving snippet file');
cache_clear();
global $config, $snippets;
$snippets['tag_list'] = list_tags();
$snippets['tag_private_list'] = list_tags(false);
if (!store($config['data_file'], $snippets)) {
return alert('Error');
} else {
return success('saved');
}
}
开发者ID:ArthurHoaro,项目名称:SnippetVamp,代码行数:13,代码来源:index.php
示例15: template
$filelist .= template($mode . '_image_item', $array);
} elseif ($extension == 'zip') {
# Item is a zip file=> add change to folder
$icone_visu = '<a class="tofolder" href="admin.php?unzip=' . $id . '&token=' . returnToken() . '" title="' . e('Convert this zip file to folder', false) . '"> </a>';
$array = array('#CLASS' => $class, '#ID' => $id, '#FICHIER' => $fichier_short, '#TOKEN' => returnToken(), '#SIZE' => $taille, '#NAME' => $nom, '#TITLE' => $title, '#EXTENSION' => $extension, '#ICONE_VISU' => $icone_visu, '#SLASHEDNAME' => addslashes($nom), '#SLASHEDFICHIER' => addslashes($fichier_short));
$filelist .= template($mode . '_file_item', $array);
} else {
# all other types
$array = array('#CLASS' => $class, '#ID' => $id, '#FICHIER' => $fichier_short, '#TOKEN' => returnToken(), '#SIZE' => $taille, '#NAME' => $nom, '#TITLE' => $title, '#EXTENSION' => $extension, '#ICONE_VISU' => $icone_visu, '#SLASHEDNAME' => addslashes($nom), '#SLASHEDFICHIER' => addslashes($fichier_short));
$filelist .= template($mode . '_file_item', $array);
}
}
}
echo $folderlist . $filelist;
if ($save) {
store();
}
// save in case of new files
} else {
e('No file on the server');
}
?>
<script>
function put_file(fichier){
document.getElementById('filename').value=fichier;
document.getElementById('filename_hidden').value=fichier;
}
function put_id(id){document.getElementById('ID_hidden').value=id;}
function put_link(id){document.getElementById('link').value="<?php
开发者ID:ymairesse,项目名称:BoZoN,代码行数:31,代码来源:listfiles.php
示例16: writeFiles
/**
* writes the POT file
*
* this function writes the general.pot file
*
* @return void
*/
function writeFiles()
{
// read the storage
$output = store(0, 0, array(), true);
// iterate through the files and merge the information for the same strings
foreach ($output as $file => $content) {
// the original created separate .pot files for each source file
// that containted over 11 strings, we've dropped this rule
//if (count($content) <= 11 && $file != 'general') {
if ($file != 'general') {
@($output['general'][1] = array_unique(array_merge($output['general'][1], $content[1])));
if (!isset($output['general'][0])) {
$output['general'][0] = $content[0];
}
unset($content[0]);
unset($content[1]);
foreach ($content as $msgid) {
$output['general'][] = $msgid;
}
unset($output[$file]);
}
}
// create the POT file
foreach ($output as $file => $content) {
$tmp = preg_replace('<[/]?([a-z]*/)*>', '', $file);
$tmp = preg_replace('/^\\.+/', '', $tmp);
$file = str_replace('.', '-', $tmp) . '.pot';
$filelist = $content[1];
unset($content[1]);
// source file and version information (from the Id tags)
//if (count($filelist) > 1) {
// $filelist = "Generated from files:\n# " . join("\n# ", $filelist);
//} elseif (count($filelist) == 1) {
// $filelist = "Generated from file: " . join("", $filelist);
//} else {
// $filelist = "No version information was available in the source files.";
//}
// writing the final POT to the proper file(s) / STDOUT
//$fp = fopen($file, 'w');
fwrite(STDOUT, str_replace("--VERSIONS--", $filelist, join("", $content)));
//fclose($fp);
}
}
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:50,代码来源:php-extractor.php
示例17: id2file
/**
* BoZoN admin page:
* allows upload / delete / filter files
* @author: Bronco ([email protected])
**/
include 'auto_restrict.php';
# Admin only!
include 'core.php';
# delete file
if (!empty($_GET['del']) && $_GET['del'] != '') {
$f = id2file($_GET['del']);
if (is_file($f)) {
unlink($f);
unset($ids[$_GET['del']]);
store(ID_FILE, $ids);
}
}
# search/filter
if (!empty($_GET['filter'])) {
$mask = strip_tags($_GET['filter']);
} else {
$mask = '';
}
if ($_FILES) {
include 'auto_dropzone.php';
exit;
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr" charset="UTF-8">
开发者ID:AlainRnet,项目名称:BoZoN,代码行数:30,代码来源:admin.php
示例18: apply
function apply()
{
global $cart;
global $rawSequence;
global $discount;
global $couponExclude;
$coupons = array_values(array_merge($cart['coupons']['pre'], $cart['coupons']['post']));
for ($j = 0; $j < count($rawSequence); $j++) {
for ($i = 0; $i < count($coupons); $i++) {
if ($coupons[$i]['raw_type'] != $rawSequence[$j]) {
continue;
}
switch ($coupons[$i]['type']) {
case $discount['STORE_WIDE']:
store($cart, json_decode($coupons[$i]['params'], true), $coupons[$i]['raw_type'], $discount['STORE_WIDE']);
break;
case $discount['CATEGORY_WIDE']:
category($cart, json_decode($coupons[$i]['params'], true), $discount['CATEGORY_WIDE']);
break;
case $discount['BOGO']:
bogo($cart, json_decode($coupons[$i]['params'], true), $discount['BOGO'] | $discount['CATEGORY_WIDE']);
break;
case $discount['GROUP_WISE']:
break;
default:
}
array_splice($coupons, $i, 1);
$exclude = $couponExclude[$rawSequence[$j]];
for ($k = 0; $k < count($exclude); $k++) {
for ($l = 0; $l < count($coupons); $l++) {
if ($coupons[$l]['raw_type'] != $exclude[$k]) {
continue;
}
array_splice($coupons, $i, 1);
$l--;
}
}
$i = -1;
}
}
return $cart;
}
开发者ID:ahskaus,项目名称:cart-discount-engine,代码行数:42,代码来源:cart.php
示例19: completeID
function completeID($array_of_files)
{
$ids = unstore();
$sdi = array_flip($ids);
// paths are keys
$save = false;
$upload_path_size = strlen($_SESSION['upload_path']);
foreach ($array_of_files as $file) {
$file = substr($file, $upload_path_size);
if (!isset($sdi[$file])) {
$save = true;
$ids[uniqid(true)] = $file;
}
}
if ($save) {
store($ids);
echo '<script>location.reload();</script>';
}
}
开发者ID:Oros42,项目名称:BoZoN,代码行数:19,代码来源:core.php
示例20: store
<?php
require "store.php";
$table = "usuario";
$preField[] = "nombre";
$preField[] = "contra";
$preField[] = "pregunta";
$preField[] = "respuesta";
$preField[] = "usuario";
$preValue[] = "Gustavo Amilcar Lopez";
$preValue[] = "G1234567";
$preValue[] = "G1234567?";
$preValue[] = "no";
$preValue[] = "GGustavoLopez";
store($preField, $preValue, $table);
开发者ID:GGustavoLopez,项目名称:InsertDinamicoPHP,代码行数:15,代码来源:userStore.php
注:本文中的store函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论