示例#1
0
 static function load($app_name)
 {
     $apps = self::getAppList();
     if (!isset($apps[$app_name])) {
         return;
     }
     $app_dir = $apps[$app_name];
     self::$activeAppName = strtolower($app_name);
     self::$activeAppDir = $app_dir;
     $route_file_name = String::glue($app_dir, DS, APP_CONFIG_DIR, DS, 'route.php');
     if (php_sapi_name() != 'cli') {
         try {
             Route::setActive(Route::getPath(), file_exists($route_file_name) ? include $route_file_name : array(), true);
         } catch (Exception $e) {
             self::parseError($e, $app_name);
         }
     }
     self::setDefaultParams();
     // Abort this code, but later
     if (!Auth::loged() && Core::isSecure(Request::get('module')) && Request::get('module') != 'login' && false) {
         if (php_sapi_name() == 'cli') {
             echo 'Auth Error';
             exit;
         }
         Request::redirect('/login/' . (Request::get(Route::$path) ? '&return=' . Request::get(Route::$path) : ''));
     }
     //
     Settings::load('core', CORE_CONFIG_DIR . DS);
     self::loadDependences($app_dir);
     Settings::load($app_name);
     App::startApp($app_name);
     try {
         Load::Action($app_dir . DS, Request::get('action'));
     } catch (Exception $e) {
         self::parseError($e, $app_name);
     }
     App::endApp($app_name);
     Language::translate(Language::getActiveLanguageISO());
 }
示例#2
0
 /**
  * Create view
  */
 private function createView()
 {
     $this->oView->addData('titre', Language::translate('PERMISSIONS_ADMIN_TABLE_TITLE'));
     $oTable = new TableGenerator();
     $oTable->setId(md5('Access'));
     $aRanks = Rank::getRanks();
     $oTable->addColumn('');
     foreach ($aRanks as $oRank) {
         $oTable->addColumn($oRank->getName());
     }
     $aModules = Permission::getModules();
     foreach ($aModules as $iId => $sName) {
         $aBuffer = array();
         $aBuffer[] = $sName;
         foreach ($aRanks as $oRank) {
             if ($oRank->checkAccess($sName)) {
                 $sIcon = 'fa-check';
                 $sStyle = 'success';
                 $sNewValue = 'false';
             } else {
                 $sIcon = 'fa-times';
                 $sStyle = 'danger';
                 $sNewValue = 'true';
             }
             $oLabel = new View('minibutton');
             $oLabel->addData('icon', $sIcon);
             $oLabel->addData('style', $sStyle);
             $oLabel->addData('link', 'index.php?p=adminpermissions&m=' . $iId . '&r=' . $oRank->getId() . '&v=' . $sNewValue);
             $oLabel->create();
             $aBuffer[] = $oLabel->getCode();
         }
         $oTable->addLine($aBuffer);
     }
     $oTable->setBottom('');
     $oTable->create();
     $this->oView->addData('content', $oTable->getCode());
     $this->oView->Create();
 }
示例#3
0
文件: error.class.php 项目: Jatax/TKS
 /**
  * Display the error
  * @return string
  */
 public function __toString()
 {
     $this->log();
     return Language::translate($this->message);
 }
示例#4
0
				   </select>
				   </div>
			   </div>
			   <div class="col-md-12 text-center">
			   <div class="form-group">
			   <label for="description"><?php 
echo Language::translate("LBL_HELPDESK_DESCRIPTION");
?>
</label>
			   <textarea name="description" id="description" class="form-control" rows="10"></textarea>
			   </div>
			   </div>
				</div>
				</div>
				<!-- /.panel-body -->
				<div class="panel-footer">
					<input type="submit" value="<?php 
echo Language::translate("LBL_NEW_TICKET");
?>
" class="btn btn-success btn-lg">
				</div>
				</form>
				<!-- /.panel-footer -->
			</div>
		</div>
		<!-- /.col-lg-6 -->
	</div>
	<!-- /.row -->
</div>
<!-- /#page-wrapper -->
示例#5
0
/**
 * Shorthand function to translate using the Language class. Gets domain
 * from the class passed in the backtrace. IF dgettext is not compiled into PHP
 * the arguments are just returned with sprintf.
 * @return string
 * @see Language::translate()
 */
function t()
{
    static $lang = null;
    $args = func_get_args();
    if (!function_exists('dgettext')) {
        if (count($args) > 1) {
            return call_user_func_array('sprintf', $args);
        } else {
            return $args[0];
        }
    }
    if (empty($lang)) {
        $lang = new \Language();
    }
    $r = debug_backtrace();
    $file_path = $r[0]['file'];
    if (strstr($file_path, 'mod/')) {
        $domain = preg_replace('|.*mod/([^/]+)/.*|', '\\1', $file_path);
    } else {
        $domain = 'core';
    }
    $lang->setDomain($domain);
    return $lang->translate($args);
}
示例#6
0
									<input class="form-control" placeholder="<?php 
echo Language::translate("LBL_EMAIL");
?>
" title="<?php 
echo Language::translate("LBL_EMAIL");
?>
"  name="email" type="email" autofocus required>
									<input name="forgot" type="hidden" value="1" >
								</div>
								<!-- Change this to a button or input when using this as a form -->
								<button type="submit" class="btn btn-lg btn-success btn-block"><?php 
echo Language::translate("LBL_SEND_PASSWORD");
?>
</button>
								<a onclick="$('#forgotpanel').hide();$('#loginpanel').show();" class="btn btn-lg btn-warning btn-block"><?php 
echo Language::translate("LBL_LNK_HOME");
?>
</a>
							</fieldset>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
<script src="themes/<?php 
echo $currtheme;
?>
/assets/js/login.js"></script> 
<?php 
require_once "themes/default/footer.php";
示例#7
0
        echo $field['netPrice' . $count];
        ?>
</td>
					</tr>
					<?php 
    }
    ?>
				</tbody>
			</table>
		</div>
	</div>
	<?php 
} else {
    ?>
    
	<h2>
		<?php 
    $listTrans = "LBL_NO_" . strtoupper($module) . "_RECORDS_FOUND";
    if (Language::translate($listTrans) != $listTrans) {
        echo Language::translate($listTrans);
    } else {
        echo Language::translate("LBL_NO_RECORDS_FOUND") . ': ' . $GLOBALS["modulesNames"][$module];
    }
    ?>
	</h2>
	<?php 
}
?>
	</div>
</div>
示例#8
0
 * The content of this file is subject to the MYC Vtiger Customer Portal license.
 * ("License"); You may not use this file except in compliance with the License
 * The Initial Developer of the Original Code is Proseguo s.l. - MakeYourCloud
 * Portions created by Proseguo s.l. - MakeYourCloud are Copyright(C) Proseguo s.l. - MakeYourCloud
 * All Rights Reserved.
 * Contributor(s): YetiForce.com
 * ****************************************************************************** */
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title><?php 
echo Language::translate($title = $module ? $module : 'LBL_CUSTOMER_PORTAL');
?>
</title>
	<link rel="SHORTCUT ICON" href="<?php 
echo $currtheme;
?>
/images/favicon.ico">
	<!-- Bootstrap Core CSS -->
	<link href="themes/<?php 
echo $currtheme;
?>
/assets/css/bootstrap.min.css" rel="stylesheet">
	<!-- MetisMenu CSS -->
	<link href="themes/<?php 
echo $currtheme;
?>
示例#9
0
    public static function loadDataTable()
    {
        echo '<script>
			$(document).ready(function() {
				$(".dataTablesContainer").dataTable( {
					"language": {
						"lengthMenu": "' . Language::translate("LBL_RECORDS_PER_PAGE") . '",
						"zeroRecords": "' . Language::translate("LBL_NOTHING_FOUND") . '",
						"info": "' . Language::translate("LBL_SHOWING_PAGE") . '",
						"infoEmpty": "",
						"infoPostFix": "",
						"url": "",
						"infoFiltered": "' . Language::translate("LBL_FILTERED_TOTAL_RECORDS") . '",
						"processing": "' . Language::translate("LBL_PROCESSING") . '",
						"search": "' . Language::translate("LBL_SEARCH") . ' ",
						"paginate": {
							"first": "' . Language::translate("LBL_FIRST") . '",
							"previous": "' . Language::translate("LBL_PREVIOUS") . '",
							"next": "' . Language::translate("LBL_NEXT") . '",
							"last": "' . Language::translate("LBL_LAST") . '"
						}
					}
				} );
			});
			</script>';
    }
示例#10
0
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title><?php 
if (isset($GLOBALS['portal_title'])) {
    echo $GLOBALS['portal_title'] . " - ";
}
echo Language::translate(isset($module) ? $module : 'MYC Vtiger Customer Portal');
?>
</title>

    <!-- Bootstrap Core CSS -->
    <link href="themes/default/assets/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="themes/default/assets/css/plugins/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="themes/default/assets/css/sb-admin-2.css" rel="stylesheet">
    
    <link href="themes/default/assets/css/plugins/dataTables.bootstrap.css" rel="stylesheet">

    <!-- Custom Fonts -->
示例#11
0
                        <?php 
if ($data['ticket_status'] != "Closed") {
    ?>
                        <div class="panel-footer">
                        <form name="comments" action="index.php" method="post">
		   <input type="hidden" name="module" value="HelpDesk">
		   <input type="hidden" name="action" value="index">
		   <input type="hidden" name="fun" value="updatecomment">
		   <input type="hidden" name="ticketid" value='<?php 
    echo $data['ticketid'];
    ?>
'>
		   <textarea name="comments" rows="5" class="form-control input-sm" ></textarea>
		   <br>
		   <input class="btn btn-warning btn-sm" title="Send Comment" accesskey="S"  name="submit" value="<?php 
    echo Language::translate("Send Comment");
    ?>
" type="submit" onclick="if(trim(this.form.comments.value) != '') return true; else return false;" />
		   </form>
                        
                        </div>
                        <!-- /.panel-footer -->
                        <?php 
}
?>
                    </div>
                  
                </div>
                <!-- /.col-lg-6 -->
                
                
示例#12
0
				  <div class="form-group">
				    <label for="default_language">Default Language</label>
				    <p class="help-block">Set the default language for your portal, the selected will be the first shown in the login picklist. To add a new language to the customer portal you just need to create a new file following the other languages files structure (presents in the language directory) and put it in the language directory with the name your_language.lang.php (replacing your_language with yout language code)</p>				    
				    <select name="default_language" id="default_language" class="form-control" >
				    <?php 
$result = array();
$themesdir = "../languages";
$cdir = scandir($themesdir);
foreach ($cdir as $key => $value) {
    if (!in_array($value, array(".", "..")) && strpos($value, '.lang.php') !== false) {
        $value = str_replace(".lang.php", "", $value);
        $selected = "";
        if ($value == $config['default_language']) {
            $selected = " selected";
        }
        $label = Language::translate($value, $value);
        echo "<option value='{$value}' {$selected}>{$label}</option>";
    }
}
?>
				    </select>				    
				  </div>
				  
				   
			   	
			
				  			   	
				<hr>
				  <b><em>You should set here your api credentials to enable the api-related functionalities of MYC Customer Portal, for example the Events Calendar</em></b><br><br>
						     <div class="form-group">
							    <label for="api_user">vTiger WS Api Username</label>
示例#13
0
?>
</a></li>
		<li><a href="" data-toggle="modal" data-target="#changePassModal"><span class="glyphicon glyphicon-user"></span> <?php 
echo Language::translate("LBL_BTN_CHANGE_PASSWORD");
?>
</a><li>
	</ul>
	<!-- /.navbar-top-links -->
	<div class="navbar-default sidebar" role="navigation">
		<div class="sidebar-nav navbar-collapse">
			<ul class="nav" id="side-menu"> 
			<?php 
if ($GLOBALS['show_summary_tab']) {
    ?>
				<li><a href="index.php?module=Home&action=index"><?php 
    echo Language::translate("LBL_DASHBOARD");
    ?>
</a></li>
			<?php 
}
?>
			<?php 
foreach ($GLOBALS["avmod"] as $mod) {
    $active = '';
    if ($mod['name'] == $GLOBALS['targetmodule']) {
        $active = ' class="active"';
    }
    if (!in_array($mod['name'], $GLOBALS['hiddenmodules'])) {
        echo '<li><a href="index.php?module=' . $mod['name'] . '&action=index"' . $active . '>' . $mod['translated_name'] . '</a></li>';
    }
}
示例#14
0
						</form>
					</div>
				</div>
				<div class="login-panel " id="forgotpanel">
					<div class="panel-heading">
						<h3 class="panel-title"><?php echo Language::translate("LBL_RESET_PASSWORD"); ?></h3>
					</div>
					<div class="panel-body">
						<div class="row">
							<img alt="Logo" class="center-block cp-logo" title="Logo" src="<?php echo "themes/".$currtheme; ?>/images/logo.png"/>
						</div>
						<form role="form" method="post" >
							<fieldset>
								<div class="form-group">
									<input class="form-control" placeholder="<?php echo Language::translate("LBL_EMAIL"); ?>" title="<?php echo Language::translate("LBL_EMAIL"); ?>"  name="email" type="email" autofocus required>
									<input name="forgot" type="hidden" value="1" >
								</div>
								<!-- Change this to a button or input when using this as a form -->
								<button type="submit" class="btn btn-lg btn-success btn-block"><?php echo Language::translate("LBL_SEND_PASSWORD"); ?></button>
								<a onclick="$('#forgotpanel').hide();$('#loginpanel').show();" class="btn btn-lg btn-warning btn-block"><?php echo Language::translate("LBL_LNK_HOME"); ?></a>
							</fieldset>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
<script src="themes/<?php echo $currtheme; ?>/assets/js/login.js"></script> 
<?php require_once("themes/default/footer.php"); ?>

<p><?php 
echo Language::translate("EMAILS_ACCOUNT_RECOVERY_EMAIL_TEXT");
?>
</p>
<p>
    <a href="<?php 
echo Url::site("login/restore/" . $hash);
?>
" target="_blank">
        <?php 
echo Language::translate("EMAILS_ACCOUNT_RECOVERY_EMAIL_LINK");
?>
    </a>
</p>
示例#16
0
		  </div>
		<input type="hidden" name="fun" value="changepassword">
		<?php 
}
?>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><?php 
echo Language::translate("LBL_CLOSE");
?>
</button>
        <?php 
if ($msgt != "success") {
    ?>
<input type="submit" class="btn btn-primary" value="<?php 
    echo Language::translate("LBL_CHANGE_PASSWORD");
    ?>
"><?php 
}
?>
        </form>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript">
                
function getFileNameOnly(filename) {
	var onlyfilename = filename;
  	// Normalize the path (to make sure we use the same path separator)
示例#17
0
				<div class="panel-footer">
				<form name="comments" action="index.php" method="post">
					<input type="hidden" name="module" value="HelpDesk">
					<input type="hidden" name="action" value="index">
					<input type="hidden" name="fun" value="updatecomment">
					<input type="hidden" name="id" value='<?php 
    echo $data['ticketid'];
    ?>
'>
					<textarea name="comments" title="<?php 
    echo Language::translate("LBL_COMMENT_AREA");
    ?>
"  rows="5" class="form-control input-sm" ></textarea>
					<br>
					<input class="btn btn-warning btn-sm" title="Send Comment" accesskey="S"  name="submit" value="<?php 
    echo Language::translate("LBL_HELPDESK_SEND_COMMENT");
    ?>
" type="submit" onclick="if(trim(this.form.comments.value) != '') return true; else return false;" />
				</form>
				</div>
				<!-- /.panel-footer -->
				<?php 
}
?>
			</div>
		</div>
		<!-- /.col-lg-6 -->
	</div>
	<!-- /.row -->
</div>
<!-- /#page-wrapper -->
示例#18
0
 * in compliance with the License.
 * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
 * See the License for the specific language governing rights and limitations under the License.
 * The Original Code is YetiForce.
 * The Initial Developer of the Original Code is YetiForce. Portions created by YetiForce are Copyright (C) www.yetiforce.com. 
 * All Rights Reserved.
 *************************************************************************************************************************************/
?>
<div class="col-lg-6 OpenTickets">
	<input class="widgetData" type="hidden" value='<?php 
echo json_encode($data);
?>
' />
	<div class="panel panel-default">
		<div class="panel-heading"><?php 
echo Language::translate("LBL_WIDGET_OPENTICKETS");
?>
</div>
		<div class="panel-body" style="height: 380px;">
			<div id="OpenTickets" style="height: 350px;"></div>
		</div>
	</div>
</div>
<script>
$(document).ready(function(){
	var widgetsOpenTickets = $("#OpenTickets");
	var openTicketsData = JSON.parse($(".OpenTickets .widgetData").val());
	var openTicketsChartData = [];
	var openTicketsURLs = [];
	for(var index in openTicketsData) {
		var row = openTicketsData[index];
示例#19
0
 * The Original Code is YetiForce.
 * The Initial Developer of the Original Code is YetiForce. Portions created by YetiForce are Copyright (C) www.yetiforce.com. 
 * All Rights Reserved.
 *************************************************************************************************************************************/
?>
<link class="include" rel="stylesheet" type="text/css" href="lib/jquery.jqplot/jquery.jqplot.min.css" />
<script type="text/javascript" src="lib/jquery.jqplot/jquery.jqplot.js"></script>
<script type="text/javascript" src="lib/jquery.jqplot/plugins/jqplot.pieRenderer.min.js"></script>
<script type="text/javascript" src="lib/jquery.jqplot/plugins/jqplot.donutRenderer.min.js"></script>
<script type="text/javascript" src="lib/morris/raphael.min.js"></script>
<script type="text/javascript" src="lib/morris/morris.js"></script>
<link class="include" rel="stylesheet" type="text/css" href="lib/morris/morris.css" />
<div id="page-wrapper">
	<div class="row">
		<div class="col-lg-12">
			<h1 class="page-header"><?php 
echo Language::translate('LBL_HOME');
?>
</h1>
		</div>
	</div>
	<?php 
foreach ($data['widgets'] as $key => $data) {
    $file = "modules/" . $module . "/layouts/" . $key . ".php";
    if (file_exists($file)) {
        require_once $file;
    }
}
?>
</div>
示例#20
0
 /**
  * Select: Add Option
  *
  * @param string $value
  * @param string $display
  * @param bool   $selected
  *
  * @return string
  */
 protected static function selectAddOption($value, $display, $selected = null)
 {
     //Translation?
     $translated = Language::translate($display);
     if ($display != $translated) {
         $display = $translated;
     }
     //Selected?
     if ($selected) {
         $selected = "selected";
     }
     return "<option value='" . Helper::sanitize($value) . "' " . $selected . ">" . Helper::sanitize($display) . "</option>\n";
 }
示例#21
0
                    <!-- /.panel -->
               
               </div>
                <!-- /.col-lg-6 -->
                
                <?php 
    }
    ?>
                           
                    
                   
                     
                
                <?php 
} else {
    echo "<div class='col-lg-12'><h2>" . Language::translate("No dashboard infos found!") . "</h2></div>";
}
?>
                
           
                
                                    </div>
                <!-- /.row -->
           
           
           
                                     <?php 
if (isset($data['plugin_data']['views']['footer'])) {
    foreach ($data['plugin_data']['views']['footer'] as $pluginname => $viewname) {
        Template::displayPlugin($pluginname, $data, $viewname);
    }
示例#22
0
                       
                       <textarea name="description" id="description" class="form-control" rows="10"></textarea>
                       </div>
                       
                       </div>
                       
                       
                       
                       
					   	</div>
                        </div>
                        <!-- /.panel-body -->
                        
                        <div class="panel-footer">
							<input type="submit" value="<?php 
echo Language::translate("Submit Ticket");
?>
" class="btn btn-success btn-lg">
                        
                        </div>
                        </form>
                        <!-- /.panel-footer -->
                    </div>
                  
                </div>
                <!-- /.col-lg-6 -->
                
                
            </div>
            <!-- /.row -->
           
示例#23
0
 /**
  * Create ADD Popup
  * @param array $aTrackersSelect
  * @param array $aCategoriesSelect
  * @return string Code HTML
  */
 private function createAddPopup($aTrackersSelect, $aCategoriesSelect)
 {
     $oPopupAdd = new View('popup');
     $oPopupAdd->addData('id', 'addrss');
     $oPopupAdd->addData('buttonstyle', 'btn-success');
     $oPopupAdd->addData('buttonicon', 'fa-plus');
     $oPopupAdd->addData('buttontext', Language::translate('RSS_ADMIN_ADD_ADD'));
     $oPopupAdd->addData('title', Language::translate('RSS_ADMIN_ADD_TITLE'));
     $oFormAdd = new FormGenerator();
     $oFormAdd->setAction('index.php?p=adminrss');
     $oFormAdd->addSelect(Language::translate('RSS_ADMIN_ADD_TRACKER'), 'tracker', $aTrackersSelect);
     $oFormAdd->addSelect(Language::translate('RSS_ADMIN_ADD_ENCODE'), 'encoding', Config::getEncodes());
     $oFormAdd->addInput(Language::translate('RSS_ADMIN_ADD_URL'), 'url', true, false, 'text', 'URL ...');
     $oFormAdd->addInput(Language::translate('RSS_ADMIN_ADD_MASK'), 'mask', true, false, 'text', 'http://montracker.fr/download/{PASSKEY}/{IDTORRENT}');
     $oFormAdd->addCheckbox(Language::translate('RSS_ADMIN_ADD_DATE'), 'forcedate');
     $oFormAdd->create();
     $oPopupAdd->addData('content', $oFormAdd->getCode());
     $oPopupAdd->create();
     return $oPopupAdd->getCode();
 }
示例#24
0
    ?>
                           
                   <?php 
    if (isset($data['plugin_data']['views']['blocks'])) {
        foreach ($data['plugin_data']['views']['blocks'] as $pluginname => $viewname) {
            Template::displayPlugin($pluginname, $data, $viewname);
        }
    }
    ?>
     
                   
                     
                
                <?php 
} else {
    echo "<div class='col-lg-12'><h2>" . Language::translate("The record could not be found!") . "</h2></div>";
}
?>
                
           
                
                                    </div>
                <!-- /.row -->
           
           
           
            <?php 
if (isset($data['plugin_data']['views']['footer'])) {
    foreach ($data['plugin_data']['views']['footer'] as $pluginname => $viewname) {
        Template::displayPlugin($pluginname, $data, $viewname);
    }
示例#25
0
                            <h2><?php 
    echo Language::translate("No " . $module . " records Found!");
    ?>
</h2>
							<?php 
}
?>
  
                            
                        </div>
                        <!-- /.panel-body -->
                        
                        <div class="panel-footer">
                            <div class="input-group" style="width:100%; text-align:right;">
                                <a href="index.php?module=HelpDesk&action=new" class="btn btn-warning btn-sm pull-right"><?php 
echo Language::translate("New Ticket");
?>
</a>
                            </div>
                        </div>
                        
                        
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            
                                      <?php 
if (isset($data['plugin_data']['views']['footer'])) {
示例#26
0
        foreach ($record as $record_fields) {
            echo "<td>" . Language::translate($record_fields['fielddata']) . "</td>";
        }
        echo "</tr>";
    }
    ?>
                                    	                                                                              
                                    </tbody>
                                </table>
                            </div>
                         <?php 
} else {
    ?>
    
                            <h2><?php 
    echo Language::translate("No " . $module . " records Found!");
    ?>
</h2>
                         <?php 
}
?>
   
                            
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
示例#27
0
 /**
  * Create ADD popup
  * @return string Code HTML
  */
 private function createAddPopup()
 {
     //Popup d'ajout
     $oPopupAdd = new View('popup');
     $oPopupAdd->addData('id', 'addkey');
     $oPopupAdd->addData('buttonstyle', 'btn-success');
     $oPopupAdd->addData('buttonicon', 'fa-plus');
     $oPopupAdd->addData('buttontext', Language::translate('API_ADMIN_ADD_ADD'));
     $oPopupAdd->addData('title', Language::translate('API_ADMIN_ADD_TITLE'));
     $oFormAdd = new FormGenerator();
     $oFormAdd->setAction('index.php?p=adminapi');
     $aOptions = User::getUsersSelect();
     $oFormAdd->addSelect(Language::translate('API_ADMIN_ADD_USER'), 'user', $aOptions);
     $oFormAdd->addCheckbox(Language::translate('API_ADMIN_ADD_READ'), 'read', true);
     $oFormAdd->addCheckbox(Language::translate('API_ADMIN_ADD_WRITE'), 'write', false);
     $oFormAdd->create();
     $oPopupAdd->addData('content', $oFormAdd->getCode());
     $oPopupAdd->create();
     return $oPopupAdd->getCode();
 }
示例#28
0
 /**
  * Create Add Popup
  * @param array $p_aCategories
  * @return string Code HTML
  */
 private function createAddPopup($p_aCategories)
 {
     $oPopupAdd = new View('popup');
     $oPopupAdd->addData('id', 'addparser');
     $oPopupAdd->addData('buttonstyle', 'btn-success');
     $oPopupAdd->addData('buttonicon', 'fa-plus');
     $oPopupAdd->addData('buttontext', Language::translate('PARSER_ADMIN_ADD_ADD'));
     $oPopupAdd->addData('title', Language::translate('PARSER_ADMIN_ADD_TITLE'));
     $oFormAdd = new FormGenerator();
     $oFormAdd->setAction('index.php?p=adminparser');
     $oFormAdd->addInput(Language::translate('PARSER_ADMIN_ADD_NAME'), 'name', true, false, 'text', 'Nom ...');
     $oFormAdd->addInput(Language::translate('PARSER_ADMIN_ADD_REGEX'), 'regex', true, false, 'text', 'expression1|expression2 ...');
     $oFormAdd->addSelect(Language::translate('PARSER_ADMIN_ADD_CATEGORIE'), 'categorie', $p_aCategories);
     $oFormAdd->create();
     $oPopupAdd->addData('content', $oFormAdd->getCode());
     $oPopupAdd->create();
     return $oPopupAdd->getCode();
 }
示例#29
0
		  </div>
		<input type="hidden" name="fun" value="changepassword">
		<?php 
}
?>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><?php 
echo Language::translate("Close");
?>
</button>
        <?php 
if ($msgt != "success") {
    ?>
<input type="submit" class="btn btn-primary" value="<?php 
    echo Language::translate("Change Password");
    ?>
"><?php 
}
?>
        </form>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript">
                
function getFileNameOnly(filename) {
	var onlyfilename = filename;
  	// Normalize the path (to make sure we use the same path separator)
示例#30
0
 /**
  * @covers Xmf\Language::translate
  */
 public function testTranslate()
 {
     $str = 'string';
     $x = Language::translate($str);
     $this->assertSame($str, $x);
 }