예제 #1
0
파일: demo.php 프로젝트: rhondle/BlockChain
<?php

require 'blockchain';
// genesis block
if (!($res = addblock('blockchain.dat', 'September 30, 2016 BBC News: Van Gogh paintings stolen from Amsterdam found in Italy (http://www.bbc.com/news/world-europe-37516164)', true))) {
    exit("Got error: " . $res . "\n");
}
// add additional blocks
if (!($res = addblock('blockchain.dat', 'This is an example of some arbitrary data for block #2'))) {
    exit("Got error: " . $res . "\n");
}
// add additional blocks
if (!($res = addblock('blockchain.dat', 'This text will be stored in the third block'))) {
    exit("Got error: " . $res . "\n");
}
예제 #2
0
$image_path = $theme_path . "images/";
require_once 'modules/Vtiger/layout_utils.php';
$smarty = new vtigerCRM_Smarty();
$subMode = vtlib_purify($_REQUEST['sub_mode']);
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("JS_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
if ($subMode == 'updateFieldProperties') {
    updateFieldProperties();
} elseif ($subMode == 'deleteCustomField') {
    deleteCustomField();
} elseif ($subMode == 'changeOrder') {
    changeFieldOrder();
} elseif ($subMode == 'addBlock') {
    $duplicate = addblock();
} elseif ($subMode == 'deleteCustomBlock') {
    deleteBlock();
} elseif ($subMode == 'addCustomField') {
    $duplicate = addCustomField();
} elseif ($subMode == 'movehiddenfields' || $subMode == 'showhiddenfields') {
    show_move_hiddenfields($subMode);
} elseif ($subMode == 'changeRelatedInfoOrder') {
    changeRelatedListOrder();
}
$module_array = getCustomFieldSupportedModules();
$cfimagecombo = array($image_path . "text.gif", $image_path . "number.gif", $image_path . "percent.gif", $image_path . "currency.gif", $image_path . "date.gif", $image_path . "email.gif", $image_path . "phone.gif", $image_path . "picklist.gif", $image_path . "url.gif", $image_path . "checkbox.gif", $image_path . "text.gif", $image_path . "picklist.gif", $image_path . "time.PNG");
$cftextcombo = array($mod_strings['Text'], $mod_strings['Number'], $mod_strings['Percent'], $mod_strings['Currency'], $mod_strings['Date'], $mod_strings['Email'], $mod_strings['Phone'], $mod_strings['PickList'], $mod_strings['LBL_URL'], $mod_strings['LBL_CHECK_BOX'], $mod_strings['LBL_TEXT_AREA'], $mod_strings['LBL_MULTISELECT_COMBO'], $mod_strings['Time']);
$smarty->assign("MODULES", $module_array);
$smarty->assign("CFTEXTCOMBO", $cftextcombo);
$smarty->assign("CFIMAGECOMBO", $cfimagecombo);