Ejemplo n.º 1
0
        ?>
" />
						<?php 
    }
    ?>
					</td>
					<td><?php 
    echo html_output($row["name"]);
    ?>
</td>
					<td><?php 
    echo html_output($row["user"]);
    ?>
</td>
					<td><?php 
    echo html_output($row["email"]);
    ?>
</td>
					<td><?php 
    switch (html_entity_decode($row["level"])) {
        case '9':
            echo USER_ROLE_LVL_9;
            break;
        case '8':
            echo USER_ROLE_LVL_8;
            break;
        case '7':
            echo USER_ROLE_LVL_7;
            break;
    }
    ?>
Ejemplo n.º 2
0
    $status_filter = $_POST['activity'];
    $params[':status'] = $status_filter;
    $no_results_error = 'filter';
}
$cq .= " ORDER BY id DESC";
$sql = $dbh->prepare($cq);
$sql->execute($params);
$count = $sql->rowCount();
?>

	<div class="form_actions_left">
		<div class="form_actions_limit_results">
			<form action="actions-log.php" name="log_search" method="post" class="form-inline">
				<input type="text" name="search" id="search" value="<?php 
if (isset($_POST['search']) && !empty($_POST['search'])) {
    echo html_output($_POST['search']);
}
?>
" class="txtfield form_actions_search_box" />
				<button type="submit" id="btn_proceed_search" class="btn btn-small"><?php 
_e('Search', 'cftp_admin');
?>
</button>
			</form>

			<form action="actions-log.php" name="actions_filters" method="post" class="form-inline">
				<select name="activity" id="activity" class="txtfield" style="width:360px;">
					<option value="all"><?php 
_e('All activities', 'cftp_admin');
?>
</option>
Ejemplo n.º 3
0
" class="btn btn-small <?php 
        echo $groups_button;
        ?>
"><?php 
        _e('View groups', 'cftp_admin');
        ?>
</a>
										<a href="my_files/?client=<?php 
        echo html_output($row["user"]);
        ?>
" class="btn btn-primary btn-small" target="_blank"><?php 
        _e('View as client', 'cftp_admin');
        ?>
</a>
										<a href="clients-edit.php?id=<?php 
        echo html_output($row["id"]);
        ?>
" class="btn btn-primary btn-small"><?php 
        _e('Edit', 'cftp_admin');
        ?>
</a>
									</td>
								</tr>
					<?php 
    }
}
?>
				</tbody>
			</table>

			<div class="pagination pagination-centered hide-if-no-paging"></div>
Ejemplo n.º 4
0
        } else {
            if ($current_level != '0') {
                ?>
												<td>
													<a href="javascript:void(0);" class="<?php 
                if ($download_count > 0) {
                    echo 'downloaders btn-primary';
                } else {
                    echo 'disabled';
                }
                ?>
 btn btn-small" rel="<?php 
                echo $row["id"];
                ?>
" title="<?php 
                echo html_output($row['filename']);
                ?>
">
														<?php 
                echo $download_count;
                ?>
 <?php 
                _e('downloads', 'cftp_admin');
                ?>
													</a>
												</td>
									<?php 
            }
        }
        ?>
									<td>
Ejemplo n.º 5
0
					</td>
					<td>
						<?php 
    if (isset($files_amount[$row['id']])) {
        echo $files_amount[$row['id']];
    } else {
        echo '0';
    }
    ?>
					</td>
					<td><?php 
    echo html_output($row["created_by"]);
    ?>
</td>
					<td data-value="<?php 
    echo html_output($row['timestamp']);
    ?>
">
						<?php 
    echo $date;
    ?>
					</td>
					<td>
						<a href="manage-files.php?group_id=<?php 
    echo $row["id"];
    ?>
" class="btn btn-primary btn-small"><?php 
    _e('Manage files', 'cftp_admin');
    ?>
</a>
						<a href="groups-edit.php?id=<?php 
 public function new_ticket_note($array)
 {
     global $db;
     $users =& singleton::get(__NAMESPACE__ . '\\users');
     $mailer =& singleton::get(__NAMESPACE__ . '\\mailer');
     $config =& singleton::get(__NAMESPACE__ . '\\config');
     $tickets =& singleton::get(__NAMESPACE__ . '\\tickets');
     $pushover =& singleton::get(__NAMESPACE__ . '\\pushover');
     if (!isset($array['ticket_id'])) {
         return false;
     }
     $tickets_array = $tickets->get(array('id' => (int) $array['ticket_id'], 'get_other_data' => true));
     if (count($tickets_array) == 1) {
         $ticket = $tickets_array[0];
         //global pushover notice
         if ($config->get('pushover_enabled')) {
             $pushover_users = $config->get('pushover_notify_users');
             if (!empty($pushover_users)) {
                 $send_pushover_users = $users->get(array('ids' => $pushover_users));
                 if (!empty($send_pushover_users)) {
                     foreach ($send_pushover_users as $item) {
                         $pushover_array = array('user' => $item['pushover_key'], 'title' => $ticket['subject']);
                         $pushover_array['message'] = strip_tags($array['description']);
                         $pushover_array['url'] = $config->get('address') . '/tickets/view/' . $ticket['id'] . '/';
                         $pushover_array['url_title'] = 'View Ticket';
                         $pushover->queue($pushover_array);
                         unset($pushover_array);
                     }
                 }
             }
         }
         $template_subject = $config->get('notification_new_ticket_note_subject');
         $subject_temp = str_replace('#SITE_NAME#', $config->get('name'), $template_subject);
         $subject_temp = str_replace('#TICKET_SUBJECT#', safe_output($ticket['subject']), $subject_temp);
         $email_array['subject'] = $subject_temp;
         $template_body = $config->get('notification_new_ticket_note_body');
         $body_temp = str_replace('#SITE_NAME#', $config->get('name'), $template_body);
         $body_temp = str_replace('#SITE_ADDRESS#', $config->get('address'), $body_temp);
         $body_temp = str_replace('#TICKET_KEY#', '[TID:' . $ticket['key'] . '-' . $ticket['id'] . ']', $body_temp);
         $body_temp = str_replace('#TICKET_SUBJECT#', safe_output($ticket['subject']), $body_temp);
         $body_temp = str_replace('#TICKET_ID#', $ticket['id'], $body_temp);
         if (isset($array['html']) && $array['html'] == 1) {
             $body_temp = str_replace('#TICKET_NOTE_DESCRIPTION#', html_output($array['description']), $body_temp);
         } else {
             $body_temp = str_replace('#TICKET_NOTE_DESCRIPTION#', nl2br($array['description']), $body_temp);
         }
         if ($config->get('guest_portal') && !empty($ticket['access_key'])) {
             $body_temp = str_replace('#GUEST_URL#', '<a href="' . $config->get('address') . '/guest/ticket_view/' . $ticket['id'] . '/?access_key=' . safe_output($ticket['access_key']) . '">View Ticket</a>', $body_temp);
         } else {
             $body_temp = str_replace('#GUEST_URL#', '', $body_temp);
         }
         $email_array['body'] = $body_temp;
         $email_array['html'] = true;
         if (isset($ticket['pop_account_id'])) {
             $email_array['pop_account_id'] = $ticket['pop_account_id'];
         }
         //send email to ticket owner
         if (!empty($ticket['owner_email']) && $ticket['owner_email_notifications'] == 1) {
             $email_array['to']['to'] = $ticket['owner_email'];
             $email_array['to']['to_name'] = $ticket['owner_name'];
             $mailer->queue_email($email_array);
             if (!empty($ticket['owner_pushover_key']) && $config->get('pushover_enabled') && $config->get('pushover_user_enabled')) {
                 $pushover_array = array('user' => $ticket['owner_pushover_key'], 'title' => $email_array['subject']);
                 $pushover_array['message'] = strip_tags($array['description']);
                 if ($config->get('guest_portal')) {
                     $pushover_array['url'] = $config->get('address') . '/guest/ticket_view/' . $ticket['id'] . '/?access_key=' . safe_output($ticket['access_key']);
                     $pushover_array['url_title'] = 'View Ticket';
                 }
                 $pushover->queue($pushover_array);
             }
         } else {
             if ($config->get('anonymous_tickets_reply') && !empty($ticket['email'])) {
                 $email_array['to']['to'] = $ticket['email'];
                 $email_array['to']['to_name'] = $ticket['name'];
                 $mailer->queue_email($email_array);
             }
         }
         //send email to ticket assigned user
         if (!empty($ticket['assigned_email']) && $ticket['assigned_email_notifications'] == 1) {
             $email_array['to']['to'] = $ticket['assigned_email'];
             $email_array['to']['to_name'] = $ticket['assigned_name'];
             $mailer->queue_email($email_array);
             if (!empty($ticket['assigned_pushover_key']) && $config->get('pushover_enabled') && $config->get('pushover_user_enabled')) {
                 $pushover_array = array('user' => $ticket['assigned_pushover_key'], 'title' => $email_array['subject']);
                 $pushover_array['message'] = strip_tags($array['description']);
                 $pushover_array['url'] = $config->get('address') . '/tickets/view/' . $ticket['id'] . '/';
                 $pushover_array['url_title'] = 'View Ticket';
                 $pushover->queue($pushover_array);
             }
         }
     } else {
         return false;
     }
 }
Ejemplo n.º 7
0
" class="file_title" placeholder="<?php 
        _e('Enter here the required file title.', 'cftp_admin');
        ?>
" />
												<label><?php 
        _e('Description', 'cftp_admin');
        ?>
</label>
												<textarea name="file[<?php 
        echo $i;
        ?>
][description]" placeholder="<?php 
        _e('Optionally, enter here a description for the file.', 'cftp_admin');
        ?>
"><?php 
        echo !empty($row['description']) ? html_output($row['description']) : '';
        ?>
</textarea>
											</div>
										</div>
									</div>
									<?php 
        /** The following options are available to users only */
        if ($global_level != 0) {
            ?>
											<div class="span4 file_data">
												<?php 
            /**
             * Only show the EXPIRY options if the current
             * uploader is a system user, and not a client.
             */
Ejemplo n.º 8
0
                ?>
</div>
							<div class="action">
								<?php 
                if (!empty($rendered['1'])) {
                    echo '<span>' . html_output($rendered['1']) . '</span> ';
                }
                echo html_output($rendered['text']) . ' ';
                if (!empty($rendered['2'])) {
                    echo '<span class="secondary">' . html_output($rendered['2']) . '</span> ';
                }
                if (!empty($rendered['3'])) {
                    echo ' ' . html_output($rendered['3']) . ' ';
                }
                if (!empty($rendered['4'])) {
                    echo '<span>' . html_output($rendered['4']) . '</span> ';
                }
                ?>
							</div>
						</div>
					</li>
				<?php 
            }
        } else {
            ?>
				<li><?php 
            _e('There are no results', 'cftp_admin');
            ?>
</li>
			<?php 
        }
Ejemplo n.º 9
0
?>
 password_toggle" type="password" maxlength="<?php 
echo MAX_PASS_CHARS;
?>
" />
			<?php 
password_notes();
?>
		</li>
		<li>
			<label for="add_user_form_email"><?php 
_e('E-mail', 'cftp_admin');
?>
</label>
			<input type="text" name="add_user_form_email" id="add_user_form_email" class="required" value="<?php 
echo isset($add_user_data_email) ? html_output(stripslashes($add_user_data_email)) : '';
?>
" placeholder="<?php 
_e("Must be valid and unique", 'cftp_admin');
?>
" />
		</li>
		<?php 
if ($extra_fields == true) {
    ?>
			<li>
				<label for="add_user_form_level"><?php 
    _e('Role', 'cftp_admin');
    ?>
</label>
				<select name="add_user_form_level" id="add_user_form_level">
Ejemplo n.º 10
0
					});
				</script>
	
	<?php 
    } else {
        /** No files found */
        ?>
				<div class="whitebox whiteform whitebox_text">
					<p><?php 
        _e('There are no files available to add right now.', 'cftp_admin');
        ?>
</p>
					<p>
						<?php 
        _e('To use this feature you need to upload your files via FTP to the folder', 'cftp_admin');
        echo ' <strong>' . html_output($work_folder) . '</strong>.';
        ?>
					</p>
					<p><?php 
        _e('This is the same folder where the files uploaded by the web interface will be stored. So if you finish uploading your files but do not assign them to any clients/groups, the files will still be there for later use.', 'cftp_admin');
        ?>
</p>
				</div>
			<?php 
    }
}
/** End if for users count */
?>

</div>
Ejemplo n.º 11
0
        $chars = addslashes($validation_valid_chars);
        echo $validation_valid_pass . " " . $chars;
        ?>
');
									
												// show the errors or continue if everything is ok
												if (show_form_errors() == false) { return false; }
											});
										});
									</script>
									
									<form action="reset-password.php?token=<?php 
        echo html_output($got_token);
        ?>
&user=<?php 
        echo html_output($got_user);
        ?>
" name="newpassword" method="post" role="form">
										<fieldset>
											<input type="hidden" name="form_type" id="form_type" value="new_password" />

											<label class="control-label" for="reset_password_new"><?php 
        _e('New password', 'cftp_admin');
        ?>
</label>

											<input type="password" name="reset_password_new" id="reset_password_new" class="span3 password_toggle" />
											<button type="button" class="btn password_toggler pass_toggler_show"><i class="icon-eye-open"></i></button>
											<?php 
        password_notes();
        ?>
Ejemplo n.º 12
0
			<div class="list_mass_members">
				<a href="#" class="btn add-all"><?php 
_e('Add all', 'cftp_admin');
?>
</a>
				<a href="#" class="btn remove-all"><?php 
_e('Remove all', 'cftp_admin');
?>
</a>
			</div>
		</li>
	</ul>

	<div class="inside_form_buttons">
		<button type="submit" name="submit" class="btn btn-wide btn-primary"><?php 
echo html_output($submit_value);
?>
</button>
	</div>
</form>

<script type="text/javascript">
	$(document).ready(function() {
		$('.chosen-select').chosen({
			no_results_text	: "<?php 
_e('No results where found.', 'cftp_admin');
?>
",
			search_contains	: true
		});
Ejemplo n.º 13
0
		</div>
		
		<div id="menu">
			<p class="welcome">
				<?php 
_e('Welcome', 'pinboxes_template');
?>
, <?php 
echo html_output($client_info['name']);
?>
			</p>
			<ul>
				<li id="search_box">
					<form action="" name="files_search" method="post">
						<input type="text" name="search" id="search_text" value="<?php 
echo isset($_POST['search']) && !empty($_POST['search']) ? html_output($_POST['search']) : '';
?>
" placeholder="<?php 
_e('Search...', 'pinboxes_template');
?>
">
						<input type="submit" id="search_go" value="<?php 
_e('Search', 'pinboxes_template');
?>
" />
					</form>
				</li><li>
				<a href="<?php 
echo BASE_URI;
?>
upload-from-computer.php" target="_self"><?php 
Ejemplo n.º 14
0
											<label for="max_logo_width"><?php 
_e('Max width', 'cftp_admin');
?>
</label>
											<input type="text" name="max_logo_width" id="max_logo_width" value="<?php 
echo html_output(LOGO_MAX_WIDTH);
?>
" />
										</div>
										<div class="options_col_right">
											<label for="max_logo_height"><?php 
_e('Max height', 'cftp_admin');
?>
</label>
											<input type="text" name="max_logo_height" id="max_logo_height" value="<?php 
echo html_output(LOGO_MAX_HEIGHT);
?>
" />
										</div>
									</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
	
				<div class="after_form_buttons">
					<button type="submit" class="btn btn-wide btn-primary empty"><?php 
_e('Update all options', 'cftp_admin');
?>
</button>
Ejemplo n.º 15
0
/**
 * Returns an HTML string in a safe and styled way to output to HTML
 *
 * @param   string   	$string 	The string to make safe
 * @return  string					The safe string
 */
function message($string)
{
    return '<div class="message">' . html_output($string) . '</div>';
}
Ejemplo n.º 16
0
																<optgroup label="<?php 
                    _e('Groups', 'cftp_admin');
                    ?>
">
																	<?php 
                    /**
                     * The groups list is generated early on the file so the
                     * array doesn't need to be made once on every file.
                     */
                    foreach ($groups as $group => $group_name) {
                        ?>
																			<option value="<?php 
                        echo html_output('g' . $group);
                        ?>
"><?php 
                        echo html_output($group_name);
                        ?>
</option>
																		<?php 
                    }
                    ?>
																</optgroup>
															</select>
															<div class="list_mass_members">
																<a href="#" class="btn btn-info add-all"><?php 
                    _e('Add all', 'cftp_admin');
                    ?>
</a>
																<a href="#" class="btn btn-info remove-all"><?php 
                    _e('Remove all', 'cftp_admin');
                    ?>
Ejemplo n.º 17
0
    foreach ($feed->channel->item as $item) {
        if ($n < $max_news) {
            ?>
								<li>
									<span class="date"><?php 
            echo date(TIMEFORMAT_USE, strtotime($item->pubDate));
            ?>
</span>
									<a href="<?php 
            echo html_output($item->link);
            ?>
" target="_blank">
										<h5><?php 
            echo html_output($item->title);
            ?>
</h5>
									</a>
									<p><?php 
            echo make_excerpt(html_output(strip_tags($item->description, '<br />')), 200);
            ?>
								</li>
						<?php 
            $n++;
        }
    }
    ?>
				</ul>
			</div>
		</div>
<?php 
}
Ejemplo n.º 18
0
}
$var['title'] = $var['title'] . " - " . $var['page_title'];
// get keywords
if ($xmlParser->match("//meta[@name='KEYWORDS']")) {
    $var['keywords'] = $var['keywords'] . "," . $xmlParser->getData("//meta[@name='KEYWORDS']/attribute::content");
}
// get describtion
if ($xmlParser->match("//meta[@name='DESCRIBTION']")) {
    $var['describtion'] = $xmlParser->getData("//meta[@name='DESCRIBTION']/attribute::content");
}
// generating content
$var['file_ext'] = extractFileExt($var['filename']);
switch ($var['file_ext']) {
    case "html":
    case "xhtml":
        $var['content'] = html_output($xmlParser);
        break;
    case "xml":
        $var['content'] = generateContentFromXml($xmlParser);
        break;
}
// category directory stuff
if (file_exists($var['catdir'] . "/directory.xml")) {
    // generate some stuff with directory.xml
    $xmlParser = new XPath($var['catdir'] . "/directory.xml");
    // get category name
    $var['category'] = getCategoryName($xmlParser, $catdir);
    // generate (sub)menu
    if ($xmlParser->match("/directory[1]/menu[1]")) {
        $var['catmenu'] = menuFromXml($xmlParser->exportAsXml("/directory[1]/menu[1]"), $var['catdir']);
    } else {