예제 #1
0
  </div>
  <input type="hidden" name="submited" value="submited" />
<?php 
}
?>
  <div id="forgotPasswordSubmit">
  <?php 
if (!isset($_GET['instructions_sent']) || !$_GET['instructions_sent']) {
    echo submit_button(lang('change password'));
}
?>
  	<span>(<a class="internalLink" href="<?php 
echo get_url('access', 'login');
?>
"><?php 
echo lang('login');
?>
</a>)</span>
  </div>
</div>
</form>


</div>
<div class="login-footer">
	<div class="powered-by">
		<?php 
echo lang('footer powered', clean(PRODUCT_URL), clean(product_name())) . ' - ' . lang('version') . ' ' . product_version();
?>
	</div>
</div>
$sql .= "WHERE s.id = m.site ";
$sql .= "AND m.id = sc.maintenanceid ";
$sql .= "AND sc.contactid = i.contact ";
$sql .= "AND i.opened > '{$monthago}' ";
$sql .= "ORDER BY s.id, i.id";
$result = mysql_query($sql);
if (mysql_error()) {
    trigger_error("MySQL Query Error: " . mysql_error(), E_USER_WARNING);
}
if (mysql_num_rows($result) > 0) {
    $prvincid = 0;
    while ($row = mysql_fetch_object($result)) {
        if ($prvincid != $row->id) {
            echo "<strong>[{$row->siteid}] {$row->name}</strong> {$strIncident}: <a href=\"javascript:incident_details_window_l('{$row->id}', 'incident{$row->id}')\">{$row->id}</a>  ";
            echo "{$strDate}: " . ldate('d M Y', $row->opened) . " ";
            echo "{$strProduct}: " . product_name($row->product);
            $site = $row->siteid;
            ${$site}++;
            $sites[] = $row->siteid;
            echo "<br />\n";
        }
        $prvincid = $row->id;
        // print_r($row);
    }
} else {
    echo "<p class='warning'>{$strNoRecords}</p>";
}
$sites = array_unique($sites);
/*
foreach ($sites AS $site => $val)
{
예제 #3
0
<?php

get_header();
?>
<div id="container">
	<div id="content">
		<div id="post-17" class="hentry p1 page publish author-alex category-uncategorized tag- y2007 m07 d19 h23">
			<h2 class="entry-title"><a href="<?php 
get_option('siteurl');
?>
/buy/<?php 
product_id();
?>
">Buying <?php 
product_name();
?>
</a><h2>
				<div class="entry-content">
					<p><?php 
product_description();
?>
</p>
					<h3>Pricing</h3>
					<p>CD Album & Postage (UK) - £<?php 
product_cost_uk();
?>
<br /><a href="<?php 
get_option('siteurl');
?>
/buy/<?php 
product_id();
예제 #4
0
파일: view.php 프로젝트: princejeru10/dras
" + "\n";
                receipt += "<?php 
        echo printLine(lang("date") . ": " . date($dateFormats['php_ldate'], strtotime($inv->date)));
        ?>
" + "\n\n";
                receipt += "<?php 
        $r = 1;
        foreach ($rows as $row) {
            ?>
";
                receipt += "<?php 
            echo "#" . $r . " ";
            ?>
";
                receipt += "<?php 
            echo printLine(product_name($row->product_name) . ($row->variant ? ' (' . $row->variant . ')' : '') . ":" . $row->tax_code, '*');
            ?>
" + "\n";
                receipt += "<?php 
            echo printLine($this->sma->formatNumber($row->quantity) . "x" . $this->sma->formatMoney($row->net_unit_price + $row->item_tax / $row->quantity) . ":  " . $this->sma->formatMoney($row->subtotal), ' ') . "";
            ?>
" + "\n";
                receipt += "<?php 
            $r++;
        }
        ?>
";
                receipt += "\x1B\x61\x31";
                receipt += "<?php 
        echo drawLine();
        ?>
예제 #5
0
 /**
 * Returns product signature (name and version). If user is not logged in and
 * is not member of owner company he will see only product name
 *
 * @param void
 * @return string
 */
 function product_signature() {
   if (function_exists('logged_user') && (logged_user() instanceof User) && logged_user()->isMemberOfOwnerCompany()) {
     $result = lang('footer powered', 'http://www.projectpier.org/', clean(product_name()) . ' ' . product_version());
     if (Env::isDebugging()) {
       ob_start();
       benchmark_timer_display(false);
       $result .= '. ' . ob_get_clean();
       if (function_exists('memory_get_usage')) {
         $result .= '. ' . format_filesize(memory_get_usage());
       } // if
     } // if
     return $result;
   } else {
     return lang('footer powered', 'http://www.ProjectPier.org/', clean(product_name()));
   } // if
 } // product_signature
     $str .= "<td>{$CONFIG['currency_symbol']}" . number_format($obj->balance, 2) . "</td>";
     $str .= "<td>{$CONFIG['currency_symbol']}" . number_format($awaitingapproval, 2) . "</td>";
     $str .= "<td>{$CONFIG['currency_symbol']}" . number_format($reserved, 2) . "</td>";
     $str .= "<td>{$CONFIG['currency_symbol']}" . number_format($actual, 2) . "</td>";
     $str .= "<td>{$CONFIG['currency_symbol']}{$obj->unitrate}</td>";
     $str .= "<td>{$unitsat1times}</td></tr>\n";
     $lastsite = $obj->site;
     $lastproduct = $obj->product;
 } elseif ($display == 'csv') {
     if ($obj->site != $lastsite) {
         $str .= "\"" . site_name($obj->site) . "\",";
         $str .= "\"" . product_name($obj->product) . "\",";
     } else {
         $str .= ",";
         if ($obj->product != $lastproduct) {
             $str .= product_name($obj->product) . ",";
         } else {
             $str .= ",";
         }
     }
     $str .= "\"{$obj->cust_ref}\",\"{$obj->startdate}\",\"{$obj->enddate}\",";
     if ($obj->foc == 'yes') {
         $str .= "\"{$strYes}\",";
     } else {
         $str .= "\"{$strNo}\",";
     }
     $str .= "\"{$csv_currency}{$obj->creditamount}\",\"{$csv_currency}{$obj->balance}\",";
     $str .= "\"{$awaitingapproval}\", \"{$reserved}\", \"{$actual}\", ";
     $str .= "\"{$csv_currency}{$obj->unitrate}\",";
     $str .= "\"{$unitsat1times}\"\n";
 }
    trigger_error(mysql_error(), E_USER_WARNING);
}
$site = mysql_fetch_object($siteresult);
$site_name = $site->name;
if (!empty($site->notes)) {
    $site_notes = icon('site', 16) . " <strong>{$strSiteNotes}</strong><br />" . nl2br($site->notes);
} else {
    $site_notes = '';
}
unset($site);
if (!empty($incident->contactnotes)) {
    $contact_notes = icon('contact', 16) . " <strong>{$strContactNotes}</strong><br />" . nl2br($incident->contactnotes);
} else {
    $contact_notes = '';
}
$product_name = product_name($incident->product);
if ($incident->softwareid > 0) {
    $software_name = software_name($incident->softwareid);
}
$servicelevel_id = maintenance_servicelevel($incident->maintenanceid);
$servicelevel_tag = $incident->servicelevel;
if ($servicelevel_tag == '') {
    $servicelevel_tag = servicelevel_id2tag(maintenance_servicelevel($incident->maintenanceid));
}
$servicelevel_name = servicelevel_name($servicelevelid);
if ($incident->closed == 0) {
    $closed = time();
} else {
    $closed = $incident->closed;
}
$opened_for = format_seconds($closed - $incident->opened);
예제 #8
0
/**
 * Displays a form used for editing or adding a product to database.
 *
 * @param string $error Error message from the manage_products form.
 * @param bool $related_to_release If true then we are passing from adding a release in general so we set the relation to this automatically
 * @return void
 */
function ribcage_edit_product_form($error = 0, $related_to_release = 0)
{
    global $artist;
    global $release, $releases;
    global $product;
    if (isset($_REQUEST['product'])) {
        $product = get_product($_REQUEST['product']);
    }
    $releases = list_recent_releases_blurb();
    if ($error) {
        echo '<div id="message" class="error"><p><strong>' . $error . '</strong></p></div>';
    }
    ?>
	<div class="wrap">
		<div id="icon-options-general" class="icon32"><br /></div>
		<?php 
    if (isset($_REQUEST['product'])) {
        ?>
		<h2>Editing <?php 
        product_name();
        ?>
</h2>
		<form action="<?php 
        echo home_url();
        ?>
/wp-admin/admin.php?page=manage_products&product=<?php 
        product_id();
        ?>
&ribcage_action=edited" method="post" id="ribcage_edit_artist" name="edit_artist">
		<?php 
    } else {
        ?>
		<h2>Add A Product</h2>
		<form action="<?php 
        echo home_url();
        ?>
/wp-admin/admin.php?page=manage_products&ribcage_action=add" method="post" id="ribcage_edit_artist" name="edit_artist">
		<?php 
    }
    ?>
				<table class="form-table">             
					<tr valign="top">
						<th scope="row"><label for="product_name">Name</label></th> 
						<td>
							<input type="text" value="<?php 
    product_name();
    ?>
" name="product_name" id="product_name" class="regular-text"/>												
						</td> 
					</tr>
					<tr valign="top">
						<th scope="row"><label for="product_name">Price</label></th> 
						<td>
							<input type="text" value="<?php 
    echo $product['product_cost'];
    ?>
" name="product_cost" id="product_cost" class="regular-text"/>												
						</td> 
					</tr>
					<tr valign="top">
						<th scope="row"><label for="product_related_release">Related To Release</label></th> 
						<td>
							<select name="product_related_release" id="product_related_release">
								<option value = "">None</option>
								<?php 
    while (have_releases()) {
        the_release();
        ?>
								<?php 
        $artist['artist_name'] = get_artistname_by_id($release['release_artist']);
        ?>
								<?php 
        if ($release['release_id'] == $product['product_related_release']) {
            ?>
								<option selected value="<?php 
            release_id();
            ?>
"><?php 
            artist_name();
            ?>
 - <?php 
            release_title();
            ?>
</option>
								<?php 
        } else {
            ?>
								<option value="<?php 
            release_id();
            ?>
"><?php 
            artist_name();
            ?>
 - <?php 
            release_title();
            ?>
</option>
								<?php 
        }
        ?>
								<?php 
    }
    ?>
							</select>												
						</td> 
					</tr>
					<tr valign="top">
						<th scope="row"><label for="product_name">Product Description</label></th> 
						<td>
							<textarea rows="10" cols="100" name="product_description" id="product_description" class="regular-text"><?php 
    product_description();
    ?>
</textarea>					
						</td> 
					</tr>
				</table>
				<p class="submit">
					<input type="submit" name="Submit" class="button-primary" value="Save Changes" />
				</p>
		</form>
</div>
	<?php 
}
echo "<h2>{$title}</h2>";
$sql = "SELECT * FROM `{$dbProducts}` ";
$result = mysql_query($sql);
if (mysql_num_rows($result) > 0) {
    while ($product = mysql_fetch_object($result)) {
        $csql = "SELECT COUNT(id) AS count FROM `{$dbMaintenance}` WHERE product = {$product->id} AND NOT term = 'yes' AND expirydate > {$now}";
        $cresult = mysql_query($csql);
        list($contract_count) = mysql_fetch_row($cresult);
        if ($contract_count > 0) {
            $productlist[$product->id] = $contract_count;
        }
    }
    arsort($productlist, SORT_NUMERIC);
    echo "<table align='center'>";
    echo "<tr><th>#</th><th>{$strProduct}</th><th>{$strContracts}</th></tr>\n";
    $count = 1;
    $shade = 'shade1';
    foreach ($productlist as $prod => $contcount) {
        echo "<tr class='{$shade}'><td>{$count}</td><td>" . product_name($prod) . "</td><td><a href='contracts.php?activeonly=yes&amp;productid={$prod}'>{$contcount}</a></td></tr>\n";
        $count++;
        if ($shade == 'shade1') {
            $shade = 'shade2';
        } else {
            $shade = 'shade1';
        }
    }
    echo "</table>\n";
} else {
    echo "<p>{$strNoRecords}</p>";
}
include APPLICATION_INCPATH . 'htmlfooter.inc.php';
예제 #10
0
/**
 * Return the html of contract detatils
 * @author Kieran Hogg
 * @param int $maintid - ID of the contract
 * @param string $mode. 'internal' or 'external'
 * @return array of supported contracts, NULL if none
 * @todo FIXME not quite generic enough for a function ?
 */
function contract_details($id, $mode = 'internal')
{
    global $CONFIG, $iconset, $dbMaintenance, $dbSites, $dbResellers, $dbLicenceTypes, $now;
    $sql = "SELECT m.*, m.notes AS maintnotes, s.name AS sitename, ";
    $sql .= "r.name AS resellername, lt.name AS licensetypename ";
    $sql .= "FROM `{$dbMaintenance}` AS m, `{$dbSites}` AS s, ";
    $sql .= "`{$dbResellers}` AS r, `{$dbLicenceTypes}` AS lt ";
    $sql .= "WHERE s.id = m.site ";
    $sql .= "AND m.id='{$id}' ";
    $sql .= "AND m.reseller = r.id ";
    $sql .= "AND (m.licence_type IS NULL OR m.licence_type = lt.id) ";
    if ($mode == 'external') {
        $sql .= "AND m.site = '{$_SESSION['siteid']}'";
    }
    $maintresult = mysql_query($sql);
    if (mysql_error()) {
        trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
    }
    $maint = mysql_fetch_object($maintresult);
    $html = "<table align='center' class='vertical'>";
    $html .= "<tr><th>{$GLOBALS['strContract']} {$GLOBALS['strID']}:</th>";
    $html .= "<td><h3>" . icon('contract', 32) . " ";
    $html .= "{$maint->id}</h3></td></tr>";
    $html .= "<tr><th>{$GLOBALS['strStatus']}:</th><td>";
    if ($maint->term == 'yes') {
        $html .= "<strong>{$GLOBALS['strTerminated']}</strong>";
    } else {
        $html .= $GLOBALS['strActive'];
    }
    if ($maint->expirydate < $now and $maint->expirydate != '-1') {
        $html .= "<span class='expired'>, {$GLOBALS['strExpired']}</span>";
    }
    $html .= "</td></tr>\n";
    $html .= "<tr><th>{$GLOBALS['strSite']}:</th>";
    if ($mode == 'internal') {
        $html .= "<td><a href=\"site_details.php?id=" . $maint->site . "\">" . $maint->sitename . "</a></td></tr>";
    } else {
        $html .= "<td><a href=\"sitedetails.php\">" . $maint->sitename . "</a></td></tr>";
    }
    $html .= "<tr><th>{$GLOBALS['strAdminContact']}:</th>";
    if ($mode == 'internal') {
        $html .= "<td><a href=\"contact_details.php?id=";
        $html .= "{$maint->admincontact}\">";
        $html .= contact_realname($maint->admincontact) . "</a></td></tr>";
    } else {
        $html .= "<td><a href='contactdetails.php?id={$maint->admincontact}'>";
        $html .= contact_realname($maint->admincontact) . "</a></td></tr>";
    }
    $html .= "<tr><th>{$GLOBALS['strReseller']}:</th><td>";
    if (empty($maint->resellername)) {
        $html .= $GLOBALS['strNoReseller'];
    } else {
        $html .= $maint->resellername;
    }
    $html .= "</td></tr>";
    $html .= "<tr><th>{$GLOBALS['strProduct']}:</th><td>" . product_name($maint->product) . "</td></tr>";
    $html .= "<tr><th>{$GLOBALS['strIncidents']}:</th>";
    $html .= "<td>";
    $incidents_remaining = $maint->incident_quantity - $maint->incidents_used;
    if ($maint->incident_quantity == 0) {
        $quantity = $GLOBALS['strUnlimited'];
    } else {
        $quantity = $maint->incident_quantity;
    }
    $html .= sprintf($GLOBALS['strUsedNofN'], $maint->incidents_used, $quantity);
    if ($maint->incidents_used >= $maint->incident_quantity and $maint->incident_quantity != 0) {
        $html .= " ({$GLOBALS['strZeroRemaining']})";
    }
    $html .= "</td></tr>";
    if ($maint->licence_quantity != '0') {
        $html .= "<tr><th>{$GLOBALS['strLicense']}:</th>";
        $html .= "<td>{$maint->licence_quantity} {$maint->licensetypename}</td></tr>\n";
    }
    $html .= "<tr><th>{$GLOBALS['strServiceLevel']}:</th><td>" . servicelevel_name($maint->servicelevelid) . "</td></tr>";
    $html .= "<tr><th>{$GLOBALS['strExpiryDate']}:</th><td>";
    if ($maint->expirydate == '-1') {
        $html .= "{$GLOBALS['strUnlimited']}";
    } else {
        $html .= ldate($CONFIG['dateformat_date'], $maint->expirydate);
    }
    $html .= "</td></tr>";
    if ($mode == 'internal') {
        $timed = db_read_column('timed', $GLOBALS['dbServiceLevels'], $maint->servicelevelid);
        if ($timed == 'yes') {
            $timed = TRUE;
        } else {
            $timed = FALSE;
        }
        $html .= "<tr><th>{$GLOBALS['strService']}</th><td>";
        $html .= contract_service_table($id, $timed);
        $html .= "</td></tr>\n";
        if ($timed) {
            $html .= "<tr><th>{$GLOBALS['strBalance']}</th><td>{$CONFIG['currency_symbol']}" . number_format(get_contract_balance($id, TRUE, TRUE), 2);
            $multiplier = get_billable_multiplier(strtolower(date('D', $now)), date('G', $now));
            $html .= " (&cong;" . contract_unit_balance($id, TRUE, TRUE) . " units)";
            $html .= "</td></tr>";
        }
    }
    if ($maint->maintnotes != '' and $mode == 'internal') {
        $html .= "<tr><th>{$GLOBALS['strNotes']}:</th><td>{$maint->maintnotes}</td></tr>";
    }
    $html .= "</table>";
    if ($mode == 'internal') {
        $html .= "<p align='center'>";
        $html .= "<a href=\"contract_edit.php?action=edit&amp;maintid={$id}\">{$GLOBALS['strEditContract']}</a> | ";
        $html .= "<a href='contract_add_service.php?contractid={$id}'>{$GLOBALS['strAddService']}</a></p>";
    }
    $html .= "<h3>{$GLOBALS['strContacts']}</h3>";
    if (mysql_num_rows($maintresult) > 0) {
        if ($maint->allcontactssupported == 'yes') {
            $html .= "<p class='info'>{$GLOBALS['strAllSiteContactsSupported']}</p>";
        } else {
            $allowedcontacts = $maint->supportedcontacts;
            $supportedcontacts = supported_contacts($id);
            $numberofcontacts = 0;
            $numberofcontacts = sizeof($supportedcontacts);
            if ($allowedcontacts == 0) {
                $allowedcontacts = $GLOBALS['strUnlimited'];
            }
            $html .= "<table align='center'>";
            $supportcount = 1;
            if ($numberofcontacts > 0) {
                foreach ($supportedcontacts as $contact) {
                    $html .= "<tr><th>{$GLOBALS['strContact']} #{$supportcount}:</th>";
                    $html .= "<td>" . icon('contact', 16) . " ";
                    if ($mode == 'internal') {
                        $html .= "<a href=\"contact_details.php?";
                    } else {
                        $html .= "<a href=\"contactdetails.php?";
                    }
                    $html .= "id={$contact}\">" . contact_realname($contact) . "</a>, ";
                    $html .= contact_site($contact) . "</td>";
                    if ($mode == 'internal') {
                        $html .= "<td><a href=\"contract_delete_contact.php?contactid=" . $contact . "&amp;maintid={$id}&amp;context=maintenance\">{$GLOBALS['strRemove']}</a></td></tr>\n";
                    } else {
                        $html .= "<td><a href=\"{$_SERVER['PHP_SELF']}?id={$id}&amp;contactid=" . $contact . "&amp;action=remove\">{$GLOBALS['strRemove']}</a></td></tr>\n";
                    }
                    $supportcount++;
                }
                $html .= "</table>";
            } else {
                $html .= "<p class='info'>{$GLOBALS['strNoRecords']}<p>";
            }
        }
        if ($maint->allcontactssupported != 'yes') {
            $html .= "<p align='center'>";
            $html .= sprintf($GLOBALS['strUsedNofN'], "<strong>" . $numberofcontacts . "</strong>", "<strong>" . $allowedcontacts . "</strong>");
            $html .= "</p>";
            if ($numberofcontacts < $allowedcontacts or $allowedcontacts == 0 and $mode == 'internal') {
                $html .= "<p align='center'><a href='contract_add_contact.php?maintid={$id}&amp;siteid={$maint->site}&amp;context=maintenance'>";
                $html .= "{$GLOBALS['strAddContact']}</a></p>";
            } else {
                $html .= "<h3>{$GLOBALS['strAddContact']}</h3>";
                $html .= "<form action='{$_SERVER['PHP_SELF']}?id={$id}&amp;action=";
                $html .= "add' method='post' >";
                $html .= "<p align='center'>{$GLOBLAS['strAddNewSupportedContact']} ";
                $html .= contact_site_drop_down('contactid', 'contactid', maintenance_siteid($id), supported_contacts($id));
                $html .= help_link('NewSupportedContact');
                $html .= " <input type='submit' value='{$GLOBALS['strAdd']}' /></p></form>";
            }
            if ($mode == 'external') {
                $html .= "<p align='center'><a href='addcontact.php'>";
                $html .= "{$GLOBALS['strAddNewSiteContact']}</a></p>";
            }
        }
        $html .= "<br />";
        $html .= "<h3>{$GLOBALS['strSkillsSupportedUnderContract']}:</h3>";
        // supported software
        $sql = "SELECT * FROM `{$GLOBALS[dbSoftwareProducts]}` AS sp, `{$GLOBALS[dbSoftware]}` AS s ";
        $sql .= "WHERE sp.softwareid = s.id AND productid='{$maint->product}' ";
        $result = mysql_query($sql);
        if (mysql_error()) {
            trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
        }
        if (mysql_num_rows($result) > 0) {
            $html .= "<table align='center'>";
            while ($software = mysql_fetch_object($result)) {
                $software->lifetime_end = mysql2date($software->lifetime_end);
                $html .= "<tr><td> " . icon('skill', 16) . " ";
                if ($software->lifetime_end > 0 and $software->lifetime_end < $now) {
                    $html .= "<span class='deleted'>";
                }
                $html .= $software->name;
                if ($software->lifetime_end > 0 and $software->lifetime_end < $now) {
                    $html .= "</span>";
                }
                $html .= "</td></tr>\n";
            }
            $html .= "</table>\n";
        } else {
            $html .= "<p align='center'>{$GLOBALS['strNone']} / {$GLOBALS['strUnknown']}<p>";
        }
    } else {
        $html = "<p align='center'>{$GLOBALS['strNothingToDisplay']}</p>";
    }
    return $html;
}
예제 #11
0
    		<td rowspan=2 colspan=3 class="loginContents" >
			<div style="padding:10px 0px 10px 6px;">
<?php if(!is_null(flash_get('success'))) { ?>
          <div id="success" onclick="this.style.display = 'none'"><?php echo clean(flash_get('success')) ?></div>
<?php } ?>
<?php if(!is_null(flash_get('error'))) { ?>
          <div id="error" onclick="this.style.display = 'none'"><?php echo clean(flash_get('error')) ?></div>
<?php } ?>
<?php echo $content_for_layout ?>
    		</div>

			</td>
    		<td rowspan=2 class="m5">&nbsp;</td>
    	</tr>
    	<tr style="">
    		<td class="m1">&nbsp;</td>
    	</tr>
    	<tr>
    		<td class="b1">&nbsp;</td>
    		<td class="b2">&nbsp;</td>
    		<td class="b3">&nbsp;</td>
    		<td class="b4">&nbsp;</td>
    		<td class="b5">&nbsp;</td>
    	</tr>
    </table>
    </div>
    <div class="powered-by">
    <?php echo lang('footer powered', 'http://www.fengoffice.com/', clean(product_name())) . ' - ' . lang('version') . ' ' . product_version();?>
    </div>
  </body>
</html>
예제 #12
0
/**
 * Creates titles for Ribcage pages.
 *
 * @author Alex Andrews <*****@*****.**>
 * @param string The separator to use between the elements of the title.
 */
function ribcage_title($sep = '&rsaquo;')
{
    global $wp_query;
    global $artist, $release, $releases;
    // We've got a 404 situation here.
    if (isset($artist) && is_wp_error($artist) || isset($release) && is_wp_error($release) || isset($product) && is_wp_error($product)) {
        return;
    }
    if ($wp_query->query_vars['pagename'] == 'artists') {
        echo 'Artists';
    }
    if ($wp_query->query_vars['pagename'] == 'releases') {
        echo 'Releases';
    }
    if (isset($wp_query->query_vars['ribcage_buy']) && isset($wp_query->query_vars['ribcage_product_id'])) {
        ?>
Buy <?php 
        echo $sep;
        ?>
 <?php 
        if (isset($artist) && isset($release)) {
            ?>
<a href="<?php 
            echo home_url();
            ?>
/artists/<?php 
            artist_slug();
            ?>
/"><?php 
            artist_name();
            ?>
</a> <?php 
            echo $sep;
            ?>
 <?php 
        }
        product_name();
    }
    if (isset($wp_query->query_vars['ribcage_buy_mode']) && $wp_query->query_vars['ribcage_buy_mode'] == 'thanks') {
        echo $sep;
        ?>
 Thanks!<?php 
    }
    if (isset($wp_query->query_vars['ribcage_download'])) {
        ?>
Downloading <?php 
        echo $sep;
        ?>
 <a href="<?php 
        echo home_url();
        ?>
/artists/<?php 
        artist_slug();
        ?>
/"><?php 
        artist_name();
        ?>
</a> <?php 
        echo $sep;
        ?>
 <a href="<?php 
        echo home_url();
        ?>
/artists/<?php 
        artist_slug();
        ?>
/<?php 
        release_slug();
        ?>
"><?php 
        release_title();
        ?>
</a>
		<?php 
    }
    if (isset($wp_query->query_vars['artist_slug']) && !isset($wp_query->query_vars['ribcage_buy'])) {
        ?>
<a href="<?php 
        echo home_url();
        ?>
/artists/<?php 
        artist_slug();
        ?>
/"><?php 
        artist_name();
        ?>
</a><?php 
    }
    if (is_artist_page()) {
        switch ($wp_query->query_vars['artist_page']) {
            case 'press':
                ?>
			<?php 
                echo $sep;
                ?>
 <a href="<?php 
                echo home_url();
                ?>
/artists/<?php 
                artist_slug();
                ?>
/press">Press</a>
				<?php 
                break;
            case 'bio':
                ?>
				<?php 
                echo $sep;
                ?>
 <a href="<?php 
                echo home_url();
                ?>
/artists/<?php 
                artist_slug();
                ?>
/bio">Biography</a>
				<?php 
                break;
            default:
                ?>
				<?php 
                echo $sep;
                ?>
 <a href="<?php 
                echo home_url();
                ?>
/artists/<?php 
                artist_slug();
                ?>
/<?php 
                release_slug();
                ?>
"><?php 
                release_title();
                ?>
</a>
				<?php 
        }
    }
}
예제 #13
0
                $spamcount++;
            }
        }
    }
}
$sql = "SELECT * FROM `{$dbIncidents}` WHERE owner='0' AND status!='2'";
$resultnew = mysql_query($sql);
if (mysql_num_rows($resultnew) >= 1) {
    while ($new = mysql_fetch_object($resultnew)) {
        // Get Last Update
        list($update_userid, $update_type, $update_currentowner, $update_currentstatus, $update_body, $update_timestamp, $update_nextaction, $update_id) = incident_lastupdate($new->id);
        $update_body = parse_updatebody($update_body);
        $html = "<tr class='shade1'>";
        $html .= "<td align='center'>" . ldate($CONFIG['dateformat_datetime'], $new->opened) . "</td>";
        $html .= "<td>" . contact_realname($new->contact) . "</td>";
        $html .= "<td>" . product_name($new->product) . " / " . software_name($new->softwareid) . "<br />";
        $html .= "[{$new->id}] <a href=\"javascript:incident_details_window('{$new->id}','holdingview');\" class='info'>{$new->title}<span>{$update_body}</span></a></td>";
        $html .= "<td style='text-align:center;'>{$strUnassigned}</td>";
        $html .= "<td style='text-align:center;'>";
        $html .= "<a href= \"javascript:incident_details_window('{$new->id}',";
        $html .= "'holdingview');\" title='View this incident'>{$strView}</a> | ";
        $html .= "<a href= \"javascript:wt_winpopup('incident_reassign.php?id=";
        $html .= "{$new->id}&amp;reason=Initial%20assignment%20to%20engineer";
        $html .= "&amp;popup=yes','mini');\" title='Assign this incident'>{$strAssign}</a></td>";
        $html .= "</tr>";
        $incidentqueuerows[$update_timestamp] = $html;
    }
}
$realemails = $countresults - $spamcount;
//$totalheld = $countresults + mysql_num_rows($resultnew) - $spamcount;
/**
예제 #14
0
/**
 * Returns product signature (name and version). If user is not logged in and
 * is not member of owner company he will see only product name
 *
 * @param void
 * @return string
 */
function product_signature()
{
    if (function_exists('logged_user') && logged_user() instanceof Contact) {
        $result = lang('footer powered', clean(PRODUCT_URL), clean(product_name()) . ' ' . product_version());
        if (Env::isDebugging()) {
            ob_start();
            benchmark_timer_display(false);
            $result .= '. ' . ob_get_clean();
            if (function_exists('memory_get_usage')) {
                $result .= '. ' . format_filesize(memory_get_usage());
            }
            // if
        }
        // if
        return $result;
    } else {
        return lang('footer powered', clean(PRODUCT_URL), clean(product_name()));
    }
    // if
}
예제 #15
0
 echo "<h5>" . sprintf($strMandatoryMarked, "<sup class='red'>*</sup>") . "</h5>";
 echo "<form id='maintform' name='maintform' action='{$_SERVER['PHP_SELF']}?action=update' method='post' onsubmit='return confirm_action(\"{$strAreYouSureMakeTheseChanges}\")'>\n";
 echo "<table align='center' class='vertical'>\n";
 echo "<thead>\n";
 echo "<tr><th>{$strSite}: <sup class='red'>*</sup></th><td>";
 echo site_name($maint["site"]) . "</td></tr>";
 echo "<tr><th>{$strContacts}:</th><td>";
 echo "<input value='amount' type='radio' name='contacts' checked='checked' />";
 echo "{$strLimitTo} <input size='2' value='{$maint[supportedcontacts]}' name='amount' /> {$strSupportedContacts} ({$str0MeansUnlimited})<br />";
 echo "<input type='radio' value='all' name='contacts'";
 if ($maint[allcontactssupported] == 'yes') {
     echo "checked='checked'";
 }
 echo " />{$strAllSiteContactsSupported}</td></tr>";
 echo "<tr><th>{$strProduct}: <sup class='red'>*</sup></th><td>";
 $productname = product_name($maint["product"]);
 if (user_permission($sit[2], 22)) {
     if ($changeproduct == 'yes') {
         echo product_drop_down("product", $maint['product']);
     } else {
         echo "{$productname} (<a href='{$_SERVER['PHP_SELF']}?action=edit&amp;maintid={$maintid}&amp;changeproduct=yes'>{$strChange}</a>)";
     }
 } else {
     echo "{$productname}";
 }
 echo "</td></tr>\n";
 echo "<tr><th>{$strExpiryDate}: <sup class='red'>*</sup></th>";
 echo "<td><input name='expirydate' size='10' value='";
 if ($maint['expirydate'] > 0) {
     echo ldate('Y-m-d', $maint['expirydate']);
 }
예제 #16
0
if (mysql_num_rows($result) >= 1 && $countclosed >= 1) {
    echo "<p align='center'>{$strAverageIncidentDuration}: " . format_seconds($totalduration / $countclosed) . "</p>";
}
echo "<p class='contextmenu' align='center'>{$strDisplay}: ";
echo "<a href=\"{$_SERVER['PHP_SELF']}?id={$id}&amp;mode={$mode}&amp;status=open\">{$strShowOpenIncidents}</a> | ";
echo "<a href=\"{$_SERVER['PHP_SELF']}?id={$id}&amp;mode={$mode}&amp;status=closed\">{$strShowClosedIncidents}</a> | ";
echo "<a href=\"{$_SERVER['PHP_SELF']}?id={$id}&amp;mode={$mode}\">{$strAll}</a>";
echo "</p>";
$countproducts = array_sum($productlist);
if ($mode == 'site') {
    $countcontacts = array_sum($contactlist);
}
if ($countproducts >= 1 or $contactcontacts >= 1) {
    foreach ($productlist as $product => $quantity) {
        $productpercentage = number_format($quantity * 100 / $countproducts, 1);
        $productlegends[] = urlencode(product_name($product) . " ({$productpercentage}%)");
    }
    foreach ($softwarelist as $software => $quantity) {
        $softwarepercentage = number_format($quantity * 100 / $countproducts, 1);
        $softwarelegends[] = urlencode(software_name($software) . " ({$softwarepercentage}%)");
    }
    if ($mode == 'site') {
        foreach ($contactlist as $contact => $quantity) {
            $contactpercentage = number_format($quantity * 100 / $countcontacts, 1);
            $contactlegends[] = urlencode("{$contact} ({$contactpercentage}%)");
        }
    }
    if (extension_loaded('gd')) {
        // Incidents by product chart
        $data = implode('|', $productlist);
        $keys = array_keys($productlist);