Exemplo n.º 1
0
    public function view()
    {
        $parent = Page::getByPath(STACKS_PAGE_PATH);
        $cpc = new Permissions($parent);
        if ($cpc->canMoveOrCopyPage()) {
            $this->set('canMoveStacks', true);
            $sortUrl = View::url('/dashboard/blocks/stacks', 'update_order');
            $this->addFooterItem('<script type="text/javascript">
			$("div.ccm-stack-content-wrapper").sortable({
				handle: "img.ccm-group-sort",
				cursor: "move",
				axis: "y",
				opacity: 0.5,
				stop: function() {
					var pagelist = $(this).sortable("serialize");
					$.ajax({
						dataType: "json",
						type: "post",
						url: "' . $sortUrl . '",
						data: pagelist,
						success: function(r) {
							if (r.success) {
								ccmAlert.hud(r.message, 2000, "success");
							} else {
								ccmAlert.hud(r.message, 2000, "error");
							}
						}
					});
				}
			});
			</script>');
        }
    }
Exemplo n.º 2
0
 public function on_before_render()
 {
     $tabs = array();
     foreach ($this->categories as $cat) {
         $active = $cat->getWorkflowProgressCategoryHandle() == $this->wpCategoryHandleActive;
         if ($active) {
             $this->set('category', $cat);
         }
         switch ($cat->getWorkflowProgressCategoryHandle()) {
             case 'page':
                 $tabName = t('Pages');
                 break;
             case 'file':
                 $tabName = t('Files');
                 break;
             case 'user':
                 $tabName = t('Users');
                 break;
             default:
                 $tabName = t(sprintf('%ss', Loader::helper('text')->unhandle($cat->getWorkflowProgressCategoryHandle())));
                 break;
         }
         $tabs[] = array(View::url('/dashboard/workflow/me/', 'view', $cat->getWorkflowProgressCategoryHandle()), $tabName, $active);
     }
     $this->set('tabs', $tabs);
 }
Exemplo n.º 3
0
 public function view($page = 0)
 {
     $this->set('title', t('Logs'));
     $pageBase = View::url('/dashboard/reports/logs', 'view');
     $paginator = Loader::helper('pagination');
     $total = Log::getTotal($_REQUEST['keywords'], $_REQUEST['logType']);
     $paginator->init(intval($page), $total, $pageBase . '/%pageNum%/?keywords=' . $_REQUEST['keywords'] . '&logType=' . $_REQUEST['logType'], 10);
     $limit = $paginator->getLIMIT();
     $types = Log::getTypeList();
     $txt = Loader::helper('text');
     $logTypes = array();
     $logTypes[''] = '** ' . t('All');
     foreach ($types as $t) {
         if ($t == '') {
             $logTypes[''] = '** ' . t('All');
         } else {
             $logTypes[$t] = $txt->unhandle($t);
         }
     }
     $entries = Log::getList($_REQUEST['keywords'], $_REQUEST['logType'], $limit);
     $this->set('keywords', $keywords);
     $this->set('pageBase', $pageBase);
     $this->set('entries', $entries);
     $this->set('paginator', $paginator);
     $this->set('logTypes', $logTypes);
 }
Exemplo n.º 4
0
 public function on_start()
 {
     $subnav = array(array(View::url('/dashboard/easy_news'), t('Easy News Manage'), true), array(View::url('/dashboard/easy_news/help'), 'Help'));
     $this->set('subnav', $subnav);
     Loader::model('page_list');
     $this->error = Loader::helper('validation/error');
 }
Exemplo n.º 5
0
	public function getLatestAvailableVersionNumber() {
		if (defined('MULTI_SITE') && MULTI_SITE == 1) {
			$updates = Update::getLocalAvailableUpdates();
			$multiSiteVersion = 0;
			foreach($updates as $up) {
				if (version_compare($up->getUpdateVersion(), $multiSiteVersion, '>')) {
					$multiSiteVersion = $up->getUpdateVersion();
				}	
			}
			Config::save('APP_VERSION_LATEST', $multiSiteVersion);
			return $multiSiteVersion;
		}
		
		$d = Loader::helper('date');
		// first, we check session
		$queryWS = false;
		Cache::disableCache();
		$vNum = Config::get('APP_VERSION_LATEST', true);
		Cache::enableCache();
		if (is_object($vNum)) {
			$seconds = strtotime($vNum->timestamp);
			$version = $vNum->value;
			if (is_object($version)) {
				$versionNum = $version->version;
			} else {
				$versionNum = $version;
			}
			$diff = time() - $seconds;
			if ($diff > APP_VERSION_LATEST_THRESHOLD) {
				// we grab a new value from the service
				$queryWS = true;
			}
		} else {
			$queryWS = true;
		}
		
		if ($queryWS) {
			Loader::library('marketplace');
			$mi = Marketplace::getInstance();
			if ($mi->isConnected()) {
				Marketplace::checkPackageUpdates();
			}
			$update = Update::getLatestAvailableUpdate();
			$versionNum = $update->version;
			
			if ($versionNum) {
				Config::save('APP_VERSION_LATEST', $versionNum);
				if (version_compare($versionNum, APP_VERSION, '>')) {
					Loader::model('system_notification');
					SystemNotification::add(SystemNotification::SN_TYPE_CORE_UPDATE, t('A new version of concrete5 is now available.'), '', $update->notes, View::url('/dashboard/system/update'));
				}		
			} else {
				// we don't know so we're going to assume we're it
				Config::save('APP_VERSION_LATEST', APP_VERSION);
			}
		}
		
		return $versionNum;
	}
Exemplo n.º 6
0
	public function on_start() {
		$subnav = array(
			array(View::url('/dashboard/settings'), t('General')),
			array(View::url('/dashboard/settings/mail'), t('Email')),
			array(View::url('/dashboard/settings', 'set_permissions'), t('Access')),
			array(View::url('/dashboard/settings/multilingual'), t('Multilingual'), true),
			array(View::url('/dashboard/settings', 'set_developer'), t('Debug')),
			array(View::url('/dashboard/settings', 'manage_attribute_types'), t('Attributes'))
		);
		$this->set('subnav', $subnav);	}
Exemplo n.º 7
0
 public function run()
 {
     self::fetch();
     // if they're not running any kind of js analytics, redirect immediately
     if (self::is_url() && !Config::$analytics) {
         Response::redirect(self::$long);
     }
     self::$url = SnS::make_url(self::url());
     return self::$template;
 }
 public function on_before_render()
 {
     $tabs = array();
     foreach ($this->categories as $cat) {
         $active = $cat->getWorkflowProgressCategoryHandle() == $this->wpCategoryHandleActive;
         if ($active) {
             $this->set('category', $cat);
         }
         $tabs[] = array(View::url('/dashboard/workflow/me/', 'view', $cat->getWorkflowProgressCategoryHandle()), t('%ss', Loader::helper('text')->unhandle($cat->getWorkflowProgressCategoryHandle())), $active);
     }
     $this->set('tabs', $tabs);
 }
Exemplo n.º 9
0
 public function browse($what = 'themes')
 {
     $tp = new TaskPermission();
     $subnav = array(array(View::url('/dashboard/install'), t('Installed and Available'), false), array(View::url('/dashboard/install', 'browse', 'themes'), t('More Themes'), $what == 'themes'), array(View::url('/dashboard/install', 'browse', 'addons'), t('More Add-Ons'), $what == 'addons'));
     if ($tp->canInstallPackages()) {
         Loader::model('marketplace_remote_item');
         $mri = new MarketplaceRemoteItemList();
         $mri->setItemsPerPage(9);
         if ($what == 'addons') {
             $sets = MarketplaceRemoteItemList::getItemSets('addons');
         } else {
             // themes
             $sets = MarketplaceRemoteItemList::getItemSets('themes');
         }
         $setsel = array('' => t('All Items'), 'FEATURED' => t('Featured Items'));
         if (is_array($sets)) {
             foreach ($sets as $s) {
                 $setsel[$s->getMarketplaceRemoteSetID()] = $s->getMarketplaceRemoteSetName();
             }
         }
         $mri->setIncludeInstalledItems(false);
         if (isset($_REQUEST['marketplaceRemoteItemSetID'])) {
             $set = $_REQUEST['marketplaceRemoteItemSetID'];
         }
         if (isset($_REQUEST['marketplaceRemoteItemKeywords'])) {
             $keywords = $_REQUEST['marketplaceRemoteItemKeywords'];
         }
         if ($keywords != '') {
             $mri->filterByKeywords($keywords);
         }
         if ($set == 'FEATURED') {
             $mri->filterByIsFeaturedRemotely(1);
         } else {
             if ($set > 0) {
                 $mri->filterBySet($set);
             }
         }
         $mri->setType($what);
         $mri->execute();
         $items = $mri->getPage();
         $this->set('selectedSet', $set);
         $this->set('list', $mri);
         $this->set('items', $items);
         $this->set('form', Loader::helper('form'));
         $this->set('sets', $setsel);
         $this->set('type', $what);
     }
     $this->set('subnav', $subnav);
 }
Exemplo n.º 10
0
	public function connect_complete() {
		$tp = new TaskPermission();
		if ($tp->canInstallPackages()) {
			if (!$_POST['csToken']) {
				$this->set('error', array(t('An unexpected error occurred when connecting your site to the marketplace.')));
			} else {
				Config::save('MARKETPLACE_SITE_TOKEN', $_POST['csToken']);
				Config::save('MARKETPLACE_SITE_URL_TOKEN', $_POST['csURLToken']);
				print '<script type="text/javascript">parent.window.location.href=\'' . View::url('/dashboard/install', 'view', 'community_connect_success') . '\';</script>';
				exit;
			}
		} else {
			$this->set('error', array(t('You do not have permission to connect this site to the marketplace.')));
		}
	}
Exemplo n.º 11
0
 protected function notifyAdmin($offenderID)
 {
     $offender = UserInfo::getByID($offenderID);
     $ue = new \Concrete\Core\User\Event\UserInfo($offender);
     Events::dispatch('on_private_message_over_limit', $ue);
     $admin = UserInfo::getByID(USER_SUPER_ID);
     Log::addEntry(t("User: %s has tried to send more than %s private messages within %s minutes", $offender->getUserName(), \Config::get('concrete.user.private_messages.throttle_max'), \Config::get('concrete.user.private_messages.throttle_max_timespan')), t('warning'));
     Loader::helper('mail');
     $mh = new MailHelper();
     $mh->addParameter('offenderUname', $offender->getUserName());
     $mh->addParameter('profileURL', BASE_URL . View::url('/profile', 'view', $offender->getUserID()));
     $mh->addParameter('profilePreferencesURL', BASE_URL . View::url('/profile/edit'));
     $mh->to($admin->getUserEmail());
     $mh->load('private_message_admin_warning');
     $mh->sendMail();
 }
Exemplo n.º 12
0
 public function convert($val)
 {
     $editLink = "<a href='%s'>Edit</a>";
     $deleteLink = "<a href='%s'>Delete</a>";
     $listItem = "<li>%s - {$editLink} {$deleteLink}</li>";
     if ($val) {
         $db = Loader::db();
         $rows = $db->getAll("SELECT ID," . $this->colName . " as name FROM " . $this->tableName . " WHERE " . $this->joinCol . "=?", array($val));
         $retval = "<ul class=\"unstyled\">";
         foreach ($rows as $row) {
             $retval .= t($listItem, $row['name'], View::url($this->editUrl, $val, $row['ID']), View::url($this->deleteUrl, $row['ID']));
         }
         $retval .= t("</ul><a href='%s'>Add New</a>", View::url($this->editUrl, $val));
         return $retval;
     }
     return "ERROR";
 }
Exemplo n.º 13
0
 public function valid_url($url)
 {
     if (strpos($url, 'http') === 0 || strpos($url, 'mailto') === 0) {
         return $url;
     } else {
         if (strpos($url, '@') !== false) {
             return 'mailto:' . $url;
         } else {
             if (strpos($url, '/') === 0) {
                 return View::url($url);
                 //site path (not an external url)
             } else {
                 return 'http://' . $url;
             }
         }
     }
 }
Exemplo n.º 14
0
function printAttributeRow($ak, $uo) {
	
	$vo = $uo->getAttributeValueObject($ak);
	$value = '';
	if (is_object($vo)) {
		$value = $vo->getValue('displaySanitized', 'display');
	}
	
	if ($value == '') {
		$text = '<div class="ccm-attribute-field-none">' . t('None') . '</div>';
	} else {
		$text = $value;
	}
	if ($ak->isAttributeKeyEditable()) { 
	$type = $ak->getAttributeType();
	
	$html = '
	<tr class="ccm-attribute-editable-field">
		<td style="white-space: nowrap; padding-right: 20px"><strong><a href="javascript:void(0)">' . $ak->getAttributeKeyDisplayHandle() . '</a></strong></td>
		<td width="100%" class="ccm-attribute-editable-field-central"><div class="ccm-attribute-editable-field-text">' . $text . '</div>
		<form method="post" action="' . View::url('/dashboard/users/search', 'edit_attribute') . '">
		<input type="hidden" name="uakID" value="' . $ak->getAttributeKeyID() . '" />
		<input type="hidden" name="uID" value="' . $uo->getUserID() . '" />
		<input type="hidden" name="task" value="update_extended_attribute" />
		<div class="ccm-attribute-editable-field-form ccm-attribute-editable-field-type-' . strtolower($type->getAttributeTypeHandle()) . '">
		' . $ak->render('form', $vo, true) . '
		</div>
		</form>
		</td>
		<td class="ccm-attribute-editable-field-save"><a href="javascript:void(0)"><img src="' . ASSETS_URL_IMAGES . '/icons/edit_small.png" width="16" height="16" class="ccm-attribute-editable-field-save-button" /></a>
		<a href="javascript:void(0)"><img src="' . ASSETS_URL_IMAGES . '/icons/close.png" width="16" height="16" class="ccm-attribute-editable-field-clear-button" /></a>
		<img src="' . ASSETS_URL_IMAGES . '/throbber_white_16.gif" width="16" height="16" class="ccm-attribute-editable-field-loading" />
		</td>
	</tr>';
	
	} else {

	$html = '
	<tr>
		<th>' . $ak->getAttributeKeyDisplayHandle() . '</th>
		<td width="100%" colspan="2">' . $text . '</td>
	</tr>';	
	}
	print $html;
}
Exemplo n.º 15
0
function printAttributeRow($ak, $uo, $assignment) {
	$vo = $uo->getAttributeValueObject($ak);
	$value = '';
	if (is_object($vo)) {
		$value = $vo->getValue('displaySanitized', 'display');
	}
	
	if ($value == '') {
		$text = '<div class="ccm-attribute-field-none">' . t('None') . '</div>';
	} else {
		$text = $value;
	}
	if ($ak->isAttributeKeyEditable() && in_array($ak->getAttributeKeyID(), $assignment->getAttributesAllowedArray())) { 
	$type = $ak->getAttributeType();
	
	$html = '
	<tr class="ccm-attribute-editable-field">
		<td width="250" style="vertical-align:middle;"><a style="font-weight:bold; line-height:18px;" href="javascript:void(0)">' . $ak->getAttributeKeyDisplayHandle() . '</a></td>
		<td class="ccm-attribute-editable-field-central" style="vertical-align:middle;"><div class="ccm-attribute-editable-field-text">' . $text . '</div>
		<form method="post" style="margin-bottom:0;" action="' . View::url('/dashboard/users/search', 'edit_attribute') . '">
		<input type="hidden" name="uakID" value="' . $ak->getAttributeKeyID() . '" />
		<input type="hidden" name="uID" value="' . $uo->getUserID() . '" />
		<input type="hidden" name="task" value="update_extended_attribute" />
		<div class="ccm-attribute-editable-field-form ccm-attribute-editable-field-type-' . strtolower($type->getAttributeTypeHandle()) . '">
		' . $ak->render('form', $vo, true) . '
		</div>
		</form>
		</td>
		<td class="ccm-attribute-editable-field-save" style="vertical-align:middle; text-align:center;" width="30"><a href="javascript:void(0)"><img src="' . ASSETS_URL_IMAGES . '/icons/edit_small.png" width="16" height="16" class="ccm-attribute-editable-field-save-button" /></a>
		<a href="javascript:void(0)"><img src="' . ASSETS_URL_IMAGES . '/icons/close.png" width="16" height="16" class="ccm-attribute-editable-field-clear-button" /></a>
		<img src="' . ASSETS_URL_IMAGES . '/throbber_white_16.gif" width="16" height="16" class="ccm-attribute-editable-field-loading" />
		</td>
	</tr>';
	
	} else {

	$html = '
	<tr>
		<td width="250">' . $ak->getAttributeKeyDisplayHandle() . '</th>
		<td class="ccm-attribute-editable-field-central" colspan="2">' . $text . '</td>
	</tr>';	
	}
	print $html;
}
Exemplo n.º 16
0
 public function view($arg = null)
 {
     $v = Loader::helper('validation/error');
     Loader::model('page_theme_archive');
     $this->set('disableThirdLevelNav', true);
     if ($arg == 'install') {
         try {
             $pl = new PageThemeArchive();
             $t = $pl->install($_FILES['archive']['tmp_name']);
             $this->redirect('/dashboard/pages/themes/inspect', $t->getThemeID(), 1);
         } catch (Exception $e) {
             $v->add($e);
         }
     }
     if ($v->has()) {
         $this->set('error', $v);
     }
     $this->set('addurl', View::url('/dashboard/pages/themes/add', 'install'));
 }
Exemplo n.º 17
0
 public function approve(WorkflowProgress $wp)
 {
     $c = Page::getByID($this->getRequestedPageID());
     if ($c->getCollectionTypeHandle() == STACKS_PAGE_TYPE) {
         $c = Stack::getByID($this->getRequestedPageID());
         $c->delete();
         $wpr = new WorkflowProgressResponse();
         $wpr->setWorkflowProgressResponseURL(View::url('/dashboard/blocks/stacks', 'stack_deleted'));
         return $wpr;
     }
     $cParentID = $c->getCollectionParentID();
     if (ENABLE_TRASH_CAN) {
         $c->moveToTrash();
     } else {
         $c->delete();
     }
     $wpr = new WorkflowProgressResponse();
     $wpr->setWorkflowProgressResponseURL(BASE_URL . DIR_REL . '/' . DISPATCHER_FILENAME . '?cID=' . $cParentID);
     return $wpr;
 }
 /**
  * on_start
  * 
  * @access public
  *
  * @return mixed Value.
  */
 public function on_start()
 {
     $this->addHeaderItem(Loader::helper('html')->javascript('dashboard_model_edit.js', 'openjuice'));
     $uh = Loader::helper('concrete/urls');
     $changeStrs = '$(function(){';
     foreach ($this->ajaxFieldReloads as $field => $reloadField) {
         if (is_array($reloadField)) {
             foreach ($reloadField as $theReloadField) {
                 $changeStrs .= "\$('#{$field}').change(function(){refreshField('{$theReloadField}',\$(this).closest('form'))});\n";
             }
         } else {
             $changeStrs .= "\$('#{$field}').change(function(){refreshField('{$reloadField}',\$(this).closest('form'))});\n";
         }
     }
     foreach ($this->ajaxFieldGroupReloads as $field => $reloadFieldGroup) {
         $changeStrs .= "\$('#{$field}').change(function(){refreshFieldGroup('{$reloadFieldGroup}',\$(this).closest('form'))});\n";
     }
     $changeStrs .= '});';
     $this->addHeaderItem('<script type="text/javascript">window.renderFieldUrl="' . View::url($this->c->getCollectionPath() . '/refreshField') . '";window.renderFieldGroupUrl="' . View::url($this->c->getCollectionPath() . '/refreshFieldGroup') . '";' . $changeStrs . '</script>');
 }
Exemplo n.º 19
0
	public function view($themeID = false, $state = false) {
		$pt = PageTheme::getByID($themeID);
		if ($themeID == false || (!is_object($pt))) {
			$this->redirect('/dashboard/pages/themes');
		}
		if (is_object($pt)) {
			$styles = $pt->getEditableStylesList();
			$this->set('styles', $styles);
			$this->set('themeID', $themeID);
		 	Cache::delete('preview_theme_style', $themeID);
		}
		$subnav = array(
			array(View::url('/dashboard/pages/themes/'), '&lt; ' . t('Return to Themes'))
		);
		$this->set('subnav', $subnav);		
		if ($state == 'saved') {
			$this->set('message', t('Theme styles updated.'));
		} else if ($state == 'reset') {
			$this->set('message', t('This theme has been reset.'));
		}
	}
Exemplo n.º 20
0
		if(!$realPilesCounter){
			print t('You have no items in your scrapbook.');
		} 		
		?>
		</div>
		
	
	</div>

<? }else{ ?>

	<h1><span><?=htmlentities($scrapbookName, ENT_QUOTES, APP_CHARSET) ?></span></h1>
	
	<div class="ccm-dashboard-inner"> 

		<a style="float: right" href="<?=View::url($cPath) ?>"><?= t("&laquo; Return to Scrapbook List") ?></a>		
		
		<div class="sillyIE7"><?= $ih->button_js( t('Add Block to Scrapbook'), 'GlobalScrapbook.addBlock(event)','left'); ?></div>
		
		<div class="ccm-spacer"></div>	
		
		<div id="ccm-scrapbook-list" class="ui-sortable">			
			<? 		 			
			if( !count($globalScrapbookBlocks) ){
				echo t('You have no items in this scrapbook.');
			}else foreach($globalScrapbookBlocks as $b) {
				 $b->setBlockAreaObject($globalScrapbookArea);
				 $bv = new BlockView();
				 $bt = BlockType::getByID( $b->getBlockTypeID() ); 
				 $bp = new Permissions($b);
				 $btIcon = $ci->getBlockTypeIconURL($bt); 			 
Exemplo n.º 21
0
<?php

defined('C5_EXECUTE') or die("Access Denied.");
$form = Loader::helper('form');
$node = \Concrete\Core\Tree\Node\Node::getByID(Loader::helper('security')->sanitizeInt($_REQUEST['treeNodeID']));
$np = new Permissions($node);
$tree = $node->getTreeObject();
$canEdit = is_object($node) && $node->getTreeNodeTypeHandle() == 'topic' && $np->canEditTreeNode();
$url = View::url('/dashboard/system/attributes/topics', 'update_topic_node');
$al = Loader::helper("concrete/asset_library");
if ($canEdit) {
    ?>

	<div class="ccm-ui">
		<form method="post" data-topic-form="update-topic-node" class="form-horizontal" action="<?php 
    echo $url;
    ?>
">
			<?php 
    echo Loader::helper('validation/token')->output('update_topic_node');
    ?>
			<input type="hidden" name="treeNodeID" value="<?php 
    echo $node->getTreeNodeID();
    ?>
" />
			<div class="form-group">
				<?php 
    echo $form->label('treeNodeTopicName', t('Topic'));
    ?>
				<?php 
    echo $form->text('treeNodeTopicName', $node->getTreeNodeDisplayName(), array('class' => 'span4'));
Exemplo n.º 22
0
<?php

defined('C5_EXECUTE') or die("Access Denied.");
$subject = $site . " " . t("Registration - Validate Email Address");
$body = t("\n\nYou must click the following URL in order to activate your account for %s:\n\n%s \n\nThanks for your interest in %s\n\n", $site, View::url('/login', 'callback', 'concrete', 'v', $uHash), $site);
 public function forgot_password()
 {
     $loginData['success'] = 0;
     $vs = Loader::helper('validation/strings');
     $em = $this->post('uEmail');
     try {
         if (!$vs->email($em)) {
             throw new Exception(t('Invalid email address.'));
         }
         $oUser = UserInfo::getByEmail($em);
         if (!$oUser) {
             throw new Exception(t('We have no record of that email address.'));
         }
         $mh = Loader::helper('mail');
         //$mh->addParameter('uPassword', $oUser->resetUserPassword());
         $mh->addParameter('uName', $oUser->getUserName());
         $mh->to($oUser->getUserEmail());
         //generate hash that'll be used to authenticate user, allowing them to change their password
         $h = Loader::helper('validation/identifier');
         $uHash = $h->generate('UserValidationHashes', 'uHash');
         $db = Loader::db();
         $db->Execute("DELETE FROM UserValidationHashes WHERE uID=?", array($oUser->uID));
         $db->Execute("insert into UserValidationHashes (uID, uHash, uDateGenerated, type) values (?, ?, ?, ?)", array($oUser->uID, $uHash, time(), intval(UVTYPE_CHANGE_PASSWORD)));
         $changePassURL = BASE_URL . View::url('/login', 'change_password', $uHash);
         $mh->addParameter('changePassURL', $changePassURL);
         if (defined('EMAIL_ADDRESS_FORGOT_PASSWORD')) {
             $mh->from(EMAIL_ADDRESS_FORGOT_PASSWORD, t('Forgot Password'));
         } else {
             $adminUser = UserInfo::getByID(USER_SUPER_ID);
             if (is_object($adminUser)) {
                 $mh->from($adminUser->getUserEmail(), t('Forgot Password'));
             }
         }
         $mh->load('forgot_password');
         @$mh->sendMail();
         $loginData['success'] = 1;
         $loginData['msg'] = $this->getPasswordSentMsg();
     } catch (Exception $e) {
         $this->error->add($e);
         $loginData['error'] = $e->getMessage();
     }
     if ($_REQUEST['format'] == 'JSON') {
         $jsonHelper = Loader::helper('json');
         echo $jsonHelper->encode($loginData);
         die;
     }
     if ($loginData['success'] == 1) {
         $this->redirect('/login', 'password_sent');
     }
 }
Exemplo n.º 24
0
<?php 
} elseif (in_array($controller->getTask(), $groupViews)) {
    ?>

    <?php 
    if ($grouplist) {
        ?>
        <h3><?php 
        echo t("Groups");
        ?>
</h3>
        <ul class="list-unstyled group-list" data-delete-url="<?php 
        echo View::url('/dashboard/store/products/deletegroup');
        ?>
" data-save-url="<?php 
        echo View::url('/dashboard/store/products/editgroup');
        ?>
">
            <?php 
        foreach ($grouplist as $groupItem) {
            $group = VividProductGroup::getByID($groupItem->getGroupID());
            ?>

                <li data-group-id="<?php 
            echo $group->getGroupID();
            ?>
">
                    <span class="group-name"><?php 
            echo $group->getGroupName();
            ?>
</span>
Exemplo n.º 25
0
    ?>
</p>
	
	<?php 
    if (isset($error)) {
        ?>
		<div class="ccm-error-response"><?php 
        echo $error;
        ?>
</div>
	<?php 
    }
    ?>
	
	<form action="<?php 
    echo View::url('/download_file', 'submit_password', $fID);
    ?>
" method="post">
		<input type="hidden" value="<?php 
    echo $returnURL;
    ?>
" name="returnURL" />
		<input type="hidden" value="<?php 
    echo $rcID;
    ?>
" name="rcID"/>
		<label for="password"><?php 
    echo t('Password');
    ?>
: <input type="text" name="password" /></label>
		<br /><br />
Exemplo n.º 26
0
	$('a[data-button=assign-groups]').dialog();

});
</script>
<? } else {

	$tp = Loader::helper('concrete/user');
	if ($tp->canAccessUserSearchInterface()) { ?>
		<div class="ccm-dashboard-content-full" data-search="users">
		<? Loader::element('users/search', array('controller' => $searchController))?>
		</div>

		<div class="ccm-dashboard-header-buttons">
			<a href="<?php 
echo View::url('/dashboard/users/add');
?>
" class="btn btn-primary"><?php 
echo t("Add User");
?>
</a>
		</div>

	<? } else { ?>
		<p><?php 
echo t('You do not have access to user search. This setting may be changed in the access section of the dashboard settings page.');
?>
</p>
	<? } ?>

<? } ?>
Exemplo n.º 27
0
            ?>
" /></td>
					<td class="ccm-addon-list-description"><h3><?php 
            echo $pkg->getPackageName();
            ?>
</h3><p><?php 
            echo $pkg->getPackageDescription();
            ?>
</p>
					<p><strong><?php 
            echo t('New Version: %s. Upgrading from: %s.', $pkg->getPackageVersion(), $pkg->getPackageCurrentlyInstalledVersion());
            ?>
</strong></p>
					</td>
					<td class="ccm-marketplace-list-install-button"><?php 
            echo $ch->button(t("Update Add-On"), View::url('/dashboard/extend/update', 'do_update', $pkg->getPackageHandle()), "", "btn-primary");
            ?>
</td>
				</tr>
				<tr>
					<td colspan="2" style="border-top: 0px">
						<?php 
            $versionHistory = $pkg->getChangelogContents();
            ?>
						<?php 
            if (trim($versionHistory) != '') {
                ?>
							<div class="ccm-marketplace-update-changelog">
								<h6><?php 
                echo t('Version History');
                ?>
Exemplo n.º 28
0
	<td><strong><?php 
echo t('URL to File');
?>
</strong></td>
	<td width="100%" colspan="2"><?php 
echo $fv->getRelativePath(true);
?>
</td>
</tr>
<tr>
	<td><strong><?php 
echo t('Download URL');
?>
</strong></td>
	<td width="100%" colspan="2"><?php 
echo h(BASE_URL . View::url('/download_file', $fv->getFileID()));
?>
</td>
</tr>

<?php 
$oc = $f->getOriginalPageObject();
if (is_object($oc)) {
    $fileManager = Page::getByPath('/dashboard/files/search');
    $ocName = $oc->getCollectionName();
    if (is_object($fileManager) && !$fileManager->isError()) {
        if ($fileManager->getCollectionID() == $oc->getCollectionID()) {
            $ocName = t('Dashboard File Manager');
        }
    }
    ?>
Exemplo n.º 29
0
        echo $g->getGroupDisplayName();
        ?>
					</label>
					</div>
				</div>
				</div>
	        <?php 
    }
}
?>
        </fieldset>
	<?php 
echo $token->output('submit');
?>

	<div class="ccm-dashboard-form-actions-wrapper">
	<div class="ccm-dashboard-form-actions">
		<a href="<?php 
echo View::url('/dashboard/users/search');
?>
" class="btn btn-default pull-left"><?php 
echo t('Cancel');
?>
</a>
		<?php 
echo Loader::helper("form")->submit('add', t('Add'), array('class' => 'btn btn-primary pull-right'));
?>
	</div>
	</div>
    </form>
Exemplo n.º 30
0
 protected function replaceDownloadFileIDInEditMode($match)
 {
     $fID = $match[1];
     if ($fID > 0) {
         return View::url('/download_file', 'view', $fID);
     }
 }