Пример #1
0
 public static function LinkToThisUnsafe($id, $name, $link_size = 'btn-md', $kwargs = array())
 {
     global $link_to_admin_article;
     global $link_to_public_article;
     global $use_mod_rewrite;
     $args = array();
     $mod_rewrite = 0;
     if (isset($use_mod_rewrite) && $use_mod_rewrite === true) {
         $mod_rewrite = 1;
     }
     if (IsSessionPublic() === true) {
         $args = array('action_link' => $link_to_public_article, 'action_type' => 'full', 'obj_type' => self::$type, 'id' => $id, 'lnk_text' => $name, 'lnk_size' => $link_size, 'method' => 'get', 'mod_rewrite' => $mod_rewrite);
     } else {
         $args = array('action_link' => $link_to_admin_article, 'action_type' => 'full', 'obj_type' => self::$type, 'id' => $id, 'lnk_text' => $name, 'lnk_size' => $link_size, 'method' => 'get');
     }
     extract($kwargs, EXTR_PREFIX_ALL, 't');
     if (isset($t_style)) {
         $args['style'] = $t_style;
     }
     return ActionLink($args);
 }
Пример #2
0
 public static function LinkToThisUnsafe($id, $name, $link_size = 'btn-md', $args2 = array())
 {
     global $link_to_admin_direction;
     global $link_to_public_direction;
     global $use_mod_rewrite;
     $args = array();
     $mod_rewrite = 0;
     if (isset($use_mod_rewrite) && $use_mod_rewrite === true) {
         $mod_rewrite = 1;
     }
     if (IsSessionPublic()) {
         $args = array('action_link' => $link_to_public_direction, 'action_type' => 'full', 'obj_type' => self::$type, 'id' => $id, 'lnk_text' => $name, 'lnk_size' => $link_size, 'mod_rewrite' => $mod_rewrite, 'method' => 'get');
     } else {
         $args = array('action_link' => $link_to_admin_direction, 'action_type' => 'full', 'obj_type' => self::$type, 'id' => $id, 'lnk_text' => $name, 'lnk_size' => $link_size, 'method' => 'get');
     }
     if (isset($args2['style'])) {
         $args['style'] = $args2['style'];
     }
     return ActionLink($args);
 }