private function getScriptPath($file)
 {
     if (!filter_var($file, FILTER_VALIDATE_URL) === false) {
         return $file;
     } else {
         if ($file = get_asset($file)) {
             return $file;
         }
     }
     return false;
 }
Example #2
0
 public function __construct($settings)
 {
     if (function_exists('acf_add_options_page') && !empty($settings['options_args'])) {
         $settings['options_args']['icon_url'] = get_asset($settings['options_args']['icon_url']);
         acf_add_options_page($settings['options_args']);
         add_filter('acf/settings/save_json', function ($path) {
             // update path
             $path = ADMIN_DIR . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'acf' . DIRECTORY_SEPARATOR;
             // return
             return $path;
         });
         add_filter('acf/settings/load_json', function ($paths) {
             // update path
             $paths[] = ADMIN_DIR . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'acf' . DIRECTORY_SEPARATOR;
             // return
             return $paths;
         });
     }
 }
 public function __construct($settings)
 {
     if (function_exists('acf_add_options_page') && !empty($settings['options_args'])) {
         if (!defined('ACF_CONFIG_DIR')) {
             define('ACF_CONFIG_DIR', CONFIG_DIR . DS . 'acf' . DS);
         }
         $settings['options_args']['icon_url'] = get_asset($settings['options_args']['icon_url']);
         acf_add_options_page($settings['options_args']);
         add_filter('acf/settings/save_json', function ($path) {
             // return
             return ACF_CONFIG_DIR;
         });
         add_filter('acf/settings/load_json', function ($paths) {
             // update path
             $paths[] = ACF_CONFIG_DIR;
             // return
             return $paths;
         });
     }
 }
<?php

foreach ($congregations as $congregation) {
    ?>

    <div class="small-11 medium-12 large-4 columns text-center display-flex">
        <div class="callout callout--congregation small-12">
            <img class="radius-50pc bgcolor--primary margin--1-0" src="<?php 
    echo get_asset('events/HerGetaway.png');
    ?>
" width="200" />
            <a href="<?php 
    echo $congregation->url;
    ?>
"><h4 class="strong uppercase text-primary"><?php 
    echo $congregation->title;
    ?>
</h4></a>
            <p><?php 
    echo $congregation->time;
    ?>
</p>
            <p><?php 
    echo $congregation->address;
    ?>
</p>
            <?php 
    if ($congregation->url) {
        ?>
                <a href="<?php 
        echo $congregation->url;
Example #5
0
    <head>
        <title><?php 
echo $wyf_title;
?>
</title>
        <?php 
echo $helpers->javascripts->add(get_asset('js/jquery.js'))->add(get_asset('js/wyf.js'))->add(get_asset('js/api.js'))->add(get_asset('js/mustache.js')) . $helpers->stylesheets->add(get_asset('css/wyf.css'))->add(get_asset('css/forms.css'))->add(get_asset('css/grid.css'));
?>
        
        <?php 
load_asset('images/home.png', get_asset('images/dashboard.png'));
load_asset('images/system.png', get_asset('images/system.png'));
load_asset('images/headerbg.gif', get_asset('images/headerbg.gif'));
load_asset('images/sidemenubg.gif', get_asset('images/sidemenubg.gif'));
load_asset('images/mainbg.gif', get_asset('images/mainbg.gif'));
load_asset('images/selectedbg.gif', get_asset('images/selectedbg.gif'));
?>
    </head>
    <body>
        <div id="wrapper">
            <div id="header">
                <div class="row">
                    <div class="column grid_10_5"><h1><?php 
echo $wyf_app_name;
?>
</h1></div>
                    <div class="column grid_10_5">
                        <div id="profile_box">
                        <?php 
if ($_SESSION['user']['username'] != '') {
    ?>
/**
 * Prints the full URL for the given theme asset.
 *
 * @param  string $filepath
 */
function asset($filepath)
{
    echo get_asset($filepath);
}
 function the_asset($file)
 {
     if ($asset = get_asset($file)) {
         echo $asset;
     }
 }
 public function Execute($params)
 {
     if (!isset($params["mesh_id"]) || !UUID::TryParse($params["mesh_id"], $meshID)) {
         RequestFailed('invalid or missing mesh identifier');
     }
     $meshfile = $this->ComputeMeshFile($meshID);
     // Check to see if we already have the file
     if (!file_exists($meshfile)) {
         // There is definitely a race condition here, the time between the check for an existing
         // file and acquiring a lock opens up the potential for overwriting the file
         $handle = fopen($meshfile, "wb");
         if (!flock($handle, LOCK_EX)) {
             fclose($handle);
             unlink($meshfile);
             RequestFailed('unable to acquire lock on cache file');
         }
         // Pull it back from the asset service and store it locally
         if (!get_asset($meshID, $meshInfo)) {
             flock($handle, LOCK_UN);
             fclose($handle);
             unlink($meshfile);
             log_message('error', "[GetMesh] mesh {$meshID} not found");
             print_r($meshInfo);
             RequestFailed('mesh not found');
         }
         //content type check
         if (empty(self::$MeshTypes[$meshInfo['ContentType']])) {
             flock($handle, LOCK_UN);
             fclose($handle);
             unlink($texturefile);
             log_message('error', sprintf('[GetMesh] wrong asset type; %s', $meshInfo['ContentType']));
             RequestFailed(sprintf('wrong asset type; %s', $meshInfo['ContentType']));
         }
         if (!fwrite($handle, $meshInfo['Content'])) {
             flock($handle, LOCK_UN);
             fclose($handle);
             unlink($meshfile);
             log_message('error', '[GetMesh] write to file failed');
             RequestFailed('unable to write cache file');
         }
         flock($handle, LOCK_UN);
         fclose($handle);
     }
     $this->SendMeshFile($meshID, $meshfile);
 }
 /**
  * JavaSript to add field options to nesting fields in the Gravity forms editor
  */
 public function nesting_custom_scripts()
 {
     wp_register_script('gform-nesting', get_asset('admin/jquery.gform.nesting.js'), array('jquery'), '1.0.0', true);
     wp_localize_script('gform-nesting', 'rg_delete_field', array('nonce' => wp_create_nonce('rg_delete_field')));
     wp_enqueue_script('gform-nesting');
 }
Example #10
0
            <div class="row align-middle align-center">
                <div class="small-11 medium-12 large-4 columns text-center">
                    <img src="<?php 
echo get_asset('events/Empower17.png');
?>
">
                </div>
                <div class="small-11 medium-12 large-4 columns text-center">
                    <img src="<?php 
echo get_asset('events/HerGetaway.png');
?>
">
                </div>
                <div class="small-11 medium-12 large-4 columns text-center">
                    <img src="<?php 
echo get_asset('events/His_Retreat.png');
?>
">
                </div>
            </div>
        </section>
        
        <section id="giving" class="giving bgcolor-white padding--4-0 bgcolor--offwhite">

            <div class="row align-center">

                <div class="small-11 medium-12 columns text-center medium-text-left">
        
                    <h1 class="uppercase letterspacing strong text-primary mg-b-2 text-center">Giving</h1>
                    
                    <p>We believe in the importance of giving as part of our worship to God. We believe that all we have comes from God and that if we are obedient in the small things then God will bring increase.</p>
Example #11
0
/**
 *   Shorthand to keep with common conventions
 */
function get_stylesheet()
{
    return get_asset('style.css');
}
Example #12
0
    inactive_control_cell($myrow["asset_id"], $myrow["inactive"], 'assets', 'asset_id');
    delete_button_cell("Delete" . $myrow['asset_id'], _("Delete"));
    echo "<td><a href='amortisation.php?assetid=" . $myrow['asset_id'] . "'>A</a></td>\n";
    end_row();
}
inactive_control_row($th);
end_table(1);
//-----------------------------------------------------------------------------------
start_table(TABLESTYLE2);
// $_POST['location'] = "";
// $_POST['condition'] = _("Good");
// $_POST['acquisition'] = _("Purchase");
if ($selected_id != -1) {
    if ($Mode == 'Edit') {
        //editing an existing status code
        $myrow = get_asset($selected_id);
        $_POST['type'] = $myrow["asset_type_id"];
        $_POST['name'] = $myrow["asset_name"];
        $_POST['serial'] = $myrow["asset_serial"];
        $_POST['tag'] = $myrow["tag_number"];
        $_POST['purchase_date'] = sql2date($myrow["purchase_date"]);
        $_POST['purchase_value'] = number_format2($myrow["purchase_value"], 2);
        $_POST['location'] = $myrow["asset_location"];
        $_POST['condition'] = $myrow["asset_condition"];
        $_POST['acquisition'] = $myrow["asset_acquisition"];
        $_POST['disposal_amount'] = number_format2($myrow["disposal_amount"], 2);
        $_POST['disposal_date'] = sql2date($myrow["disposal_date"]);
    }
    hidden('selected_id', $selected_id);
}
asset_type_list_row(_("Asset Type :"), 'type', null, true);