Exemple #1
0
function themeSetup(&$smarty, $selectedMenu, $pdbACL, $pACL, $idUser)
{
    /* El tema elastixneo muestra hasta 7 items de menú de primer nivel, y 
     * coloca el resto en una lista desplegable a la derecha del último item. 
     * Se debe de garantizar que el item actualmente seleccionado aparezca en 
     * un menú de primer nivel que esté entre los 7 primeros, reordenando los 
     * items si es necesario. */
    $lang = get_language();
    $arrMainMenu = $smarty->get_template_vars('arrMainMenu');
    foreach ($arrMainMenu as $idMenu => $arrMenuItem) {
        $arrMainMenu[$idMenu]['icon'] = setIcon($idMenu);
    }
    $idMainMenuSelected = $smarty->get_template_vars('idMainMenuSelected');
    $MAX_ITEMS_VISIBLES = 7;
    if (count($arrMainMenu) > $MAX_ITEMS_VISIBLES) {
        // Se transfiere a arreglo numérico para manipular orden de enumeración
        $tempMenulist = array();
        $idxMainMenu = NULL;
        foreach ($arrMainMenu as $key => $value) {
            if ($key == $idMainMenuSelected) {
                $idxMainMenu = count($tempMenulist);
            }
            $tempMenulist[] = array($key, $value);
        }
        if (!is_null($idxMainMenu) && $idxMainMenu >= $MAX_ITEMS_VISIBLES) {
            $menuitem = array_splice($tempMenulist, $idxMainMenu, 1);
            array_splice($tempMenulist, $MAX_ITEMS_VISIBLES - 1, 0, $menuitem);
            $arrMainMenu = array();
            foreach ($tempMenulist as $menuitem) {
                $arrMainMenu[$menuitem[0]] = $menuitem[1];
            }
        }
        unset($tempMenulist);
    }
    $smarty->assign('arrMainMenu', $arrMainMenu);
    $smarty->assign("LANG", $lang);
    $smarty->assign(array("ABOUT_ELASTIX2" => _tr('About Elastix2'), "HELP" => _tr('HELP'), "USER_LOGIN" => $_SESSION['elastix_user'], "USER_ID" => $idUser, "CURRENT_PASSWORD_ALERT" => _tr("Please write your current password."), "NEW_RETYPE_PASSWORD_ALERT" => _tr("Please write the new password and confirm the new password."), "PASSWORDS_NOT_MATCH" => _tr("The new password doesn't match with retype password."), "CHANGE_PASSWORD" => _tr("Change Elastix Password"), "CURRENT_PASSWORD" => _tr("Current Password"), "NEW_PASSWORD" => _tr("New Password"), "RETYPE_PASSWORD" => _tr("Retype New Password"), "CHANGE_PASSWORD_BTN" => _tr("Change"), "MODULES_SEARCH" => _tr("Search modules"), "ADD_BOOKMARK" => _tr("Add Bookmark"), "REMOVE_BOOKMARK" => _tr("Remove Bookmark"), "ADDING_BOOKMARK" => _tr("Adding Bookmark"), "REMOVING_BOOKMARK" => _tr("Removing Bookmark"), "HIDING_IZQTAB" => _tr("Hiding left panel"), "SHOWING_IZQTAB" => _tr("Loading left panel"), "HIDE_IZQTAB" => _tr("Hide left panel"), "SHOW_IZQTAB" => _tr("Load left panel"), 'viewMenuTab' => getStatusNeoTabToggle($pdbACL, $idUser), 'MENU_COLOR' => getMenuColorByMenu($pdbACL, $idUser), 'IMG_BOOKMARKS' => menuIsBookmark($pdbACL, $idUser, $selectedMenu) ? 'bookmarkon.png' : 'bookmark.png', 'SHORTCUT' => loadShortcut($pdbACL, $idUser, $smarty), 'STATUS_STICKY_NOTE' => 'false', 'BREADCRUMB' => setBreadcrumb($arrMainMenu, $selectedMenu)));
    // se obtiene si ese menu tiene una nota agregada
    $statusStickyNote = getStickyNote($pdbACL, $idUser, $selectedMenu);
    if ($statusStickyNote['status'] && $statusStickyNote['data'] != "") {
        $smarty->assign('STATUS_STICKY_NOTE', 'true');
        if ($statusStickyNote['popup'] == 1) {
            $smarty->assign('AUTO_POPUP', '1');
        }
    }
}
Exemple #2
0
     $proicon = 'none.gif';
 }
 if ($facetype == 1) {
     $usericon = setIcon($proicon, $facetype, $user_a);
 } elseif ($facetype == 2) {
     $httpurl = $_POST['httpurl'];
     if (strncmp($httpurl[0], 'http', 4) != 0 || strrpos($httpurl[0], '|') !== false) {
         Showmsg('illegal_customimg');
     }
     $proicon = $httpurl[0];
     $httpurl[1] = '';
     $httpurl[2] = '';
     $httpurl[3] = (int) $httpurl[3];
     $httpurl[4] = (int) $httpurl[4];
     list($user_a[2], $user_a[3]) = flexlen($httpurl[1], $httpurl[2], $httpurl[3], $httpurl[4]);
     $usericon = setIcon($proicon, $facetype, $user_a);
     unset($httpurl);
 }
 pwFtpClose($ftp);
 $usericon && ($upmembers['icon'] = $usericon);
 $bday = $year . "-" . $month . "-" . $day;
 //$rvrc*=10;
 $regdate = PwStrtoTime($regdate);
 if ($oldinfo['username'] != stripcslashes($username)) {
     if (!$username) {
         Showmsg('username_empty');
     }
     if (strlen($username) > 15) {
         adminmsg('用户名长度不能大于15个字符');
     }
     $userService = L::loadClass('UserService', 'user');
 function updateIcon($uid)
 {
     global $atc_attachment_name, $db_ifftp;
     $uid = intval($uid);
     if ($uid < 1 || !S::isArray($_FILES)) {
         return $this->buildResponse(USER_INVALID_PARAMS);
     }
     ACloud_Sys_Core_Common::setGlobal('customized_current_uid', $uid);
     $user = $this->getCurrentUser();
     if (!$user->isLogin()) {
         return $this->buildResponse(USER_NOT_LOGIN);
     }
     $ext = strtolower(substr(strrchr($_FILES['icon']['name'], '.'), 1));
     L::loadClass('faceupload', 'upload', false);
     $face = new FaceUpload($user->uid);
     $icondb = PwUpload::upload($face);
     require_once R_P . 'require/showimg.php';
     $udir = str_pad(substr($user->uid, -2), 2, '0', STR_PAD_LEFT);
     if (!in_array(strtolower($ext), array('gif', 'jpg', 'jpeg', 'png', 'bmp'))) {
         return $this->buildResponse(USER_UPLOAD_CONTENT_ERROR);
     }
     $filename = "{$user->uid}.{$ext}";
     $sourceFilename = "{$user->uid}_tmp.{$ext}";
     $sourceDir = "upload/{$udir}/";
     $middleDir = "upload/middle/{$udir}/";
     $smallDir = "upload/small/{$udir}/";
     $img_w = $img_h = 0;
     $sourceFile = PwUpload::savePath($db_ifftp, $sourceFilename, $sourceDir);
     $middleFile = PwUpload::savePath($db_ifftp, $filename, $middleDir);
     PwUpload::createFolder(dirname($middleFile));
     PwUpload::movefile($sourceFile, $middleFile);
     require_once R_P . 'require/imgfunc.php';
     if (!($img_size = GetImgSize($middleFile))) {
         P_unlink($middleFile);
         return $this->buildResponse(USER_UPLOAD_CONTENT_ERROR);
     }
     list($img_w, $img_h) = getimagesize($middleFile);
     $smallFile = PwUpload::savePath($db_ifftp, $filename, $smallDir);
     $s_ifthumb = 0;
     PwUpload::createFolder(dirname($smallFile));
     if ($ext == 'gif') {
         L::loadClass('gifdecoder', 'utility', false);
         L::loadClass('gif', 'utility', false);
         $gifDecoder = new GIFDecoder($data);
         $frames = $gifDecoder->GIFGetFrames();
         if (!empty($frames)) {
             foreach ($frames as $key => $value) {
                 $frames[$key] = makeAvatarGifThumb($value, $img_w, $img_h, 48, 48);
             }
             $anime = new GIFEncoder($frames, $gifDecoder->GIFGetDelays(), $gifDecoder->GIFGetLoop(), $gifDecoder->GIFGetDisposal(), $gifDecoder->GIFGetTransparentR(), $gifDecoder->GIFGetTransparentG(), $gifDecoder->GIFGetTransparentB(), 'bin');
             $newGifData = $anime->getAnimation();
             PwUpload::createFolder(dirname($smallFile));
             writeover($smallFile, $newGifData);
             $s_ifthumb = 1;
         }
     } elseif (MakeThumb($middleFile, $smallFile, 48, 48)) {
         $s_ifthumb = 1;
     }
     if ($db_ifftp) {
         PwUpload::movetoftp($middleFile, $middleDir . $filename);
         $s_ifthumb && PwUpload::movetoftp($smallFile, $smallDir . $filename);
     }
     $user_a = explode('|', $user->icon);
     $user_a[2] = $img_w;
     $user_a[3] = $img_h;
     $usericon = setIcon("{$udir}/{$user->uid}.{$ext}", 3, $user_a);
     $userService = L::loadClass('UserService', 'user');
     /* @var $userService PW_UserService */
     $userService->update($user->uid, array('icon' => $usericon));
     list($iconurl) = showfacedesign($usericon, 1, 's');
     return $this->buildResponse(0, array('icon' => $iconurl));
 }
Exemple #4
0
    <li><a class="gplusone social-link" href="<?php 
    echo get_field('social_networks_gplusone', 'options');
    ?>
"  title="Google +1" target="_blank"><?php 
    echo setIcon('gplusone');
    ?>
</a></li>
<?php 
}
if (get_field('social_networks_linkedin', 'options')) {
    ?>
    <li><a class="linkedin social-link" href="<?php 
    echo get_field('social_networks_linkedin', 'options');
    ?>
"  title="Linked In" target="_blank"><?php 
    echo setIcon('linkedin');
    ?>
</a></li>
<?php 
}
if (get_field('social_networks_instagram', 'options')) {
    ?>
    <li><a class="instagram social-link" href="<?php 
    echo get_field('social_networks_instagram', 'options');
    ?>
"  title="Instagram" target="_blank"><?php 
    echo setIcon('instagram');
    ?>
</a></li>
<?php 
}
Exemple #5
0
?>
"><?php 
if (get_field('project_panel_title', 'options')) {
    echo get_field('project_panel_title', 'options');
} else {
    echo __('More selected projects', 'semplice');
}
?>
</h3>
				</div>
				<?php 
if ($tn_transition) {
    ?>
				<div class="project-panel-close span1">
            		<div class="close-project-panel light"><?php 
    echo setIcon('close_big');
    ?>
</div>
				</div>
				<?php 
}
?>
			</div>
			<div class="row">
        		<div class="project-panel-thumbs">
					<?php 
// Get Projects
$args = array('posts_per_page' => -1, 'post_type' => 'work');
// List Projects
$query = new WP_Query($args);
if ($query->have_posts()) {
" alt="<?php 
        the_title();
        ?>
" style="width: <?php 
        echo $responsive_width;
        ?>
; height: auto;" />
							<?php 
    }
    ?>
						</div>
					</div>
				</div>
			</div>
		</div>
	<?php 
}
?>
	<?php 
if (get_field('cover_scroll') === 'visible') {
    ?>
		<div class="see-more">
			<div class="icon"><?php 
    echo setIcon('big_arrow');
    ?>
</div>
		</div>
	<?php 
}
?>
</div>
Exemple #7
0
         pwCache::writeover($smallFile, $newGifData);
         $s_ifthumb = 1;
     }
 } elseif (MakeThumb($middleFile, $smallFile, 48, 48)) {
     $s_ifthumb = 1;
 }
 if ($db_ifftp) {
     //PwUpload::movetoftp($normalFile, $normalDir . "{$winduid}.$ext");
     PwUpload::movetoftp($middleFile, $middleDir . $filename);
     $s_ifthumb && PwUpload::movetoftp($smallFile, $smallDir . $filename);
 }
 pwFtpClose($GLOBALS['ftp']);
 $user_a = explode('|', $winddb['icon']);
 $user_a[2] = $img_w;
 $user_a[3] = $img_h;
 $usericon = setIcon("{$udir}/{$winduid}.{$ext}", 3, $user_a);
 $userService = L::loadClass('UserService', 'user');
 /* @var $userService PW_UserService */
 $userService->update($winduid, array('icon' => $usericon));
 //* $db->update("DELETE FROM pw_datastore WHERE skey=". S::sqlEscape("UID_".$winduid). " LIMIT 1");
 //job sign
 initJob($winduid, "doUpdateAvatar");
 if ($from != 'reg') {
     refreshto('profile.php?action=modify&info_type=face', 'upload_icon_success');
 }
 $jobService = L::loadclass('job', 'job');
 $jobs = $jobService->getJobByJobName('doUpdateAvatar');
 foreach ($jobs as $value) {
     if (!S::isArray($value)) {
         continue;
     }
Exemple #8
0
<?php

/*
 * footer
 * semplice.theme
 */
?>
			<!-- content -->
			</div>
		<!-- wrapper -->
		</div>
		<div class="to-the-top">
			<a class="top-button"><?php 
echo setIcon('arrow_up');
?>
</a>
		</div>
		<div class="overlay fade"></div>
		<?php 
wp_footer();
# include wordpress footer
?>
		<script type="text/javascript">
			(function($) {
				$(document).ready(function () {
					$(".live-video video, .live-audio audio, .cover-video video, .wysiwyg video, .wysiwyg audio").mediaelementplayer();
				});
			})(jQuery);
		</script>
	</body>
</html>
Exemple #9
0
<form role="search" method="get" class="search-form" action="<?php 
echo home_url('/');
?>
">
	<label>
		<span class="screen-reader-text"><?php 
echo setIcon('search_big');
?>
</span>
		<?php 
if (!is_search()) {
    ?>
<span class="close-search"><a class="search-close"><?php 
    echo setIcon('close');
    ?>
</a></span><?php 
}
?>
		<input type="search" class="search-field light" placeholder="<?php 
echo __('Search and hit enter', 'semplice');
?>
" value="" name="s" title="Search for:" />
	</label>
</form>
            // get image src
            $headline_img = wp_get_attachment_image_src(get_field('cover_headline_image'), 'full');
            ?>
                        <img class="headline-image" src="<?php 
            echo $headline_img[0];
            ?>
" alt="<?php 
            the_title();
            ?>
"/>
                    <?php 
        }
        ?>
                </div>
            </div>
        </div>
    <?php 
    }
}
if (get_field('cover_scroll') === 'visible') {
    ?>
    <div class="see-more">
        <div class="icon"><?php 
    echo setIcon('arrow_down');
    ?>
</div>
    </div>
<?php 
}
?>
</div>
Exemple #11
0
         $medalService = L::loadClass('medalservice', 'medal');
         $medalService->awardMedalByIdentify($winduid, 'shimingrenzheng');
     }
 }
 if ($rg_config['rg_allowsameip']) {
     if (file_exists(D_P . 'data/bbscache/ip_cache.php')) {
         writeover(D_P . 'data/bbscache/ip_cache.php', "<{$onlineip}>", "ab");
     } else {
         writeover(D_P . 'data/bbscache/ip_cache.php', "<?php die;?><{$timestamp}>\n<{$onlineip}>");
     }
 }
 if ($useweiboavatar) {
     require_once R_P . 'require/showimg.php';
     $userService = L::loadClass('UserService', 'user');
     /* @var $userService PW_UserService */
     $userService->update($winduid, array('icon' => setIcon($weiboUser['avatar'], 2, array('', '', 80, 80))));
 }
 $isSuccess = $weiboLoginService->bindNewLoginUser($winduid, $sessionInfo['sessiondata']['platformSessionId'], array('randomPassword' => $regpwd, 'type' => $type));
 $userBindService = L::loadClass('WeiboUserBindService', 'sns/weibotoplatform/service');
 /* @var $userBindService PW_WeiboUserBindService */
 if ($weiboAccount && $isfollow) {
     $userBindService->follow($type, $winduid);
 }
 Cookie("winduser", StrCode($winduid . "\t" . PwdCode($windpwd) . "\t" . $safecv));
 Cookie("ck_info", $db_ckpath . "\t" . $db_ckdomain);
 Cookie('lastvisit', '', 0);
 //自动获取勋章_start
 require_once R_P . 'require/functions.php';
 doMedalBehavior($winduid, 'continue_login');
 //自动获取勋章_end
 $verifyhash = GetVerify($winduid);
Exemple #12
0
				</div>
				<div class="semplice-share-icons">
					<div class="share-icon icon-twitter">
						<a href="http://twitter.com/intent/tweet?text=<?php 
    echo str_replace(' ', '%20', get_the_title());
    ?>
 <?php 
    the_permalink();
    ?>
" target="_blank"><?php 
    echo setIcon('twitter');
    ?>
</a>
					</div>
				</div>
				<div class="semplice-share-icons">
					<div class="share-icon icon-gplusone">
						<a href="https://plus.google.com/share?url=<?php 
    the_permalink();
    ?>
" target="_blank"><?php 
    echo setIcon('gplusone');
    ?>
</a>
					</div>
				</div>
			</div>
		</div>
	</div>
<?php 
}
Exemple #13
0
					<a class="project-panel-button menu-icon">
						<span>' . setIcon('project-panel') . '</span>
					</a>
				';
}
if (get_post_type($post->ID) === 'post' && !is_search()) {
    $controls .= '
					<a class="search-button menu-icon">
						<span class="search-open">' . setIcon('search_small') . '</span>
					</a>
				';
}
if (get_post_type($post->ID) === 'post') {
    $controls .= '
						<a class="archives-button menu-icon">
							<span class="archives-open">' . setIcon('archives') . '</span>
						</a>
					';
}
$navbar_html = '';
if (isset($is_fluid) && $is_fluid === 'enabled') {
    $navbar_html .= $fluid_container;
    $navbar_html .= '<div class="logo fluid-logo  ' . $padding . '">';
    // display the logo
    if ($custom_navbar) {
        $navbar_html .= $logo;
    } else {
        $navbar_html .= $default_logo;
    }
    // close fluid logo
    $navbar_html .= '</div>';