30 require_once(
"../class/config.php");
31 include_once(
"head.php");
32 include_once(
"piwik_utils.php");
35 "site_id" => array (
"request",
"integer", -1),
36 "right" => array (
"post",
"array", FALSE),
45 if ($right !== FALSE) {
48 $error = _(
"You don't own this piwik site!");
51 foreach ($right AS
$user => $cred)
56 $error = sprintf(
'%s "%s"', _(
'You dont own user'),
$user);
61 printf (
"%s -> %s<br />\n",
$user, $cred);
62 if (!$piwik->site_set_user_right($site_id,
$user, $cred)) {
72 echo
"<p class=\"alert alert-danger\">$error</p>";
76 if ($quota->cancreate(
"piwik")) {
77 $quotapiwik=$quota->getquota(
'piwik');
80 if ($quotapiwik[
'u']>0) {
83 <h3><?php
__(
"Add a new website");?></h3>
84 <form method=
"post" action=
"piwik_addsites.php" id=
"main" name=
"addsites" >
85 <input type=
"text" class=
"int" name=
"site_urls" size=
"50" id=
"site_name" maxlength=
"255" value=
"" placeholder=
"<?php __("URL of the website
")?>"/>
86 <input type=
"submit" name=
"submit" class=
"inb" value=
"<?php __("Create
"); ?>" />
106 <h3><?php
__(
"Existing Piwik monitored websites"); ?></h3>
114 __(
"No existing Piwik websites");
119 <table
class=
"tlist">
120 <tr><th/><th><?php
__(
"Site name");?></th><th align=center><?php
__(
"Site url"); ?></th><th>Javascript Code</th></tr>
127 <tr
class=
"lst_clic<?php echo $col; ?>">
128 <td><div
class=
"ina"><a href=
"/piwik_site_dodel.php?siteid=<?php echo $site->id; ?>"><img src=
"images/delete.png" alt=
"<?php __("Delete
"); ?>" /><?php
__(
"Delete"); ?></a></div></td>
129 <td align=right><?php echo $site->name ?></td>
130 <td><?php echo $site->main_url ?></td>
131 <td><textarea><?php echo $piwik->site_js_tag($site->id); ?></textarea></td>
147 <h3><?php
__(
"Credentials management"); ?></h3>
150 <select name=
"site_id">
154 printf (
'<option value="%d"%s>%s</option>', $site->id, ($site->id == $site_id) ?
' selected ' :
'', $site->name);
158 <input type=
"submit" class=
"inb" value=
"ok" />
164 echo
'<form method="post">';
166 foreach ($piwik->get_users_access_from_site($site_id) AS $piwik_user => $cred) {
167 printf(
"<dt>%s:</dt>\n\t<dd>%s</dd>\n", $piwik_user,
piwik_right_widget(
'right', $piwik_user, $cred));
170 echo
'<input type="submit" name="valid" class="inb" value="' , _(
"submit"),
'" />';
176 <?php include_once(
"foot.php"); ?>