示例#1
0
文件: helpers.php 项目: ruolinn/lcms
function crumbs($menuId)
{
    $crumbs = '';
    $menu = app('menu')->where('id', '=', $menuId)->first();
    if (!empty($menu['parentid'])) {
        $crumbs = crumbs($menu['parentid']);
    }
    return $crumbs . $menu['name'] . " > ";
}
示例#2
0
 /**
  * @inheritdoc
  */
 function entityFindCandidate($entity, $entity_type, $distinction_key)
 {
     if (!isset($this->callback)) {
         // Restore the callback after serialization.
         $this->callback = crumbs()->callbackRestoration->restoreCallback($this->module, $this->key, $this->callbackType);
     }
     if (!empty($this->callback)) {
         return call_user_func($this->callback, $entity, $entity_type, $distinction_key);
     }
 }
示例#3
0
 /**
  * {@inheritdoc}
  */
 function findParent($path, $item)
 {
     if (!isset($this->callback)) {
         // Restore the callback after serialization.
         $this->callback = crumbs()->callbackRestoration->restoreCallback($this->module, $this->key, 'routeParent');
     }
     if (!empty($this->callback)) {
         return call_user_func($this->callback, $path, $item);
     }
 }
示例#4
0
 function crumbs($gid)
 {
     global $db, $crumb_array_name, $crumb_array_id;
     $ca_result = mysql_query("SELECT id,title,nest_under FROM photo_galleries where id = '{$gid}'", $db);
     $ca_rows = mysql_num_rows($ca_result);
     $ca = mysql_fetch_object($ca_result);
     if ($ca_rows) {
         $crumb_array_name[$ca->id] = $ca->title;
         $gid = $ca->nest_under;
         if ($ca->nest_under != 0) {
             crumbs($gid);
         }
     }
 }
    function widget($args, $instance) {
        extract( $args );
        echo $before_widget;
		if (function_exists( 'bcn_display')) {
			echo '<div class="breadcrumb" itemprop="breadcrumb">';
			bcn_display();
			echo '</div>';
		} elseif (function_exists('yoast_breadcrumb' )) {
			yoast_breadcrumb( '<div class="breadcrumb">', '</div>' );
		} elseif ( function_exists( 'breadcrumbs' ) ) {
			breadcrumbs();
		} elseif ( function_exists( 'crumbs' ) ) {
			crumbs();
		} else {
			$this->ultimatum_breadcrumb();
		}
        echo $after_widget;
    }
示例#6
0
/**
 * Display Breadcrumbs above the Loop. Concedes priority to popular breadcrumb
 * plugins.
 *
 * @since 0.1.6
 *
 * @return null Return null if a popular breadcrumb plugin is active
 */
function genesis_do_breadcrumbs()
{
    if ('posts' === get_option('show_on_front') && is_home() && !genesis_get_option('breadcrumb_home') || 'page' === get_option('show_on_front') && is_front_page() && !genesis_get_option('breadcrumb_front_page') || 'page' === get_option('show_on_front') && is_home() && !genesis_get_option('breadcrumb_posts_page') || is_single() && !genesis_get_option('breadcrumb_single') || is_page() && !genesis_get_option('breadcrumb_page') || (is_archive() || is_search()) && !genesis_get_option('breadcrumb_archive') || is_404() && !genesis_get_option('breadcrumb_404') || is_attachment() && !genesis_get_option('breadcrumb_attachment')) {
        return;
    }
    if (function_exists('bcn_display')) {
        echo '<div class="breadcrumb" itemprop="breadcrumb">';
        bcn_display();
        echo '</div>';
    } elseif (function_exists('yoast_breadcrumb')) {
        yoast_breadcrumb('<div class="breadcrumb">', '</div>');
    } elseif (function_exists('breadcrumbs')) {
        breadcrumbs();
    } elseif (function_exists('crumbs')) {
        crumbs();
    } else {
        genesis_breadcrumb();
    }
}
示例#7
0
/**
 * Display Breadcrumbs above the Loop. Concedes priority to popular breadcrumb
 * plugins.
 *
 * @since 0.1.6
 *
 * @return null Null if a popular breadcrumb plugin is active.
 */
function genesis_do_breadcrumbs()
{
    if ('posts' === get_option('show_on_front') && is_home() && !genesis_get_option('breadcrumb_home') || 'page' === get_option('show_on_front') && is_front_page() && !genesis_get_option('breadcrumb_front_page') || 'page' === get_option('show_on_front') && is_home() && !genesis_get_option('breadcrumb_posts_page') || is_single() && !genesis_get_option('breadcrumb_single') || is_page() && !genesis_get_option('breadcrumb_page') || (is_archive() || is_search()) && !genesis_get_option('breadcrumb_archive') || is_404() && !genesis_get_option('breadcrumb_404') || is_attachment() && !genesis_get_option('breadcrumb_attachment')) {
        return;
    }
    $breadcrumb_markup_open = sprintf('<div %s>', genesis_attr('breadcrumb'));
    if (function_exists('bcn_display')) {
        echo $breadcrumb_markup_open;
        bcn_display();
        echo '</div>';
    } elseif (function_exists('breadcrumbs')) {
        breadcrumbs();
    } elseif (function_exists('crumbs')) {
        crumbs();
    } elseif (class_exists('WPSEO_Breadcrumbs') && genesis_get_option('breadcrumbs-enable', 'wpseo_internallinks')) {
        yoast_breadcrumb($breadcrumb_markup_open, '</div>');
    } elseif (function_exists('yoast_breadcrumb') && !class_exists('WPSEO_Breadcrumbs')) {
        yoast_breadcrumb($breadcrumb_markup_open, '</div>');
    } else {
        genesis_breadcrumb();
    }
}
示例#8
0
 public function crumbs(Request $request)
 {
     $menuId = $request->get('menuid');
     return crumbs($menuId);
 }
/**
 * Display Breadcrumbs above the Loop
 * Concedes priority to popular breadcrumb plugins
 *
 * @since 0.1.6
 */
function genesis_do_breadcrumbs()
{
    // Conditional Checks
    if (is_front_page() && !genesis_get_option('breadcrumb_home')) {
        return;
    }
    if (is_single() && !genesis_get_option('breadcrumb_single')) {
        return;
    }
    if (is_page() && !genesis_get_option('breadcrumb_page')) {
        return;
    }
    if ((is_archive() || is_search()) && !genesis_get_option('breadcrumb_archive')) {
        return;
    }
    if (is_404() && !genesis_get_option('breadcrumb_404')) {
        return;
    }
    if (function_exists('bcn_display')) {
        echo '<div class="breadcrumb">';
        bcn_display();
        echo '</div>';
    } elseif (function_exists('yoast_breadcrumb')) {
        yoast_breadcrumb('<div class="breadcrumb">', '</div>');
    } elseif (function_exists('breadcrumbs')) {
        breadcrumbs();
    } elseif (function_exists('crumbs')) {
        crumbs();
    } else {
        genesis_breadcrumb();
    }
}
示例#10
0
 /**
  * Display Breadcrumbs above the Loop.
  *
  * This was ripped from Genesis core and put here because apparently using
  * our own attribute functions in our framework is just too much to ask. I
  * don't know what level of alcohol consumption is responsible for the if
  * statements in this atrocity, but I don't have time to care right now.
  *
  * @since  0.1.0
  * @return null Return null if a popular breadcrumb plugin is active
  */
 public function breadcrumbs()
 {
     if ('posts' === get_option('show_on_front') && is_home() && !genesis_get_option('breadcrumb_home') || 'page' === get_option('show_on_front') && is_front_page() && !genesis_get_option('breadcrumb_front_page') || 'page' === get_option('show_on_front') && is_home() && !genesis_get_option('breadcrumb_posts_page') || is_single() && !genesis_get_option('breadcrumb_single') || is_page() && !genesis_get_option('breadcrumb_page') || (is_archive() || is_search()) && !genesis_get_option('breadcrumb_archive') || is_404() && !genesis_get_option('breadcrumb_404') || is_attachment() && !genesis_get_option('breadcrumb_attachment')) {
         return;
     }
     // Set default itemprop.
     $itemprop = ' itemprop="breadcrumb"';
     // Null itemprop if we're within the blog.
     if (is_singular('post') || is_archive() || is_home() || is_page_template('page_blog.php')) {
         $itemprop = '';
     }
     if (function_exists('bcn_display')) {
         echo '<div class="breadcrumb"' . $itemprop . '>';
         bcn_display();
         echo '</div>';
     } elseif (function_exists('breadcrumbs')) {
         breadcrumbs();
     } elseif (function_exists('crumbs')) {
         crumbs();
     } elseif (class_exists('WPSEO_Breadcrumbs') && genesis_get_option('breadcrumbs-enable', 'wpseo_internallinks')) {
         yoast_breadcrumb('<div class="breadcrumb"' . $itemprop . '>', '</div>');
     } elseif (function_exists('yoast_breadcrumb') && !class_exists('WPSEO_Breadcrumbs')) {
         yoast_breadcrumb('<div class="breadcrumb"' . $itemprop . '>', '</div>');
     } else {
         genesis_breadcrumb();
     }
 }
示例#11
0
    if ($death[1] == '11') {
        if ($death[2] > '13') {
            header('Location:./lineups/');
        }
    } elseif ($death[1] > 11) {
        header('Location:./lineups/');
    }
} elseif ($death[0] > '2009') {
    header('Location:./lineups/');
}
# Load Heracles
// Heracles handles the authentication portion
require './lib/heracles.php';
# Was a log in/log out action performed
if ($_POST['submit'] == 'Login' || $_GET['action'] == 'logout') {
    crumbs($_POST['password'], $date);
}
# Load Kadmos
// Kadmos handles the SQL connection settings
require './lib/kadmos.php';
# If the specified date doesn't exist, create it and refresh
if (mysql_num_rows($sql_pull = mysql_query("SELECT * FROM `lineups` WHERE `date`='" . $date . "'")) == 0) {
    mysql_query("INSERT INTO `lineups` (`date`, `lineup`) VALUES ('" . $date . "', '::Employee////////////////////////////////////////////////////////////////')");
    header('Location:./?date=' . $date);
}
# Turn the SQL pull into something usable
// This command makes the SQL pull into a PHP array
$data = mysql_fetch_assoc($sql_pull);
# Turn the lineup into an array
$first = explode('::', $data['lineup']);
// LEGACY SUPPORT
function genesis_do_breadcrumbs()
{
    // Conditional Checks
    if (is_front_page() && !genesis_get_option('breadcrumb_home')) {
        return;
    }
    if (is_single() && !genesis_get_option('breadcrumb_single')) {
        return;
    }
    if (is_page() && !genesis_get_option('breadcrumb_page')) {
        return;
    }
    if ((is_archive() || is_search()) && !genesis_get_option('breadcrumb_archive')) {
        return;
    }
    if (function_exists('bcn_display')) {
        echo '<div class="breadcrumb">';
        bcn_display();
        echo '</div>';
    } elseif (function_exists('yoast_breadcrumb')) {
        yoast_breadcrumb('<div class="breadcrumbs">', '</div>');
    } elseif (function_exists('breadcrumbs')) {
        breadcrumbs();
    } elseif (function_exists('crumbs')) {
        crumbs();
    } else {
        include_once GENESIS_TOOLS_DIR . '/breadcrumb.php';
        genesis_breadcrumb(__('Home', 'genesis'), '/', '<div class="breadcrumb">', '</div>');
    }
}