Exemplo n.º 1
0
		<td><?php echo $lang["lastused"];?></td>
		<td><?php echo $lang["expires"];?></td>
		<td><?php echo $lang["access"];?></td>
		<td><div class="ListTools"><?php echo $lang["tools"]?></div></td>
		</tr>
		<?php
		for ($n=0;$n<count($keys);$n++)
			{
			?>
			<tr>
			<td><div class="ListTitle"><a target="_blank" href="<?php echo $baseurl . "?c=" . urlencode($ref) . "&k=" . urlencode($keys[$n]["access_key"]) ?>"><?php echo htmlspecialchars($keys[$n]["access_key"]) ?></a></div></td>
			<td><?php echo htmlspecialchars(resolve_users($keys[$n]["users"]))?></td>
			<td><?php echo htmlspecialchars($keys[$n]["emails"]) ?></td>
			<td><?php echo htmlspecialchars(nicedate($keys[$n]["maxdate"],true));	?></td>
			<td><?php echo htmlspecialchars(nicedate($keys[$n]["lastused"],true)); ?></td>
			<td><?php echo htmlspecialchars(($keys[$n]["expires"]=="")?$lang["never"]:nicedate($keys[$n]["expires"],false)) ?></td>
			<td><?php echo htmlspecialchars(($keys[$n]["access"]==-1)?"":$lang["access" . $keys[$n]["access"]]); ?></td>
			<td><div class="ListTools">
			<a href="#" onClick="if (confirm('<?php echo $lang["confirmdeleteaccess"]?>')) {document.getElementById('deleteaccess').value='<?php echo htmlspecialchars($keys[$n]["access_key"]) ?>';document.getElementById('collectionform').submit(); }">&gt;&nbsp;<?php echo $lang["action-delete"]?></a>
			</div></td>
			</tr>
			<?php
			}
		?>
		</table>
		</div>
		<?php
		}
	?>
	</div>	
	
    echo urlencode("!collection" . $collections[$n]["ref"]);
    ?>
" onClick="return CentralSpaceLoad(this);"><?php 
    echo highlightkeywords(i18n_get_collection_name($collections[$n]), $find);
    ?>
</a></div></td>
	<td><?php 
    echo htmlspecialchars(highlightkeywords($colusername, $find));
    ?>
</td>
	<td><?php 
    echo htmlspecialchars(highlightkeywords($collection_prefix . $collections[$n]["ref"], $find));
    ?>
</td>
	<td><?php 
    echo htmlspecialchars(nicedate($collections[$n]["created"], true));
    ?>
</td>
	<td><?php 
    echo htmlspecialchars($collections[$n]["count"]);
    ?>
</td>
<?php 
    if (!$hide_access_column) {
        ?>
	<td><?php 
        # Work out the correct access mode to display
        if (!hook('collectionaccessmode')) {
            if ($collections[$n]["public"] == 0) {
                echo $lang["private"];
            } else {
</td>
            </tr>
            <?php 
if ($no_records) {
    ?>
                <tr><td colspan="10"><b><?php 
    echo $lang['track_field_history_error_no_records'];
    ?>
</b></td></tr>
            <?php 
}
foreach ($field_log_records as $field_log_record) {
    ?>
                <tr>
                    <td nowrap><?php 
    echo nicedate($field_log_record['date'], true, true);
    ?>
</td>
                    <td><?php 
    echo $field_log_record['user'];
    ?>
</td>
                    <td><?php 
    echo nl2br(htmlspecialchars(strip_tags($field_log_record['diff'])));
    ?>
</td>
                </tr>
                <?php 
}
?>
        </table>
 function email_collection($colrefs, $collectionname, $fromusername, $userlist, $message, $feedback, $access = -1, $expires = "", $useremail = "", $from_name = "", $cc = "", $themeshare = false, $themename = "", $themeurlsuffix = "", $list_recipients = false, $add_internal_access = false, $group = "")
 {
     # Attempt to resolve all users in the string $userlist to user references.
     # Add $collection to these user's 'My Collections' page
     # Send them an e-mail linking to this collection
     #  handle multiple collections (comma seperated list)
     global $baseurl, $email_from, $applicationname, $lang, $userref, $email_multi_collections, $usergroup, $attach_user_smart_groups;
     if ($useremail == "") {
         $useremail = $email_from;
     }
     if ($group == "") {
         $group = $usergroup;
     }
     if (trim($userlist) == "") {
         return $lang["mustspecifyoneusername"];
     }
     $userlist = resolve_userlist_groups($userlist);
     if ($attach_user_smart_groups && strpos($userlist, $lang["groupsmart"] . ": ") !== false) {
         $groups_users = resolve_userlist_groups_smart($userlist, true);
         if ($groups_users != '') {
             if ($userlist != "") {
                 $userlist = remove_groups_smart_from_userlist($userlist);
                 if ($userlist != "") {
                     $userlist .= ",";
                 }
             }
             $userlist .= $groups_users;
         }
     }
     $ulist = trim_array(explode(",", $userlist));
     $emails = array();
     $key_required = array();
     if ($feedback) {
         $feedback = 1;
     } else {
         $feedback = 0;
     }
     $reflist = trim_array(explode(",", $colrefs));
     $emails_keys = resolve_user_emails($ulist);
     $emails = $emails_keys['emails'];
     $key_required = $emails_keys['key_required'];
     # Add the collection(s) to the user's My Collections page
     $urefs = sql_array("select ref value from user where username in ('" . join("','", $ulist) . "')");
     if (count($urefs) > 0) {
         # Delete any existing collection entries
         sql_query("delete from user_collection where collection in ('" . join("','", $reflist) . "') and user in ('" . join("','", $urefs) . "')");
         # Insert new user_collection row(s)
         #loop through the collections
         for ($nx1 = 0; $nx1 < count($reflist); $nx1++) {
             #loop through the users
             for ($nx2 = 0; $nx2 < count($urefs); $nx2++) {
                 sql_query("insert into user_collection(collection,user,request_feedback) values ({$reflist[$nx1]}, {$urefs[$nx2]}, {$feedback} )");
                 if ($add_internal_access) {
                     foreach (get_collection_resources($reflist[$nx1]) as $resource) {
                         if (get_edit_access($resource)) {
                             open_access_to_user($urefs[$nx2], $resource, $expires);
                         }
                     }
                 }
                 #log this
                 collection_log($reflist[$nx1], "S", 0, sql_value("select username as value from user where ref = {$urefs[$nx2]}", ""));
             }
         }
     }
     # Send an e-mail to each resolved user
     # htmlbreak is for composing list
     $htmlbreak = "\r\n";
     global $use_phpmailer;
     if ($use_phpmailer) {
         $htmlbreak = "<br><br>";
         $htmlbreaksingle = "<br>";
     }
     if ($fromusername == "") {
         $fromusername = $applicationname;
     }
     // fromusername is used for describing the sender's name inside the email
     if ($from_name == "") {
         $from_name = $applicationname;
     }
     // from_name is for the email headers, and needs to match the email address (app name or user name)
     $templatevars['message'] = str_replace(array("\\n", "\\r", "\\"), array("\n", "\r", ""), $message);
     if (trim($templatevars['message']) == "") {
         $templatevars['message'] = $lang['nomessage'];
     }
     $templatevars['fromusername'] = $fromusername;
     $templatevars['from_name'] = $from_name;
     if (count($reflist) > 1) {
         $subject = $applicationname . ": " . $lang['mycollections'];
     } else {
         $subject = $applicationname . ": " . $collectionname;
     }
     if ($fromusername == "") {
         $fromusername = $applicationname;
     }
     $externalmessage = $lang["emailcollectionmessageexternal"];
     $internalmessage = $lang["emailcollectionmessage"];
     $viewlinktext = $lang["clicklinkviewcollection"];
     if ($themeshare) {
         $externalmessage = $lang["emailthemecollectionmessageexternal"];
         $internalmessage = $lang["emailthememessage"];
         $viewlinktext = $lang["clicklinkviewcollections"];
     }
     ##  loop through recipients
     for ($nx1 = 0; $nx1 < count($emails); $nx1++) {
         ## loop through collections
         $list = "";
         $list2 = "";
         $origviewlinktext = $viewlinktext;
         // Save this text as we may change it for internal theme shares for this user
         if ($themeshare && !$key_required[$nx1]) {
             $url = "";
             $subject = $applicationname . ": " . $themename;
             $url = $baseurl . "/pages/themes.php" . $themeurlsuffix;
             $viewlinktext = $lang["clicklinkviewthemes"];
             $emailcollectionmessageexternal = false;
             if ($use_phpmailer) {
                 $link = "<a href=\"{$url}\">" . $themename . "</a>";
                 $list .= $htmlbreak . $link;
                 // alternate list style
                 $list2 .= $htmlbreak . $themename . ' -' . $htmlbreaksingle . $url;
                 $templatevars['list2'] = $list2;
             } else {
                 $list .= $htmlbreak . $url;
             }
             for ($nx2 = 0; $nx2 < count($reflist); $nx2++) {
                 #log this
                 collection_log($reflist[$nx2], "E", 0, $emails[$nx1]);
             }
         } else {
             for ($nx2 = 0; $nx2 < count($reflist); $nx2++) {
                 $url = "";
                 $key = "";
                 $emailcollectionmessageexternal = false;
                 # Do we need to add an external access key for this user (e-mail specified rather than username)?
                 if ($key_required[$nx1]) {
                     $k = generate_collection_access_key($reflist[$nx2], $feedback, $emails[$nx1], $access, $expires, $group);
                     $key = "&k=" . $k;
                     $emailcollectionmessageexternal = true;
                 }
                 $url = $baseurl . "/?c=" . $reflist[$nx2] . $key;
                 $collection = array();
                 $collection = sql_query("select name,savedsearch from collection where ref='{$reflist[$nx2]}'");
                 if ($collection[0]["name"] != "") {
                     $collection_name = i18n_get_collection_name($collection[0]);
                 } else {
                     $collection_name = $reflist[$nx2];
                 }
                 if ($use_phpmailer) {
                     $link = "<a href=\"{$url}\">{$collection_name}</a>";
                     $list .= $htmlbreak . $link;
                     // alternate list style
                     $list2 .= $htmlbreak . $collection_name . ' -' . $htmlbreaksingle . $url;
                     $templatevars['list2'] = $list2;
                 } else {
                     $list .= $htmlbreak . $collection_name . $htmlbreak . $url . $htmlbreak;
                 }
                 #log this
                 collection_log($reflist[$nx2], "E", 0, $emails[$nx1]);
             }
         }
         //$list.=$htmlbreak;
         $templatevars['list'] = $list;
         $templatevars['from_name'] = $from_name;
         if (isset($k)) {
             if ($expires == "") {
                 $templatevars['expires_date'] = $lang["email_link_expires_never"];
                 $templatevars['expires_days'] = $lang["email_link_expires_never"];
             } else {
                 $day_count = round((strtotime($expires) - strtotime('now')) / (60 * 60 * 24));
                 $templatevars['expires_date'] = $lang['email_link_expires_date'] . nicedate($expires);
                 $templatevars['expires_days'] = $lang['email_link_expires_days'] . $day_count;
                 if ($day_count > 1) {
                     $templatevars['expires_days'] .= " " . $lang['expire_days'] . ".";
                 } else {
                     $templatevars['expires_days'] .= " " . $lang['expire_day'] . ".";
                 }
             }
         } else {
             # Set empty expiration tempaltevars
             $templatevars['expires_date'] = '';
             $templatevars['expires_days'] = '';
         }
         if ($emailcollectionmessageexternal) {
             $template = $themeshare ? "emailthemeexternal" : "emailcollectionexternal";
         } else {
             $template = $themeshare ? "emailtheme" : "emailcollection";
         }
         if (count($emails > 1) && $list_recipients === true) {
             $body = $lang["list-recipients"] . "\n" . implode("\n", $emails) . "\n\n";
             $templatevars['list-recipients'] = $lang["list-recipients"] . "\n" . implode("\n", $emails) . "\n\n";
         } else {
             $body = "";
         }
         $body .= $templatevars['fromusername'] . " " . ($emailcollectionmessageexternal ? $externalmessage : $internalmessage) . "\n\n" . $templatevars['message'] . "\n\n" . $viewlinktext . "\n\n" . $templatevars['list'];
         #exit ($body . "<br>" . $viewlinktext);
         send_mail($emails[$nx1], $subject, $body, $fromusername, $useremail, $template, $templatevars, $from_name, $cc);
         $viewlinktext = $origviewlinktext;
     }
     hook("additional_email_collection", "", array($colrefs, $collectionname, $fromusername, $userlist, $message, $feedback, $access, $expires, $useremail, $from_name, $cc, $themeshare, $themename, $themeurlsuffix, $template, $templatevars));
     # Return an empty string (all OK).
     return "";
 }
Exemplo n.º 5
0
<?php if(!hook("replaceemailexpiryselector")){?>
<div class="Question">
<label><?php echo $lang["externalselectresourceexpires"]?></label>
<select name="expires" class="stdwidth">
<?php if($resource_share_expire_never) { ?><option value=""><?php echo $lang["never"]?></option><?php }
				
for ($n=1;$n<=150;$n++)
	{
	$date = time()+(60*60*24*$n);
	$d    = date("D",$date);
	$option_class = '';
	if (($d == "Sun") || ($d == "Sat"))
		{
		$option_class = 'optionWeekend';
		} ?>
	<option class="<?php echo $option_class ?>" value="<?php echo date("Y-m-d",$date)?>"><?php echo nicedate(date("Y-m-d",$date),false,true)?></option>
	<?php
	}
?>
</select>
<div class="clearerleft"> </div>
</div>
<?php } ?>


<?php if (checkperm("x")) {
# Allow the selection of a user group to inherit permissions from for this share (the default is to use the current user's user group).
?>
<div class="Question">
<label for="groupselect"><?php echo $lang["externalshare_using_permissions_from_user_group"] ?></label>
<select id="groupselect" name="usergroup" class="stdwidth">
    ?>
</td>	
	<td><?php 
    echo htmlspecialchars($files[$n]["description"]);
    ?>
&nbsp;</td>	
	<td><?php 
    echo $files[$n]["file_extension"] == "" ? $lang["notuploaded"] : htmlspecialchars(str_replace_formatted_placeholder("%extension", $files[$n]["file_extension"], $lang["cell-fileoftype"]));
    ?>
</td>	
	<td><?php 
    echo formatfilesize($files[$n]["file_size"]);
    ?>
</td>	
	<td><?php 
    echo nicedate($files[$n]["creation_date"], true);
    ?>
</td>
	<?php 
    if (count($alt_types) > 1) {
        ?>
<td><?php 
        echo $files[$n]["alt_type"];
        ?>
</td><?php 
    }
    ?>
	<td><div class="ListTools">
	
	<a href="#" onclick="if (confirm('<?php 
    echo $lang["filedeleteconfirm"];
Exemplo n.º 7
0
function HookLicensemanagerViewCustompanels()
	{
	global $lang,$baseurl_short,$ref,$edit_access;
	
	$licenses=sql_query("select ref,outbound,holder,license_usage,description,expires from resource_license where resource='$ref' order by ref");
	?>
    <!-- Begin Geolocation Section -->
    <div class="RecordBox">
    <div class="RecordPanel">
    <div class="Title"><?php echo $lang["license_management"] ?></div>

    <?php if ($edit_access) { ?>    
    <p>&gt;&nbsp;<a href="<?php echo $baseurl_short ?>plugins/licensemanager/pages/edit.php?ref=new&resource=<?php echo $ref ?>" onClick="return CentralSpaceLoad(this,true);"><?php echo $lang["new_license"] ?></a></p>	
    <?php } ?>
   
	<?php if (count($licenses)>0) { ?>
		<div class="Listview">
		<table border="0" cellspacing="0" cellpadding="0" class="ListviewStyle">
		<tr class="ListviewTitleStyle">
		<td><?php echo $lang["license_id"] ?></a></td>
		<td><?php echo $lang["type"] ?></a></td>
		<td><?php echo $lang["licensor_licensee"] ?></a></td>
		<td><?php echo $lang["indicateusagemedium"] ?></a></td>
		<td><?php echo $lang["description"] ?></a></td>
		<td><?php echo $lang["fieldtitle-expiry_date"] ?></a></td>

		<?php if ($edit_access) { ?>
		<td><div class="ListTools"><?php echo $lang["tools"] ?></div></td>
		<?php } ?>
		
		</tr>
	
		<?php
		foreach ($licenses as $license)
			{
			?>
			<tr>
			<td><?php echo $license["ref"] ?></td>
			<td><?php echo ($license["outbound"]?$lang["outbound"]:$lang["inbound"]) ?></td>
			<td><?php echo $license["holder"] ?></td>
			<td><?php echo $license["license_usage"] ?></td>
			<td><?php echo $license["description"] ?></td>
			<td><?php echo nicedate($license["expires"]) ?></td>
		
			<?php if ($edit_access) { ?>
			<td><div class="ListTools">
			<a href="<?php echo $baseurl_short ?>plugins/licensemanager/pages/edit.php?ref=<?php echo $license["ref"] ?>&resource=<?php echo $ref ?>" onClick="return CentralSpaceLoad(this,true);">&gt;&nbsp;Edit</a>
			<a href="<?php echo $baseurl_short ?>plugins/licensemanager/pages/delete.php?ref=<?php echo $license["ref"] ?>&resource=<?php echo $ref ?>" onClick="return CentralSpaceLoad(this,true);">&gt;&nbsp;Delete</a>
			</div></td>
			<?php } ?>
						
			</tr>
			<?php
			}
		?>
		
		</table>
		</div>
	<?php } ?>

    
    </div>
    <div class="PanelShadow"></div>
    </div>
    <?php
	return false; # Allow further custom panels
	}
Exemplo n.º 8
0
<?php 
    for ($n = 1; $n <= 150; $n++) {
        $date = time() + 60 * 60 * 24 * $n;
        ?>
<option <?php 
        $d = date("D", $date);
        if ($d == "Sun" || $d == "Sat") {
            ?>
style="background-color:#cccccc"<?php 
        }
        ?>
 value="<?php 
        echo date("Y-m-d", $date);
        ?>
"><?php 
        echo nicedate(date("Y-m-d", $date), false, true);
        ?>
</option>
	<?php 
    }
    ?>
</select>
<div class="clearerleft"> </div>
</div>
<?php 
}
?>

<?php 
if ($email_from_user) {
    if ($useremail != "") {
Exemplo n.º 9
0
function HookLicensemanagerViewCustompanels()
{
    global $lang, $baseurl_short, $ref, $edit_access, $k;
    if ($k != "") {
        return false;
    }
    $licenses = sql_query("select ref,outbound,holder,license_usage,description,expires from resource_license where resource='{$ref}' order by ref");
    ?>
    <!-- Begin Geolocation Section -->
    <div class="RecordBox">
    <div class="RecordPanel">
    <div class="Title"><?php 
    echo $lang["license_management"];
    ?>
</div>

    <?php 
    if ($edit_access) {
        ?>
    
    <p>&gt;&nbsp;<a href="<?php 
        echo $baseurl_short;
        ?>
plugins/licensemanager/pages/edit.php?ref=new&resource=<?php 
        echo $ref;
        ?>
" onClick="return CentralSpaceLoad(this,true);"><?php 
        echo $lang["new_license"];
        ?>
</a></p>	
    <?php 
    }
    ?>
   
	<?php 
    if (count($licenses) > 0) {
        ?>
		<div class="Listview">
		<table border="0" cellspacing="0" cellpadding="0" class="ListviewStyle">
		<tr class="ListviewTitleStyle">
		<td><?php 
        echo $lang["license_id"];
        ?>
</a></td>
		<td><?php 
        echo $lang["type"];
        ?>
</a></td>
		<td><?php 
        echo $lang["licensor_licensee"];
        ?>
</a></td>
		<td><?php 
        echo $lang["indicateusagemedium"];
        ?>
</a></td>
		<td><?php 
        echo $lang["description"];
        ?>
</a></td>
		<td><?php 
        echo $lang["fieldtitle-expiry_date"];
        ?>
</a></td>

		<?php 
        if ($edit_access) {
            ?>
		<td><div class="ListTools"><?php 
            echo $lang["tools"];
            ?>
</div></td>
		<?php 
        }
        ?>
		
		</tr>
	
		<?php 
        foreach ($licenses as $license) {
            $license_usage_mediums = trim_array(explode(", ", $license["license_usage"]));
            $translated_mediums = "";
            ?>
			<tr>
			<td><?php 
            echo $license["ref"];
            ?>
</td>
			<td><?php 
            echo $license["outbound"] ? $lang["outbound"] : $lang["inbound"];
            ?>
</td>
			<td><?php 
            echo $license["holder"];
            ?>
</td>
			<td><?php 
            foreach ($license_usage_mediums as $medium) {
                $translated_mediums = $translated_mediums . lang_or_i18n_get_translated($medium, "license_usage-") . ", ";
            }
            $translated_mediums = substr($translated_mediums, 0, -2);
            # Remove the last ", "
            echo $translated_mediums;
            ?>
			</td>
			<td><?php 
            echo $license["description"];
            ?>
</td>
			<td><?php 
            echo nicedate($license["expires"]);
            ?>
</td>
		
			<?php 
            if ($edit_access) {
                ?>
			<td><div class="ListTools">
			<a href="<?php 
                echo $baseurl_short;
                ?>
plugins/licensemanager/pages/edit.php?ref=<?php 
                echo $license["ref"];
                ?>
&resource=<?php 
                echo $ref;
                ?>
" onClick="return CentralSpaceLoad(this,true);">&gt;&nbsp;<?php 
                echo $lang["action-edit"];
                ?>
</a>
			<a href="<?php 
                echo $baseurl_short;
                ?>
plugins/licensemanager/pages/delete.php?ref=<?php 
                echo $license["ref"];
                ?>
&resource=<?php 
                echo $ref;
                ?>
" onClick="return CentralSpaceLoad(this,true);">&gt;&nbsp;<?php 
                echo $lang["action-delete"];
                ?>
</a>
			</div></td>
			<?php 
            }
            ?>
						
			</tr>
			<?php 
        }
        ?>
		
		</table>
		</div>
	<?php 
    }
    ?>

    
    </div>
    <div class="PanelShadow"></div>
    </div>
    <?php 
    return false;
    # Allow further custom panels
}
Exemplo n.º 10
0
    if (!hook("requestlistitems")) {
        ?>
	<td><?php 
        echo $requests[$n]["ref"];
        ?>
</td>
	<td><?php 
        echo $requests[$n]["username"];
        ?>
</td>
	<td><?php 
        echo $requests[$n]["fullname"];
        ?>
</td>
	<td><?php 
        echo nicedate($requests[$n]["created"], true);
        ?>
</td>
	<td><?php 
        echo $requests[$n]["c"];
        ?>
</td>
	<td><?php 
        echo $lang["resourcerequesttype" . $requests[$n]["request_mode"]];
        ?>
</td>
	<td><?php 
        echo $requests[$n]["assigned_to_username"];
        ?>
</td>
	<td><?php 
Exemplo n.º 11
0
            ?>
</td>
			<td><?php 
            echo $keys[$n]["emails"];
            ?>
</td>
			<td><?php 
            echo nicedate($keys[$n]["maxdate"], true);
            ?>
</td>
			<td><?php 
            echo nicedate($keys[$n]["lastused"], true);
            ?>
</td>
			<td><?php 
            echo $keys[$n]["expires"] == "" ? $lang["never"] : nicedate($keys[$n]["expires"], false);
            ?>
</td>
			<td><?php 
            echo $keys[$n]["access"] == -1 ? "" : $lang["access" . $keys[$n]["access"]];
            ?>
</td>
			<td><div class="ListTools">
			<a href="#" onClick="if (confirm('<?php 
            echo $lang["confirmdeleteaccess"];
            ?>
')) {document.getElementById('deleteaccess').value='<?php 
            echo $keys[$n]["access_key"];
            ?>
';document.getElementById('collectionform').submit(); }">&gt;&nbsp;<?php 
            echo $lang["action-delete"];
</td>
			<td><a href="#Header" onclick="message_display('<?php 
    echo $message;
    ?>
','<?php 
    echo $url_encoded;
    ?>
',<?php 
    echo $messages[$n]["ref"];
    ?>
);"><?php 
    echo htmlentities(strip_tags($messages[$n]["message"]));
    ?>
</a></td>
			<td><?php 
    echo nicedate($messages[$n]["expires"]);
    ?>
</td>
			<td><?php 
    echo $messages[$n]["seen"] == 0 ? $lang['no'] : $lang['yes'];
    ?>
</td>
			<td>
				<div class="ListTools">
					<a href="<?php 
    echo $messages[$n]["url"];
    ?>
">&gt;&nbsp;<?php 
    echo $lang["link"];
    ?>
</a>
Exemplo n.º 13
0
<div class="Question"><label><?php echo $lang["descriptionofproject"]?></label><div class="Fixed"><?php echo htmlspecialchars($research["description"]) ?></div>
<div class="clearerleft"> </div></div>

<div class="Question"><label><?php echo $lang["requestedby"]?></label><div class="Fixed"><?php echo $research["username"]?></div>
<div class="clearerleft"> </div></div>

<?php if (isset($anonymous_login) && $research["username"]==$anonymous_login) { ?>
<div class="Question"><label><?php echo $lang["email"]?></label><div class="Fixed"><a href="mailto:<?php echo htmlspecialchars($research["email"])?>"><?php echo htmlspecialchars($research["email"])?></a></div>
<div class="clearerleft"> </div></div>
<?php } ?>

<div class="Question"><label><?php echo $lang["date"]?></label><div class="Fixed"><?php echo nicedate($research["created"],false,true)?></div>
<div class="clearerleft"> </div></div>

<div class="Question"><label><?php echo $lang["deadline"]?></label><div class="Fixed"><?php echo nicedate($research["deadline"],false,true)?></div>
<div class="clearerleft"> </div></div>

<div class="Question"><label><?php echo $lang["contacttelephone"]?></label><div class="Fixed"><?php echo htmlspecialchars($research["contact"])?></div>
<div class="clearerleft"> </div></div>

<div class="Question"><label><?php echo $lang["finaluse"]?></label><div class="Fixed"><?php echo $research["finaluse"]?></div>
<div class="clearerleft"> </div></div>

<div class="Question"><label><?php echo $lang["resourcetypes"]?></label><div class="Fixed">
<?php $first=true;$set=explode(", ",$research["resource_types"]);$types=get_resource_types();for ($n=0;$n<count($types);$n++) {if (in_array($types[$n]["ref"],$set)) {if (!$first) {echo ", ";}echo $types[$n]["name"];$first=false;}} ?>
</div>
<div class="clearerleft"> </div></div>

<div class="Question"><label><?php echo $lang["noresourcesrequired"]?></label><div class="Fixed"><?php echo $research["noresources"]?></div>
<div class="clearerleft"> </div></div>
Exemplo n.º 14
0
<?php hook("beforecollectiontoolscolumnheader");?>
<td class="tools"><div class="ListTools"><?php echo $lang["tools"]?></div></td>
</tr>
<form method="get" name="colactions" id="colactions" action="<?php echo $baseurl_short?>pages/collection_manage.php">
<?php

for ($n=$offset;(($n<count($collections)) && ($n<($offset+$per_page)));$n++)
	{
    $colusername=$collections[$n]['fullname'];

	?><tr <?php hook("collectionlistrowstyle");?>>
	<td class="name"><div class="ListTitle">
		<a <?php if ($collections[$n]["public"]==1 && (strlen($collections[$n]["theme"])>0)) { ?>style="font-style:italic;"<?php } ?> href="<?php echo $baseurl_short?>pages/search.php?search=<?php echo urlencode("!collection" . $collections[$n]["ref"])?>" onClick="return CentralSpaceLoad(this);"><?php echo highlightkeywords(i18n_get_collection_name($collections[$n]),$find) ?></a></div></td>
	<td class="fullname"><?php echo highlightkeywords($colusername,$find) ?></td>
	<td class="ref"><?php echo highlightkeywords($collection_prefix . $collections[$n]["ref"],$find) ?></td>
	<td class="created"><?php echo nicedate($collections[$n]["created"],true) ?></td>
	<td class="count"><?php echo $collections[$n]["count"] ?></td>
<?php if (! $hide_access_column){ ?>	<td class="access"><?php
# Work out the correct access mode to display
if (!hook('collectionaccessmode')) {
	if ($collections[$n]["public"]==0){
		echo $lang["private"];
	}
	else{
		if (strlen($collections[$n]["theme"])>0){
			echo $lang["theme"];
		}
	else{
		echo $lang["public"];
		}
	}
    }
    if (!isset($collection_download_settings)) {
        exit($lang["collection_download_settings-not-defined"]);
    } else {
        if (!is_array($collection_download_settings)) {
            exit($lang["collection_download_settings-not-an-array"]);
        }
    }
    if (!isset($archiver_listfile_argument)) {
        exit($lang["listfile-argument-not-defined"]);
    }
}
$archiver = $collection_download && $archiver_fullpath != false && isset($archiver_listfile_argument) && (isset($collection_download_settings) ? is_array($collection_download_settings) : false);
# initiate text file
if ($zipped_collection_textfile == true && $includetext == "true") {
    $text = i18n_get_collection_name($collectiondata) . "\r\n" . $lang["downloaded"] . " " . nicedate(date("Y-m-d H:i:s"), true, true) . "\r\n\r\n" . $lang["contents"] . ":\r\n\r\n";
}
# get collection
$result = do_search("!collection" . $collection);
$modified_result = hook("modifycollectiondownload");
if (is_array($modified_result)) {
    $result = $modified_result;
}
#this array will store all the available downloads.
$available_sizes = array();
# get file extension from database or use jpg.
function get_extension($resource, $size)
{
    $pextension = $size == 'original' ? $resource["file_extension"] : 'jpg';
    $replace_extension = hook('replacedownloadextension', '', array($resource, $pextension));
    if (!empty($replace_extension)) {
Exemplo n.º 16
0
        ?>
 >
				<?php 
        echo $lang["status" . $result[$n]["archive"]];
        ?>
			</td>
			<?php 
    }
    if ($date_column) {
        ?>
		 	<td <?php 
        hook("listviewcolumnstyle");
        ?>
 >
		 		<?php 
        echo nicedate($result[$n]["creation_date"], false, true);
        ?>
		 	</td>
		 	<?php 
    }
    hook("addlistviewcolumn");
    ?>
		<td <?php 
    hook("listviewcolumnstyle");
    ?>
 >
			<div class="ListTools">
			<?php 
    if ($search_results_edit_icon && checkperm("e" . $result[$n]["archive"]) && !hook("iconedit")) {
        if ($allow_share && $k == "") {
            ?>
Exemplo n.º 17
0
	<tr>
		<th width=100>Date</th>
		<th width=75>From</th>
		<th width=75>To</th>
		<th width=75>Amount</th>
		<th width=100>Category</th>
		<th width=200>Comment</th>
		<th width=20>Delete</th>
	</tr>

<?php 
while ($therow = mysql_fetch_array($result)) {
    ?>
	<tr valign=top>
		<td><?php 
    echo nicedate($therow['thedate']);
    ?>
</td>
		<td><?php 
    echo $therow['fromname'];
    ?>
</td>
		<td><?php 
    echo $therow['toname'];
    ?>
</td>
		<td align=right>$<?php 
    echo number_format($therow['amount'], 2);
    ?>
</td>
		<td><?php 
Exemplo n.º 18
0

	</form>
	</div>
	<?php	
	}
elseif ($k!="")
	{
	# ------------- Anonymous access, slightly different display ------------------
	$tempcol=$cinfo;
	?>
<div id="CollectionMenu">
  <h2><?php echo i18n_get_collection_name($tempcol)?></h2>
	<br />
	<div class="CollectionStatsAnon">
	<?php echo $lang["created"] . " " . nicedate($tempcol["created"])?><br />
  	<?php echo $count_result . " " . $lang["youfoundresources"]?><br />
  	</div>
    <?php
	if ($download_usage && ((isset($zipcommand) || $collection_download) && $count_result>0)) { ?>
		<a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/terms.php?k=<?php echo urlencode($k) ?>&url=<?php echo urlencode("pages/download_usage.php?collection=" .  $usercollection . "&k=" . $k)?>">&gt; <?php echo $lang["action-download"]?></a>
	<?php } else if ((isset($zipcommand) || $collection_download) && $count_result>0) { ?>
	<a href="<?php echo $baseurl_short?>pages/terms.php?k=<?php echo urlencode($k) ?>&url=<?php echo urlencode("pages/collection_download.php?collection=" .  $usercollection . "&k=" . $k)?>" onclick="return CentralSpaceLoad(this,true);">&gt;&nbsp;<?php echo $lang["action-download"]?></a>
	<?php }
     if ($feedback) {?><br /><br /><a onclick="return CentralSpaceLoad(this);" href="<?php echo $baseurl_short?>pages/collection_feedback.php?collection=<?php echo urlencode($usercollection) ?>&k=<?php echo urlencode($k) ?>">&gt;&nbsp;<?php echo $lang["sendfeedback"]?></a><?php } ?>
    <?php if ($count_result>0 && checkperm("q"))
    	{ 
		# Ability to request a whole collection (only if user has restricted access to any of these resources)
		$min_access=collection_min_access($result);
		if ($min_access!=0)
			{
Exemplo n.º 19
0
?>

<div class="Question"><label><?php 
echo $lang["date"];
?>
</label><div class="Fixed"><?php 
echo nicedate($research["created"], false, true);
?>
</div>
<div class="clearerleft"> </div></div>

<div class="Question"><label><?php 
echo $lang["deadline"];
?>
</label><div class="Fixed"><?php 
echo nicedate($research["deadline"], false, true);
?>
</div>
<div class="clearerleft"> </div></div>

<div class="Question"><label><?php 
echo $lang["contacttelephone"];
?>
</label><div class="Fixed"><?php 
echo htmlspecialchars($research["contact"]);
?>
</div>
<div class="clearerleft"> </div></div>

<div class="Question"><label><?php 
echo $lang["finaluse"];
 function email_resource($resource, $resourcename, $fromusername, $userlist, $message, $access = -1, $expires = "", $useremail = "", $from_name = "", $cc = "", $list_recipients = false, $open_internal_access = false, $useraccess = 2, $group = "")
 {
     # Attempt to resolve all users in the string $userlist to user references.
     global $baseurl, $email_from, $applicationname, $lang, $userref, $usergroup, $attach_user_smart_groups;
     if ($useremail == "") {
         $useremail = $email_from;
     }
     if ($group == "") {
         $group = $usergroup;
     }
     # remove any line breaks that may have been entered
     $userlist = str_replace("\\r\\n", ",", $userlist);
     if (trim($userlist) == "") {
         return $lang["mustspecifyoneusername"];
     }
     $userlist = resolve_userlist_groups($userlist);
     if ($attach_user_smart_groups && strpos($userlist, $lang["groupsmart"] . ": ") !== false) {
         $userlist_with_groups = $userlist;
         $groups_users = resolve_userlist_groups_smart($userlist, true);
         if ($groups_users != '') {
             if ($userlist != "") {
                 $userlist = remove_groups_smart_from_userlist($userlist);
                 if ($userlist != "") {
                     $userlist .= ",";
                 }
             }
             $userlist .= $groups_users;
         }
     }
     $ulist = trim_array(explode(",", $userlist));
     $ulist = array_filter($ulist);
     $ulist = array_values($ulist);
     $emails = array();
     $key_required = array();
     $emails_keys = resolve_user_emails($ulist);
     $unames = $emails_keys['unames'];
     $emails = $emails_keys['emails'];
     $key_required = $emails_keys['key_required'];
     # Send an e-mail to each resolved user / e-mail address
     $subject = "{$applicationname}: {$resourcename}";
     if ($fromusername == "") {
         $fromusername = $applicationname;
     }
     // fromusername is used for describing the sender's name inside the email
     if ($from_name == "") {
         $from_name = $applicationname;
     }
     // from_name is for the email headers, and needs to match the email address (app name or user name)
     $message = str_replace(array("\\n", "\\r", "\\"), array("\n", "\r", ""), $message);
     #	Commented 'no message' line out as formatted oddly, and unnecessary.
     #	if ($message==""){$message=$lang['nomessage'];}
     $resolve_open_access = false;
     for ($n = 0; $n < count($emails); $n++) {
         $key = "";
         # Do we need to add an external access key for this user (e-mail specified rather than username)?
         if ($key_required[$n]) {
             $k = generate_resource_access_key($resource, $userref, $access, $expires, $emails[$n], $group);
             $key = "&k=" . $k;
         } elseif ($useraccess == 0 && $open_internal_access && !$resolve_open_access) {
             debug("smart_groups: going to resolve open access");
             # get this all done at once
             resolve_open_access(isset($userlist_with_groups) ? $userlist_with_groups : $userlist, $resource, $expires);
             $resolve_open_access = true;
         }
         # make vars available to template
         global $watermark;
         $templatevars['thumbnail'] = get_resource_path($resource, true, "thm", false, "jpg", $scramble = -1, $page = 1, $watermark ? $access == 1 ? true : false : false);
         if (!file_exists($templatevars['thumbnail'])) {
             $resourcedata = get_resource_data($resource);
             $templatevars['thumbnail'] = "../gfx/" . get_nopreview_icon($resourcedata["resource_type"], $resourcedata["file_extension"], false);
         }
         $templatevars['url'] = $baseurl . "/?r=" . $resource . $key;
         $templatevars['fromusername'] = $fromusername;
         $templatevars['message'] = $message;
         $templatevars['resourcename'] = $resourcename;
         $templatevars['from_name'] = $from_name;
         if (isset($k)) {
             if ($expires == "") {
                 $templatevars['expires_date'] = $lang["email_link_expires_never"];
                 $templatevars['expires_days'] = $lang["email_link_expires_never"];
             } else {
                 $day_count = round((strtotime($expires) - strtotime('now')) / (60 * 60 * 24));
                 $templatevars['expires_date'] = $lang['email_link_expires_date'] . nicedate($expires);
                 $templatevars['expires_days'] = $lang['email_link_expires_days'] . $day_count;
                 if ($day_count > 1) {
                     $templatevars['expires_days'] .= " " . $lang['expire_days'] . ".";
                 } else {
                     $templatevars['expires_days'] .= " " . $lang['expire_day'] . ".";
                 }
             }
         } else {
             # Set empty expiration tempaltevars
             $templatevars['expires_date'] = '';
             $templatevars['expires_days'] = '';
         }
         # Build message and send.
         if (count($emails > 1) && $list_recipients === true) {
             $body = $lang["list-recipients"] . "\n" . implode("\n", $emails) . "\n\n";
             $templatevars['list-recipients'] = $lang["list-recipients"] . "\n" . implode("\n", $emails) . "\n\n";
         } else {
             $body = "";
         }
         $body .= $templatevars['fromusername'] . " " . $lang["hasemailedyouaresource"] . "\n\n" . $templatevars['message'] . "\n\n" . $lang["clicktoviewresource"] . "\n\n" . $templatevars['url'];
         send_mail($emails[$n], $subject, $body, $fromusername, $useremail, "emailresource", $templatevars, $from_name, $cc);
         # log this
         resource_log($resource, "E", "", $notes = $unames[$n]);
     }
     hook("additional_email_resource", "", array($resource, $resourcename, $fromusername, $userlist, $message, $access, $expires, $useremail, $from_name, $cc, $templatevars));
     # Return an empty string (all OK).
     return "";
 }
Exemplo n.º 21
0
				<td><?php echo $lang["lastused"];?></td>
				<td><?php echo $lang["expires"];?></td>
				<td><?php echo $lang["access"];?></td>
				<td><div class="ListTools"><?php echo $lang["tools"]?></div></td>
				</tr>
				<?php
				for ($n=0;$n<count($keys);$n++)
					{
					?>
					<tr>
					<td><div class="ListTitle"><a target="_blank" href="<?php echo $baseurl . "?c=" . urlencode($ref) . "&k=" . $keys[$n]["access_key"]?>"><?php echo $keys[$n]["access_key"]?></a></div></td>
					<td><?php echo resolve_users($keys[$n]["users"])?></td>
					<!--<td><?php echo $keys[$n]["emails"]?></td>-->
					<td><?php echo nicedate($keys[$n]["maxdate"],true);	?></td>
					<td><?php echo nicedate($keys[$n]["lastused"],true); ?></td>
					<td><?php echo ($keys[$n]["expires"]=="")?$lang["never"]:nicedate($keys[$n]["expires"],false)?></td>
					<td><?php echo ($keys[$n]["access"]==-1)?"":$lang["access" . $keys[$n]["access"]]; ?></td>
					<td><div class="ListTools">
					<a href="#" onClick="if (confirm('<?php echo $lang["confirmdeleteaccess"]?>')) {document.getElementById('deleteaccess').value='<?php echo $keys[$n]["access_key"] ?>';document.getElementById('ref').value='<?php echo htmlspecialchars($ref) ?>';document.getElementById('themeform').submit(); }">&gt;&nbsp;<?php echo $lang["action-delete"]?></a>
					</div></td>
					</tr>
					<?php
					}
				?>
				</table>
				</div>
				<?php
				}
				?></div>
			<?php }
		}?>	
Exemplo n.º 22
0
        echo htmlentities($users[$n]["email"]);
        ?>
</td>
	<?php 
    }
    ?>
	<td><?php 
    echo nicedate($users[$n]["created"]);
    ?>
</td>
	<td><?php 
    echo $users[$n]["approved"] ? $lang["yes"] : $lang["no"];
    ?>
</td>
	<td><?php 
    echo nicedate($users[$n]["last_active"]);
    ?>
</td>

	<td><?php 
    if ($usergroup == 3 || $users[$n]["usergroup"] != 3) {
        ?>
<div class="ListTools">
	<a href="<?php 
        echo $baseurl;
        ?>
/pages/team/team_user_log.php?ref=<?php 
        echo $users[$n]["ref"];
        ?>
&backurl=<?php 
        echo urlencode($url . "&offset=" . $offset);
Exemplo n.º 23
0
 public function Header()
 {
     global $logowidth, $contactsheet_header, $contact_sheet_logo, $add_contactsheet_logo, $contact_sheet_font, $titlefontsize, $applicationname, $collectiondata, $date, $subsetting, $lang, $pagewidth, $pageheight, $logospace, $contact_sheet_logo_resize;
     if (isset($contact_sheet_logo) && $add_contactsheet_logo) {
         if (file_exists("../../" . $contact_sheet_logo)) {
             $extension = pathinfo($contact_sheet_logo);
             $extension = $extension['extension'];
             if ($extension == "pdf") {
                 //recommended as it works best with or without $contact_sheet_logo_resize
                 $this->setSourceFile("../../" . $contact_sheet_logo);
                 $this->_tplIdx = $this->importPage(1);
                 $logosize = $this->getTemplateSize($this->_tplIdx);
                 if (!$contact_sheet_logo_resize) {
                     $logowidth = $logosize['w'];
                     $logospace = $logosize['h'];
                     do_contactsheet_sizing_calculations();
                     // run this code again with new logospace
                 } else {
                     $logoratio = $logosize['w'] / $logosize['h'];
                     $logowidth = $pageheight / 8 * $logoratio;
                 }
                 $this->useTemplate($this->_tplIdx, $pagewidth / 2 - $logowidth / 2, 0.4, $logowidth);
             } else {
                 if (!$contact_sheet_logo_resize) {
                     $logospace = getimagesize("../../" . $contact_sheet_logo);
                     $logospace = $logospace[1] / 300;
                     $this->Image("../../" . $contact_sheet_logo, '', 0.5, '', $logospace, $extension, false, '', true, '300', 'C', false, false, 0, false, false, false);
                     do_contactsheet_sizing_calculations();
                     // run this code again with new logospace
                 } else {
                     $this->Image("../../" . $contact_sheet_logo, '', $pageheight / 30, '', $pageheight / 8, $extension, false, '', true, '300', 'C', false, false, 0, false, false, false);
                 }
             }
         } else {
             exit("Contact sheet logo file not found at " . $contact_sheet_logo);
         }
     }
     if ($contactsheet_header == "true") {
         $this->SetFont($contact_sheet_font, '', $titlefontsize, '', $subsetting);
         $title = $applicationname . ' - ' . i18n_get_collection_name($collectiondata) . ' - ' . nicedate($date, true, true);
         $pagenumber = $this->getAliasNumPage() . " " . $lang["of"] . " " . $this->getAliasNbPages();
         $this->Text(1, $logospace + 0.8, $title . '   ' . $pagenumber);
     }
 }
Exemplo n.º 24
0
function save_request($request)
	{
	# Use the posted form to update the request
	global $applicationname,$baseurl,$lang,$request_senduserupdates;
		
	$status=getvalescaped("status","",true);
	$expires=getvalescaped("expires","");
	$currentrequest=get_request($request);
	$oldstatus=$currentrequest["status"];
	$assigned_to=getvalescaped("assigned_to","");
	$reason=getvalescaped("reason","");
	$reasonapproved=getvalescaped("reasonapproved","");
	
	
	# --------------------- User Assignment ------------------------
	# Has the assigned_to value changed?
	if ($currentrequest["assigned_to"]!=$assigned_to && checkperm("Ra"))
		{
		if ($assigned_to==0)
			{
			# Cancel assignment
			sql_query("update request set assigned_to=null where ref='$request'");
			}
		else
			{
			# Update and notify user
			sql_query("update request set assigned_to='$assigned_to' where ref='$request'");

			$message=$lang["requestassignedtoyoumail"] . "\n\n$baseurl/?q=" . $request . "\n";
			$assigned_to_user=get_user($assigned_to);
			send_mail($assigned_to_user["email"],$applicationname . ": " . $lang["requestassignedtoyou"],$message);
			$userconfirmmessage=str_replace("%",$assigned_to_user["fullname"] . " (" . $assigned_to_user["email"] . ")" ,$lang["requestassignedtouser"]);
			if ($request_senduserupdates){send_mail($currentrequest["email"],$applicationname . ": " . $lang["requestupdated"] . " - $request",$userconfirmmessage);}
			}
		}
	
	
	# Has either the status or the expiry date changed?
	if (($oldstatus!=$status || $expires!=$currentrequest["expires"]) && $status==1)
		{
		# --------------- APPROVED -------------
		# Send approval e-mail
		$message=$lang["requestapprovedmail"] . "\n\n" . $lang["approvalreason"]. ": " . $reasonapproved . "\n\n" ;
		$message.="$baseurl/?c=" . $currentrequest["collection"] . "\n";
		if ($expires!="")
			{
			# Add expiry time to message.
			$message.=$lang["requestapprovedexpires"] . " " . nicedate($expires) . "\n\n";
			}
		$reasonapproved=str_replace(array("\\r","\\n"),"\n",$reasonapproved);$reasonapproved=str_replace("\n\n","\n",$reasonapproved); # Fix line breaks.
		send_mail($currentrequest["email"],$applicationname . ": " . $lang["requestcollection"] . " - " . $lang["resourcerequeststatus1"],$message);
		
		# Mark resources as full access for this user
		foreach (get_collection_resources($currentrequest["collection"]) as $resource)
			{
			open_access_to_user($currentrequest["user"],$resource,$expires);
			}
		}

	if ($oldstatus!=$status && $status==2)	
		{
		# --------------- DECLINED -------------
		# Send declined e-mail

		$reason=str_replace(array("\\r","\\n"),"\n",$reason);$reason=str_replace("\n\n","\n",$reason); # Fix line breaks.
		$message=$lang["requestdeclinedmail"] . "\n\n" . $lang["declinereason"] . ": ". $reason . "\n\n$baseurl/?c=" . $currentrequest["collection"] . "\n";
		send_mail($currentrequest["email"],$applicationname . ": " . $lang["requestcollection"] . " - " . $lang["resourcerequeststatus2"],$message);

		# Remove access that my have been granted by an inadvertant 'approved' command.
		foreach (get_collection_resources($currentrequest["collection"]) as $resource)
			{
			remove_access_to_user($currentrequest["user"],$resource);
			}

		}

	if ($oldstatus!=$status && $status==0)
		{
		# --------------- PENDING -------------
		# Moved back to pending. Delete any permissions set by a previous 'approve'.
		foreach (get_collection_resources($currentrequest["collection"]) as $resource)
			{
			remove_access_to_user($currentrequest["user"],$resource);
			}
		}

	# Save status
	sql_query("update request set status='$status',expires=" . ($expires==""?"null":"'$expires'") . ",reason='$reason',reasonapproved='$reasonapproved' where ref='$request'");

	if (getval("delete","")!="")
		{
		# Delete the request - this is done AFTER any e-mails have been sent out so this can be used on approval.
		sql_query("delete from request where ref='$request'");
		return true;		
		}

	}
</td>
<?php 
hook("adduserlogcolumnheader");
?>
</tr>

<?php 
for ($n = $offset; $n < count($log) && $n < $offset + $per_page; $n++) {
    if (!isset($lang["log-" . $log[$n]["type"]])) {
        $lang["log-" . $log[$n]["type"]] = "";
    }
    ?>
	<!--List Item-->
	<tr>
	<td><?php 
    echo nicedate($log[$n]["date"], true, true);
    ?>
</td>
	<?php 
    hook("user_log_before_userid_data");
    ?>
       <td><a onClick="return CentralSpaceLoad(this,true);" href='<?php 
    echo $baseurl_short;
    ?>
pages/view.php?ref=<?php 
    echo $log[$n]["resourceid"];
    ?>
'><?php 
    echo $log[$n]["resourceid"];
    ?>
</a></td>
Exemplo n.º 26
0
<div class="Question">
<label><?php echo $lang["descriptionofproject"]?><br/><span class="OxColourPale"><?php echo $lang["descriptionofprojecteg"]?></span></label>
<textarea rows=5 cols=50 name="description" class="stdwidth"><?php echo htmlspecialchars(getval("description","")) ?></textarea>
<div class="clearerleft"> </div>
<?php if (isset($error_description)) { ?><div class="FormError">!! <?php echo $lang["noprojectdescription"]?> !!</div><?php } ?>
</div>

<div class="Question">
<label><?php echo $lang["deadline"]?></label>
<select name="deadline" class="stdwidth">
<option value=""><?php echo $lang["nodeadline"]?></option>
<?php for ($n=0;$n<=150;$n++)
	{
	$date=time()+(60*60*24*$n);
	?><option <?php $d=date("D",$date);if (($d=="Sun") || ($d=="Sat")) { ?>style="background-color:#cccccc"<?php } ?> value="<?php echo date("Y-m-d",$date)?>"><?php echo nicedate(date("Y-m-d",$date),false,true)?></option>
	<?php
	}
?>
</select>
<div class="clearerleft"> </div>
</div>

<?php if (isset($anonymous_login) && $anonymous_login==$username) { 
# Anonymous access - we need to collect their e-mail address.
?>
<div class="Question" id="email">
<label><?php echo $lang["email"]?></label>
<input name="email" class="stdwidth" value="<?php echo htmlspecialchars(getval("email","")) ?>">
<div class="clearerleft"> </div>
<?php if (isset($error_email)) { ?><div class="FormError">!! <?php echo $lang["setup-emailerr"]?> !!</div><?php } ?>
Exemplo n.º 27
0
            ?>
</td>
			    <td><?php 
            echo htmlspecialchars($keys[$n]["emails"]);
            ?>
</td>
			    <td><?php 
            echo htmlspecialchars(nicedate($keys[$n]["maxdate"], true));
            ?>
</td>
			    <td><?php 
            echo htmlspecialchars(nicedate($keys[$n]["lastused"], true));
            ?>
</td>
			    <td><?php 
            echo htmlspecialchars($keys[$n]["expires"] == "" ? $lang["never"] : nicedate($keys[$n]["expires"], false));
            ?>
</td>
			    <td><?php 
            echo htmlspecialchars($keys[$n]["access"] == -1 ? "" : $lang["access" . $keys[$n]["access"]]);
            ?>
</td>
			    <td><div class="ListTools">
			    <?php 
            if (is_numeric($keys[$n]["collection"])) {
                ?>
				<a onClick="return CentralSpaceLoad(this,true);" href="collection_share.php?ref=<?php 
                echo $keys[$n]["collection"];
                ?>
">&gt;&nbsp;<?php 
                echo $lang["viewcollection"];
                }
                ?>
		<?php 
                if ($resource_type_column) {
                    ?>
<td><?php 
                    echo $collection_tag;
                    ?>
</td><?php 
                }
                ?>
		<?php 
                if ($date_column) {
                    ?>
<td><?php 
                    echo nicedate($collections[$n]["created"], false, true);
                    ?>
</td><?php 
                }
                ?>
        <?php 
                hook("addlistviewcolumnpublic");
                ?>
		<td><div class="ListTools">
		<?php 
                if (!hook("replacecollectiontools")) {
                    ?>
		<a href="<?php 
                    echo $baseurl_short;
                    ?>
pages/collections.php?collection=<?php 
Exemplo n.º 29
0
<tr class="ListviewTitleStyle">
<td><?php echo $lang["date"]?></td>
<td><?php echo $lang["user"]?></td>
<td><?php echo $lang["action"]?></td>
<td><?php echo $lang["resourceid"]?></td>
<td><?php $field=get_fields(array($view_title_field)); echo lang_or_i18n_get_translated($field[0]["title"], "fieldtitle-");?></td>
</tr>

<?php
for ($n=$offset;(($n<count($log)) && ($n<($offset+$per_page)));$n++)
	{
	if (!isset($lang["collectionlog-".$log[$n]["type"]])){$lang["collectionlog-".$log[$n]["type"]]="";}	
	?>
	<!--List Item-->
	<tr>
	<td><?php echo htmlspecialchars(nicedate($log[$n]["date"],true)) ?></td>
	<td><?php echo htmlspecialchars($log[$n]["fullname"])?></td>
	<td><?php 
		echo $lang["collectionlog-" . $log[$n]["type"]] ;
		if ($log[$n]["notes"] != "" ) { 
			##  notes field contains user IDs, collection references and /or standard texts
			##  Translate the standard texts
			$standard = array('#all_users', '#new_resource');
			$translated   = array($lang["all_users"], $lang["new_resource"]);
			$newnotes = str_replace($standard, $translated, $log[$n]["notes"]);
			echo $newnotes;
		}
		?></td>
	<td><?php if ($log[$n]['resource']!=0){?><a onClick="return CentralSpaceLoad(this,true);" href='<?php echo $baseurl_short?>pages/view.php?ref=<?php echo urlencode($log[$n]["resource"]) ?>'><?php echo $log[$n]["resource"]?></a><?php } ?></td>
	<td><?php if ($log[$n]['resource']!=0){?><a onClick="return CentralSpaceLoad(this,true);" href='<?php echo $baseurl_short?>pages/view.php?ref=<?php echo urlencode($log[$n]["resource"]) ?>'><?php echo i18n_get_translated($log[$n]["title"])?></a><?php } ?></td>
	</tr> 
Exemplo n.º 30
0
        }
        ?>
><?php 
        echo nicedate(date("Y-m-d", $date), false, true);
        ?>
</option>
	<?php 
    }
    if ($request["expires"] != "" && $sel == false) {
        # Option is out of range, but show it anyway.
        ?>
	<option value="<?php 
        echo $request["expires"];
        ?>
" selected><?php 
        echo nicedate(date("Y-m-d", strtotime($request["expires"])), false, true);
        ?>
</option>
	<?php 
    }
    ?>
</select>
<div class="clearerleft"> </div>
</div>

<div class="Question" id="ReasonDecline" <?php 
    if ($request["status"] != 2) {
        ?>
style="display:none;"<?php 
    }
    ?>