Compare commits
14 Commits
site/archl
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 4af8e06eff | |||
| 24f8e95c92 | |||
|
|
4e4046f093 | ||
|
|
ca4d61d6c0 | ||
| 974beee429 | |||
| 846a6cdb6a | |||
| a7dc9bcfab | |||
| 8318cae110 | |||
| f8ed190894 | |||
| f0e578aa8a | |||
| 68c1e4555f | |||
| c7a22428e5 | |||
| 9fef8645a5 | |||
| e60b81f085 |
21
.gitattributes
vendored
Normal file
21
.gitattributes
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Determinisztikus sorvég (illusion3-salt#895 CRLF-incidens): a baseline
|
||||
# byte-pontossága a source-of-truth LF-jén múlik, NEM a build-kliens
|
||||
# core.autocrlf-jén. A build-baseline.sh shebangja CRLF esetén 'bash\r'-t
|
||||
# keresett és eltört; a build out/ CRLF-je pedig a baseline-diffet rontja.
|
||||
* text=auto eol=lf
|
||||
# bináris assetek — a git ne konvertáljon, byte-pontos marad
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
*.webp binary
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
*.ttf binary
|
||||
*.eot binary
|
||||
*.otf binary
|
||||
*.zip binary
|
||||
*.gz binary
|
||||
*.pdf binary
|
||||
*.swf binary
|
||||
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,6 +1,8 @@
|
||||
[submodule "cadline/backend/common_cadline_libraries"]
|
||||
path = cadline/backend/common_cadline_libraries
|
||||
url = ssh://git@git.cadline.hu:22222/cadline_web/cadcommonlib.git
|
||||
branch = master
|
||||
[submodule "cadline/backend/maintenance"]
|
||||
path = cadline/backend/maintenance
|
||||
url = ssh://git@git.cadline.hu:22222/cadline_web/maintenance.git
|
||||
branch = master
|
||||
|
||||
127
AGENTS.md
Normal file
127
AGENTS.md
Normal file
@ -0,0 +1,127 @@
|
||||
# AGENTS.md — machine-facing rules for this repo
|
||||
|
||||
**Read this before touching anything.** `README.md` explains the project to a human;
|
||||
this file states the rules an automated agent must follow. Where the two seem to
|
||||
disagree, this file wins for process questions.
|
||||
|
||||
---
|
||||
|
||||
## 1. What this repo is
|
||||
|
||||
It produces **clean, deployable code baselines** for the Cadline web sites hosted on
|
||||
`tanis.cadline.hu`. A baseline serves two purposes at once:
|
||||
|
||||
1. the **known-good reference** the HIDS baseline-diff compares the live docroot against;
|
||||
2. the **source of truth for deployment** — the tree that will be pushed to the server,
|
||||
replacing direct editing on the live host.
|
||||
|
||||
The repo stores baseline **constituents plus a generator**, never the deployed tree.
|
||||
`build-baseline.sh` assembles `out/` deterministically; `out/` is git-ignored.
|
||||
|
||||
## 2. One site per branch
|
||||
|
||||
There is **no per-site repo**. Sites and CMS versions are separated by **git branch**:
|
||||
|
||||
| Branch | Site | CMS core |
|
||||
|---|---|---|
|
||||
| `main` | www.archline.hu | Joomla 3.8.11 |
|
||||
| `site/archlinexp.eu` | www.archlinexp.eu | Joomla 3.9.2 |
|
||||
|
||||
`build-baseline.sh` is **site-agnostic**: it walks `core/`, `packages/`, `deployed/`,
|
||||
`cadline/`, `overrides/` and contains no site-specific logic. A new site means a new
|
||||
branch with different *content*, **not** a modified script. If you find yourself editing
|
||||
the generator to special-case a site, stop — that is the wrong branch of the design.
|
||||
|
||||
Site branches are **parallel and long-lived**. They do **not** merge into `main`.
|
||||
Only repo-wide things (this file, `README.md`, the generator, `lib/`) belong on `main`.
|
||||
|
||||
## 3. The cardinal rule: never build a baseline from an infected tree
|
||||
|
||||
Every one of these sites is or was compromised. A baseline built by copying the live
|
||||
docroot **would cement the malware into the reference and into every future deploy**.
|
||||
|
||||
Therefore:
|
||||
|
||||
- Take the CMS core from the **official upstream package**, never from live.
|
||||
- Take the site's own code from the **developer source repo**
|
||||
(`git.cadline.hu/cadline/websource`, per-site subdirectory), never from live.
|
||||
- Only for extensions with **no obtainable upstream** may files come from live — and
|
||||
then they are *vetted*, not trusted.
|
||||
- **The build output must be double-checked before it is used.** This is not optional:
|
||||
the archline baseline's first candidate contained 34 malware files, and only the
|
||||
double-check caught them.
|
||||
|
||||
## 4. Mandatory verification (do not skip, do not weaken)
|
||||
|
||||
After every build, run all of these against `out/`:
|
||||
|
||||
1. **YARA** with the operator's ruleset. Expected: **zero** hits.
|
||||
2. **IOC paths**: not one entry of `malware-iocs.paths` may exist under `out/`.
|
||||
3. **Disguise sweep**: no `*.php.json`, `*.phar*`, `*.phtml*`, `_h3x_*`; no `.json` file
|
||||
containing a PHP open tag.
|
||||
4. **Structural check** — the rule that catches what content matching misses:
|
||||
|
||||
> An extra file on a **CMS core component path** that is **not** a template override
|
||||
> (`templates/<tpl>/html/...`) is **not a module**. It is a leftover or a plant.
|
||||
|
||||
Diff `out/` against the vanilla package: for every path under a core component that
|
||||
the vanilla does not have, decide explicitly. This rule found a file-write webshell
|
||||
(`components/com_mailto/mail.php`) and an Akeeba Kickstart leftover carrying a
|
||||
password — **both invisible to YARA**.
|
||||
5. **Core version**: assert the built `libraries/src/Version.php` is the intended release.
|
||||
|
||||
A contaminated baseline must **never** be shipped. If verification fails, fix the
|
||||
constituents and rebuild — do not filter the symptom out of `out/`.
|
||||
|
||||
## 5. Repository boundary (hard rule)
|
||||
|
||||
This repo lives on **`git.cadline.hu`** — the customer's Gitea, a different server from
|
||||
the operator's. Therefore:
|
||||
|
||||
- **Never reference the operator's infrastructure here.** No operator issue URLs, no
|
||||
operator hostnames, no `Addresses-Issue:` trailers pointing at operator trackers —
|
||||
not in files, not in commit messages, not in branch names.
|
||||
- Issue tracking for this work lives on the operator side and is **not** linked from
|
||||
here. Describe *what* and *why* in the commit message itself instead.
|
||||
- An `@illusion.hu` e-mail address in a commit trailer (authorship attribution) is the
|
||||
one accepted exception.
|
||||
|
||||
## 6. Commits and branches
|
||||
|
||||
- Conventional Commits, **English**, subject ≤72 chars, imperative mood.
|
||||
- Trailer: `Assisted-by: claude-code@<model>` on AI-assisted commits.
|
||||
- **No** `Addresses-Issue:` / `Closes` (see §5).
|
||||
- Never force-push a branch someone else may be building on; on your own fresh branch it
|
||||
is fine (use `--force-with-lease`).
|
||||
- **Never push to `main`.** Open a pull request; a human merges.
|
||||
- **Never commit a secret.** These trees legitimately contain third-party code with
|
||||
embedded credentials — if you must refer to one, cite `file:line` and the *type*, never
|
||||
the value. Redaction applies to commit messages, docs and any output you produce.
|
||||
|
||||
## 7. Layer semantics (what goes where)
|
||||
|
||||
| Directory | Holds | Source of truth |
|
||||
|---|---|---|
|
||||
| `core/` | CMS official package, deployed form, installer removed | upstream vendor |
|
||||
| `packages/<slug>/` | extensions with obtainable upstream; modified ones authored as two commits (pristine → delta) so `git diff` documents our change | upstream + our patch |
|
||||
| `deployed/<slug>/` | extensions with **no** obtainable upstream: vetted live files | live (vetted) |
|
||||
| `cadline/<slug>/` | the site's own code | developer source repo |
|
||||
| `overrides/` | the site's modifications to core files, **on the current core's base** | developer source |
|
||||
| `malware-iocs.paths` | paths excluded from the build (droppers, leftovers) | this repo |
|
||||
|
||||
`overrides/` rsyncs **last**, so it wins over `core/`.
|
||||
|
||||
**Do not take a customized core file from live.** The updater skips customized files, so
|
||||
the live copy silently stays on an old base (the eu site ran a 3.9.2 version string over
|
||||
pre-3.8.13 `com_users` code). Take vanilla for the version you target, then apply only
|
||||
the genuine delta.
|
||||
|
||||
## 8. Definition of done
|
||||
|
||||
A baseline branch is done when:
|
||||
|
||||
- `build-baseline.sh` runs unmodified and produces `out/`;
|
||||
- all five checks in §4 pass, and the numbers are recorded in the commit message;
|
||||
- every layer's provenance is traceable (which file came from upstream, from the
|
||||
developer source, or vetted from live);
|
||||
- no secret value appears anywhere in the diff or the message.
|
||||
171
README.md
171
README.md
@ -1,52 +1,81 @@
|
||||
# www.archline.hu — clean baseline (constituents + generator)
|
||||
# Cadline web baselines — constituents + generator
|
||||
|
||||
This repo produces the **clean code baseline** of the www.archline.hu docroot
|
||||
(Cadline, Joomla 3.8.11, host `tanis.cadline.hu`) — the post-compromise, malware-free,
|
||||
faithful reproduction of the live server's source files.
|
||||
This repo produces the **clean code baselines** of the Cadline web sites hosted on
|
||||
`tanis.cadline.hu` — malware-free, faithful reproductions of what each site's source
|
||||
*should* be, assembled from clean sources rather than copied from the live server.
|
||||
|
||||
The baseline is the **input** to the HIDS baseline-diff verifier: a per-vhost,
|
||||
known-good reference tree the verifier compares the live docroot against
|
||||
(`baseline-match / data / malware / residual`). This repo only *produces* that tree;
|
||||
the verification runs on the HIDS side.
|
||||
A baseline has **two jobs**:
|
||||
|
||||
1. **Known-good reference.** The HIDS baseline-diff compares the live docroot against it
|
||||
and classifies every file (`baseline-match / data / malware / residual`).
|
||||
2. **Deployment source of truth.** The baseline is what gets deployed to the server, so
|
||||
that code reaches production through git instead of being edited directly on the live
|
||||
host. Because the live tree is regenerated from the baseline, cleanup becomes a
|
||||
by-product of deployment: anything not in the source disappears.
|
||||
|
||||
The repo stores the baseline **constituents plus a generator** — never the deployed tree.
|
||||
|
||||
---
|
||||
|
||||
## Building the baseline (read this first)
|
||||
## Sites and branches
|
||||
|
||||
The repo does **not** contain the deployed docroot — it contains the baseline
|
||||
*constituents* plus a generator script. Run the script to produce the deployed tree:
|
||||
There is **no separate repo per site**. Sites (and CMS versions) live on **branches**:
|
||||
|
||||
| Branch | Site | CMS core | Own code source |
|
||||
|---|---|---|---|
|
||||
| `main` | www.archline.hu | Joomla 3.8.11 | reconstructed here (no usable developer source) |
|
||||
| `site/archlinexp.eu` | www.archlinexp.eu | Joomla 3.9.2 | `cadline/websource` → `www.archlinexp.eu/` |
|
||||
|
||||
`build-baseline.sh` is **site-agnostic** — it walks the constituent directories and has
|
||||
no site-specific logic. A new site is a new branch with different *content*, not a new
|
||||
script and not a new repo. Site branches are parallel and long-lived; they do not merge
|
||||
into `main`. Only repo-wide files (this README, `AGENTS.md`, the generator, `lib/`) live
|
||||
on `main` for every branch to inherit.
|
||||
|
||||
Automated agents: read [`AGENTS.md`](AGENTS.md) first — it carries the rules
|
||||
(verification, repo boundary, layer semantics) in machine-facing form.
|
||||
|
||||
---
|
||||
|
||||
## Building a baseline (read this first)
|
||||
|
||||
```sh
|
||||
# 1. Clone WITH submodules (common_cadline_libraries + maintenance are submodules):
|
||||
# 1. Clone, and check out the branch of the site you want:
|
||||
git clone --recurse-submodules ssh://git@git.cadline.hu:22222/cadline_web/www_archline_hu.git
|
||||
cd www_archline_hu
|
||||
# (if you already cloned without --recurse-submodules:)
|
||||
git checkout site/archlinexp.eu # or stay on main for www.archline.hu
|
||||
# (if you cloned without --recurse-submodules and the branch uses submodules:)
|
||||
git submodule update --init
|
||||
|
||||
# 2. Generate the baseline:
|
||||
# 2. Generate:
|
||||
./build-baseline.sh # → ./out/
|
||||
|
||||
# 3. Use ./out/ as the per-vhost vanilla_ref (the known-good reference tree).
|
||||
# 3. Use ./out/ as that site's known-good reference / deploy source.
|
||||
```
|
||||
|
||||
`out/` is the deployed **code** docroot (~23.5k files). It is git-ignored and fully
|
||||
regenerated on every run (the script is idempotent — it `rm -rf out/` first). Point the
|
||||
verifier's baseline-diff at `out/`, or copy it to wherever the verifier expects the ref.
|
||||
`out/` is the deployed **code** docroot. It is git-ignored and fully regenerated on every
|
||||
run (the script `rm -rf out/` first, so it is idempotent).
|
||||
|
||||
**Prerequisites:** `bash`, `rsync`, `git` (for submodules), `find`, `sed`. No PHP, no
|
||||
build toolchain, no network at build time (submodules are already cloned).
|
||||
`lib/jmap.py` (python3) is a *maintenance* tool used only when authoring a package's
|
||||
pristine commit — **it is not invoked by `build-baseline.sh`**.
|
||||
**Prerequisites:** `bash`, `rsync`, `git`, `find`, `sed`. No PHP, no build toolchain, no
|
||||
network at build time. `lib/jmap.py` (python3) is an *authoring* aid used when preparing a
|
||||
package's pristine commit — **`build-baseline.sh` never invokes it**.
|
||||
|
||||
**What `out/` contains / excludes:**
|
||||
- **Contains:** Joomla 3.8.11 core + every installed extension (110 components, ~98
|
||||
modules, 164 plugins, 8 templates) + the Cadline-own code — all as deployed files.
|
||||
- **Excludes:** malware/IOCs (see [`malware-iocs.md`](malware-iocs.md)) and runtime
|
||||
**data** (`cache/`, `tmp/`, `logs/`, `images/`, `public/`, media data). The result is
|
||||
code only.
|
||||
- Byte-matches the live docroot for all legit code; it is intentionally **clean** on the
|
||||
4 files the attacker infected (3 trojanized core files + `shaper_helix3/index.php`),
|
||||
so the verifier flags those on the live server. Verified: non-malware code residual = 0.
|
||||
|
||||
- **Contains:** the CMS core + every installed extension + the Cadline-own code, as
|
||||
deployed files.
|
||||
- **Excludes:** malware and known planted paths (`malware-iocs.paths`), and runtime
|
||||
**data** (`cache/`, `tmp/`, `logs/`, `images/`, `public/`, media). The result is code
|
||||
only — which is also why a deploy must never wipe the data directories.
|
||||
|
||||
### Verify before you trust it
|
||||
|
||||
The build output is **not** trusted until checked. This is not ceremony: the first
|
||||
archline baseline candidate contained 34 malware files, and only the check caught them;
|
||||
on the eu site the check caught a file-write webshell and a leftover Akeeba restoration
|
||||
file that carried a password — **neither of which YARA flagged**. See `AGENTS.md` §4 for
|
||||
the full checklist (YARA, IOC paths, disguise sweep, the structural core-namespace rule,
|
||||
core version).
|
||||
|
||||
---
|
||||
|
||||
@ -54,49 +83,77 @@ pristine commit — **it is not invoked by `build-baseline.sh`**.
|
||||
|
||||
| Path | What | How `build-baseline.sh` uses it |
|
||||
|---|---|---|
|
||||
| `core/` | Joomla 3.8.11 official package (deployed form) | rsync → `out/`, minus demo assets + data dirs |
|
||||
| `packages/<slug>/` | 5 upstream-obtainable extensions, deployed-layout, reconciled to live bytes. Modified ones are two commits (pristine upstream → live delta) so `git log`/`git diff` shows exactly how we differ from upstream. | rsync → `out/` |
|
||||
| `deployed/<slug>/` | ~55 no-source extensions: vetted live files (deployed layout). `_shared/` holds cross-extension language/vendor/manifests. | rsync → `out/` |
|
||||
| `cadline/<slug>/` | Cadline own-code. `cadline/backend/common_cadline_libraries` and `…/maintenance` are **git submodules** of the developer repos (cadcommonlib / maintenance). | rsync → `out/` (`.git` excluded) |
|
||||
| `overrides/` | Cadline core modifications (live versions overlaid on the package core) + a few package-missing core files. | rsync → `out/` (last, so it wins) |
|
||||
| `lib/jmap.py` | Generic Joomla manifest→deployed-path mapper (authoring aid only). | not used at build time |
|
||||
| `core/` | CMS official package (deployed form, installer removed) | rsync → `out/`, minus demo assets + data dirs |
|
||||
| `packages/<slug>/` | extensions with an obtainable upstream, deployed-layout. Modified ones are authored as two commits (pristine upstream → our delta) so `git log`/`git diff` shows exactly how we differ. | rsync → `out/` |
|
||||
| `deployed/<slug>/` | extensions with **no** obtainable upstream: vetted live files, deployed layout. | rsync → `out/` |
|
||||
| `cadline/<slug>/` | Cadline own-code. On `main` this includes git submodules of the developer repos (cadcommonlib / maintenance). | rsync → `out/` (`.git` excluded) |
|
||||
| `overrides/` | the site's modifications to core files, on the current core's base. Rsynced **last**, so it wins. | rsync → `out/` |
|
||||
| `malware-iocs.paths` | machine-readable exclusion list (droppers, leftovers) | build step 6 |
|
||||
| `lib/jmap.py` | Joomla manifest→deployed-path mapper (authoring aid only) | not used at build time |
|
||||
|
||||
Details: [`RUNBOOK.md`](RUNBOOK.md) (recipe + module inventory),
|
||||
[`PROVENANCE.md`](PROVENANCE.md) (per-extension origins),
|
||||
[`malware-iocs.md`](malware-iocs.md) (excluded IOC set).
|
||||
[`malware-iocs.md`](malware-iocs.md) (the excluded IOC set, `main`).
|
||||
|
||||
---
|
||||
|
||||
## Updating the baseline
|
||||
## Why customized core files never come from live
|
||||
|
||||
- **Developer-controlled code** (`common_cadline_libraries`, `maintenance`): the
|
||||
developer pushes to the cadcommonlib / maintenance repos, then:
|
||||
A CMS updater skips files the site has customized. The version string moves forward; the
|
||||
customized files silently stay on the old base. The eu site demonstrated this: it
|
||||
reported Joomla 3.9.2 while its `com_users` was still pre-3.8.13 code — 31 stale files.
|
||||
|
||||
So: take **vanilla for the version you target**, then apply only the genuine delta into
|
||||
`overrides/`. Never lift the customized file from live — that would preserve the stale
|
||||
(and possibly vulnerable) base forever.
|
||||
|
||||
---
|
||||
|
||||
## This branch: www.archline.hu (`main`)
|
||||
|
||||
Joomla 3.8.11, host `tanis.cadline.hu`. `out/` ≈ 23.5k files. It byte-matches the live
|
||||
docroot for all legit code and is intentionally **clean** on the 4 files the attacker
|
||||
infected (3 trojanized core files + `shaper_helix3/index.php`), so the verifier flags
|
||||
those on the live server. Verified: non-malware code residual = 0.
|
||||
|
||||
The own-code here is **reconstructed in this repo**, because the developer source
|
||||
(`cadline/websource`) does not contain this site — its `sub.archline.hu` directory is an
|
||||
older snapshot missing ~630 files and the third-party module layer entirely.
|
||||
|
||||
### Updating
|
||||
|
||||
- **Developer-controlled code** (`common_cadline_libraries`, `maintenance`): the developer
|
||||
pushes to the cadcommonlib / maintenance repos, then:
|
||||
```sh
|
||||
git submodule update --remote # pull the developer's latest
|
||||
./build-baseline.sh # regenerate out/
|
||||
git add -A && git commit # record the new submodule pointers
|
||||
```
|
||||
- **Everything else** (Joomla core EOL, 3rd-party extensions): effectively frozen; if a
|
||||
legit change ever lands, re-sync the affected `deployed/<slug>/` or `overrides/` from
|
||||
the live docroot and commit.
|
||||
- **Everything else** (EOL core, 3rd-party extensions): effectively frozen. If a legit
|
||||
change lands, re-sync the affected `deployed/<slug>/` or `overrides/` and commit.
|
||||
|
||||
**Known divergence (heads-up for the verifier):** `common_cadline_libraries` and
|
||||
`maintenance` currently take the *authoritative* submodule HEAD content, which differs
|
||||
from the current live docroot (mixed CRLF/LF + a content drift on
|
||||
`crm_hardlock.class.php` / `POfile.php`) because live was not last deployed from those
|
||||
HEADs. The verifier will flag this until live is re-deployed from the submodules or the
|
||||
drift is reconciled. Line-ending normalization, if wanted, is a verifier-side choice.
|
||||
`maintenance` take the *authoritative* submodule HEAD content, which differs from the
|
||||
current live docroot (mixed CRLF/LF + a content drift on `crm_hardlock.class.php` /
|
||||
`POfile.php`) because live was not last deployed from those HEADs. The verifier flags
|
||||
this until live is re-deployed or the drift is reconciled.
|
||||
|
||||
## This branch: www.archlinexp.eu (`site/archlinexp.eu`)
|
||||
|
||||
Joomla 3.9.2. `out/` ≈ 12.3k files. Built from clean sources end to end: vanilla 3.9.2
|
||||
core + the developer source's own code + a vetted module layer, with only 5 genuine core
|
||||
modifications in `overrides/`. The developer source for this site is **complete and
|
||||
clean** (its `com_users` is already on the 3.9.2 base), which is why this site — not
|
||||
archline.hu — was the first to get a fully source-built baseline.
|
||||
|
||||
---
|
||||
|
||||
## Authority
|
||||
|
||||
The live docroot (RO mirror) is the source of truth for reproduction; the developer git
|
||||
repos are authoritative for the code they own. The earlier single-commit "monolith"
|
||||
baseline is an unvalidated helper only (it dropped extension manifests and clean core
|
||||
files and kept installer junk) — it is not a target.
|
||||
|
||||
## References
|
||||
|
||||
- The archline.hu 2026 security audit and incident analysis (operator-held).
|
||||
- The excluded malware set is documented in [`malware-iocs.md`](malware-iocs.md).
|
||||
- The **upstream vendor package** is authoritative for the CMS core.
|
||||
- The **developer source repo** is authoritative for the code it owns.
|
||||
- The **live docroot** (read-only mirror) is authoritative only for reproduction fidelity
|
||||
and for extensions that have no obtainable upstream — and even then the files are
|
||||
vetted, never trusted.
|
||||
- The earlier single-commit "monolith" baseline is an unvalidated helper only (it dropped
|
||||
extension manifests and clean core files and kept installer junk) — not a target.
|
||||
|
||||
@ -102,4 +102,14 @@ if [ -f "$ROOT/malware-iocs.paths" ]; then
|
||||
done < "$ROOT/malware-iocs.paths"
|
||||
fi
|
||||
|
||||
# (d) .htaccess-based PHP-enable persistence — apache-config droppers the
|
||||
# content/extension filters above miss (no <?php tag, not *.php.json).
|
||||
# Mirrors the malware_htaccess_php_enable YARA rule (illusion/hids#183).
|
||||
log "exclude: .htaccess-based php-enable persistence"
|
||||
find "$OUT" -type f \( -name '.htaccess' -o -name '.htaccess.*' \) 2>/dev/null | while IFS= read -r h; do
|
||||
if grep -IlqE 'Add(Type|Handler)[[:space:]]+application/x-httpd-php[0-9]?[[:space:]]+\.(json|jpe?g|png|gif|txt|ico|css|html?|xml|svg|bak|log)|php_flag[[:space:]]+engine[[:space:]]+on' "$h" 2>/dev/null; then
|
||||
log " drop (htaccess-php-enable): ${h#"$OUT"/}"; rm -f "$h"
|
||||
fi
|
||||
done
|
||||
|
||||
log "baseline built at: $OUT ($(find "$OUT" -type f | wc -l) files)"
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 423fec9b929b381339d71623fc621a998a6e3e0f
|
||||
Subproject commit 6bd9cb2e1c0844e57fa9cad83ba2baa6e056418d
|
||||
@ -1 +1 @@
|
||||
Subproject commit 11f1a543340bb7a2f03c3647dca03b7bd79783d0
|
||||
Subproject commit 7e8036235b05d493363791b46bb2ebdc33bb5f2e
|
||||
@ -1,544 +0,0 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* eredeti url: http://www.archlinexp.com/index.php?menu=tips2012&lang=hun&version=1&session=OTA0NkEzMTlBMDcwQTE3NkE4NzRBMzc1QTc3NkEwNzJBNTc0Q0Y3NUE3NzdBMjdGQTc3RUE4NzJBNDcwQTgxOUNGNzVDRjc3QTA3NkEyNzdBMzZCQTM3MEJENzVBNTA3QkQ3MkEwN0ZBMDAzQTYxOUEyNjhBOTY4QTA3NEJFNzZCRTc3RTIyMUY1MjNCRTI4QTE3N0E4NzE=
|
||||
* eredeti url: http://old.archlinexp.com/tips/tips2009/hun/1/OTA0NkEzMTlBMDcwQTE3NkE4NzRBMzc1QTc3NkEwNzJBNTc0Q0Y3NUE3NzdBMjdGQTc3RUE4NzJBNDcwQTgxOUNGNzVDRjc3QTA3NkEyNzdBMzZCQTM3MEJENzVBNTA3QkQ3MkEwN0ZBMDAzQTYxOUEyNjhBOTY4QTA3NEJFNzZCRTc3RTIyMUY1MjNCRTI4QTE3N0E4NzE=/46.139.109.235
|
||||
* új url: http://www.archlinexp.com/maintenance/tips.php?lang=hun&version=2&session=OTA0NkEzMTlBMDcwQTE3NkE4NzRBMzc1QTc3NkEwNzJBNTc0Q0Y3NUE3NzdBMjdGQTc3RUE4NzJBNDcwQTgxOUNGNzVDRjc3QTA3NkEyNzdBMzZCQTM3MEJENzVBNTA3QkQ3MkEwN0ZBMDAzQTYxOUEyNjhBOTY4QTA3NEJFNzZCRTc3RTIyMUY1MjNCRTI4QTE3N0E4NzE=
|
||||
* logfilter=0 - csak a legfontosabb logok;
|
||||
* logfilter=10 - minden logot küld;
|
||||
******************************************************************************/
|
||||
include ("config.php");
|
||||
include ("version.php");
|
||||
include ("functions.php");
|
||||
include ("mtips.php");
|
||||
if (!class_exists('crmHelper')) require_once("class/crmHelper.class.php");
|
||||
|
||||
error_log(print_r($_GET,TRUE),3,"../tmp/error_tips.log");
|
||||
|
||||
$version = New Version();
|
||||
$mtips = New Mtips();
|
||||
|
||||
$user_lang_db = $user_lang = $origlang = (isset($_GET['lang']) ? trim($_GET['lang']) : NULL);
|
||||
$user_version = (isset($_GET['version']) ? trim($_GET['version']) : NULL);
|
||||
$user_ssID = (isset($_GET['session']) ? trim($_GET['session']) : NULL);
|
||||
$user_IP = $_SERVER['REMOTE_ADDR'];
|
||||
$osdata = '';
|
||||
$time=time();
|
||||
$namirialRangeMin=940001;
|
||||
$namirialRangeMax=949999;
|
||||
$BIMLadderRangeMin=920001;
|
||||
$BIMLadderRangeMax=929999;
|
||||
|
||||
if( strstr($_SERVER['REQUEST_URI'],"ize") ) print $mtips->tips_src.$data['current_lang'].'/';
|
||||
|
||||
if(!$user_lang) { print('No language id given, try to add /en to the uri'); }
|
||||
|
||||
if(!is_numeric($user_version)) { print('Invalid version id sent: '.$user_version); }
|
||||
|
||||
if(!in_array($user_lang,$mtips->existing_lang)) { $user_lang = 'eng'; }
|
||||
|
||||
$user_lang = $mtips->lang_check($user_lang);
|
||||
|
||||
$settings = $mtips->read_settings($user_lang);
|
||||
|
||||
//get country name from ip
|
||||
$locale=@file_get_contents("http://freegeoip.net/xml/".$user_IP,FALSE, stream_context_create(array('http'=>array('timeout'=>2)) ) );
|
||||
$tomb = json_decode(json_encode(simplexml_load_string($locale)),TRUE);
|
||||
$ctrname=$tomb["CountryName"];
|
||||
$temp=explode(".", gethostbyaddr($user_IP));
|
||||
|
||||
if(!isset($ctrname) || $ctrname=='') $ctrname = 'unknown';
|
||||
|
||||
//if ($_SERVER['REMOTE_ADDR']=='188.6.239.155') {print "user_lang_db: ".$user_lang_db." user_version: ".$user_version." user_ssID: ".$user_ssID; die(); }
|
||||
|
||||
if($user_lang_db && /*$user_version && */ $user_ssID!='')
|
||||
{
|
||||
$str_decoded = base64_decode($user_ssID); //decode the session string
|
||||
|
||||
sscanf(substr($str_decoded,0,4),'%04x',$keyDec);
|
||||
$encoded = str_split(substr($str_decoded,4),4);
|
||||
$decoded = '';
|
||||
|
||||
foreach($encoded as $e)
|
||||
{
|
||||
sscanf($e,'%04x',$temp);
|
||||
if(strlen(substr(sprintf('%x',$temp^$keyDec),2))>0)
|
||||
{
|
||||
$decoded .= chr(hexdec(substr(sprintf('%04x',$temp^$keyDec),2)));
|
||||
$decoded .= chr(hexdec(substr(sprintf('%04x',$temp^$keyDec),0,2)));
|
||||
}
|
||||
else
|
||||
{
|
||||
$decoded .= chr(hexdec(substr(sprintf('%04x',$temp^$keyDec),2)));
|
||||
}
|
||||
}
|
||||
|
||||
$pos = strpos($decoded, '#'); //ba 2018.07.04. atterunk a # separatorra. Ezidaig nem fordulhatott elo benne ilyen jel
|
||||
if($pos === false)
|
||||
{
|
||||
$separator = '_';
|
||||
}
|
||||
else
|
||||
{
|
||||
$separator = '#';
|
||||
}
|
||||
$numdata = substr_count($decoded, $separator); //ba most már kapunk adatot az oprendszerrol is
|
||||
|
||||
//error_log("decoded = ".print_r($decoded,FALSE)." pwd: ".$pwd." build: ".$build." user_version: ".$user_version." idokod: ".$idokod."\n",3,"../tmp/error.log");
|
||||
if( $numdata >= 11 )
|
||||
{
|
||||
list($empty, $pwd, $compID, $build, $ctrID, $idokod, $osdata, $usGCMan, $usGCType, $usGCDriverVer, $npID, $partnerID, $name, $email, $company, $phone, $newsletter) = split($separator, $decoded);
|
||||
}
|
||||
elseif( $numdata >= 6 )
|
||||
{
|
||||
list($empty, $pwd, $compID, $build, $ctrID, $idokod, $osdata, $usGCMan, $usGCType, $usGCDriverVer, $npID, $partnerID) = split($separator, $decoded);
|
||||
}
|
||||
else
|
||||
{
|
||||
list($empty, $pwd, $compID, $build, $ctrID, $idokod) = split($separator, $decoded);
|
||||
}
|
||||
|
||||
//if ($_SERVER['REMOTE_ADDR']=='46.139.14.111') { print "decoded = ".print_r( explode("_",$decoded),FALSE)."\n\n<br>user_version: ".$user_version." , idokod: ".$idokod." npID: ".$npID." partnerID: ".$partnerID." pwd: ".$pwd; /*die();*/ }
|
||||
|
||||
<<<<<<< HEAD
|
||||
if(isset($npID)){
|
||||
$compid = crmHelper::AddOrUpdateComputer($npID);
|
||||
}
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> f2ebce6b191a229c054099f929f7145b78d46007
|
||||
/*******************************************************************************
|
||||
*NAMIRIAL-os automata kulcskiadás és program létrehozás
|
||||
******************************************************************************/
|
||||
if (isset($npID) && $npID>'' && isset($partnerID) && $partnerID=='2nt' && isset($idokod) && $idokod>'' && isset($pwd) && $pwd>'')
|
||||
<<<<<<< HEAD
|
||||
{
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`nonprofit` WHERE computer_id='".$compid."' AND partnerID = '2nt' LIMIT 1;");
|
||||
=======
|
||||
{
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`computers` WHERE `computer_id`='".$npID."' LIMIT 1;");
|
||||
$res4=MySqlHelper::getInstance()->fetchAssoc();
|
||||
|
||||
if(empty($res4)){
|
||||
$comp=array(
|
||||
'computer_id'=>$npID,
|
||||
'last_mod'=>date('Y-m-d',time()));
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`computers`",$comp);
|
||||
}
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`computers` WHERE `computer_id`='".$npID."' LIMIT 1;");
|
||||
$compid=MySqlHelper::getInstance()->fetchAssoc();
|
||||
|
||||
$programVersion=substr($pwd, 7, 2);
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`nonprofit` WHERE computer_id='".$compid[0]['id']."' AND partnerID = '2nt' AND verID =".$programVersion." LIMIT 1;");
|
||||
>>>>>>> f2ebce6b191a229c054099f929f7145b78d46007
|
||||
$res=MySqlHelper::getInstance()->fetchAssoc();
|
||||
//ba nincs ehhez a gephez meg non-profit program regisztralva
|
||||
if (empty($res))
|
||||
{
|
||||
$hlNum=tryToAlloc($namirialRangeMin,$namirialRangeMax);
|
||||
$arrIdokod=explode("-", $idokod);
|
||||
$isid=$arrIdokod[1];
|
||||
$type=substr($pwd, 6, 1);
|
||||
$verid=substr($pwd, 7, 2);
|
||||
$ver=$version->getVersion(array('verPassword8and9'=>$verid));
|
||||
$interval=90;
|
||||
$pass=generatePassword($hlNum,0,$type,$ver['verCode']);
|
||||
$aktKod=generateTimeCode($pass,$isid,$interval);
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`u_emails` WHERE `email`='{$email}' LIMIT 1;");
|
||||
$exist=MySqlHelper::getInstance()->fetchAssoc();
|
||||
if (!$exist) //ba elsodleges szempont, hogy a megadott email cimmel van-e crm bejegyzes
|
||||
{
|
||||
//ba felvesszuk a user-t
|
||||
$userdata=array(
|
||||
'strName'=>$name,
|
||||
'strEMail'=>$email,
|
||||
'strCompany'=>$company,
|
||||
'strTel'=>$phone,
|
||||
'old_db'=>'clusers_eng',
|
||||
'nCtrID'=>39,
|
||||
'dateInsert'=>$time);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`users`",$userdata);
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT nUserID as nUserID FROM `".CRMADATBAZIS."`.`users` WHERE strEMail='{$email}' AND strName='{$name}' limit 1");
|
||||
$userQuery=MySqlHelper::getInstance()->fetchAssoc();
|
||||
$userID = $userQuery[0]['nUserID'];
|
||||
|
||||
//ba felvesszuk az email cimet a userhez
|
||||
$emaildata=array(
|
||||
'email'=>$email,
|
||||
'nUserID'=>$userID,
|
||||
'newsletter'=>$newsletter
|
||||
);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`u_emails`",$emaildata);
|
||||
}
|
||||
else
|
||||
{
|
||||
//ba a meglevo userhez fogjuk kotni a programot
|
||||
$userID=$exist[0]['nUserID'];
|
||||
}
|
||||
|
||||
//ba regisztraljuk hozza a non-profit programot
|
||||
$nonprofit=array(
|
||||
'isid'=>$isid,
|
||||
'verid'=>$verid,
|
||||
'hlID'=>$hlNum,
|
||||
'nUserID'=>$userID,
|
||||
'add_datetime'=>date('Y-m-d H:i:s',$time),
|
||||
'expire_datetime'=>date('Y-m-d H:i:s', strtotime('+90 day', $time)),
|
||||
'activation_datetime'=>date('Y-m-d H:i:s',$time),
|
||||
'old_db'=>'clusers_eng',
|
||||
'partnerID'=>$partnerID,
|
||||
'enabled'=>'Y',
|
||||
'computer_id'=>$compid);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`nonprofit`",$nonprofit);
|
||||
|
||||
//Namirial non-profit kód aktiválás beszúrása crm -> u_history táblába
|
||||
$esemeny=array(
|
||||
'nUserID'=>$userID,
|
||||
'nTopicID'=>366,
|
||||
'dateEvent'=>date('Y-m-d H:i:s',$time),
|
||||
'strPlace'=>'',
|
||||
'strInfo'=>'Namirial nonprofit kulcs aktiválás',
|
||||
'nManagerID'=>36,
|
||||
'insertDate'=>date('Y-m-d H:i:s',$time));
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`u_history`",$esemeny);
|
||||
|
||||
$hardlock=array(
|
||||
'hlNum'=>$hlNum,
|
||||
'hlCtrID'=>39,
|
||||
'hlLan'=>0,
|
||||
'hlStat'=>1,
|
||||
'hlDateIssue'=>date('Y-m-d',$time),
|
||||
'hlManID'=>36,
|
||||
'hlTime'=>date('Y-m-d H:i:s',$time),
|
||||
'hlUser'=>$userID,
|
||||
'hlDealer'=>62103,
|
||||
'bUjithato'=>1,
|
||||
'old_db'=>'clusers_eng');
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`hardlock`",$hardlock);
|
||||
|
||||
$program=array(
|
||||
'prTypeID'=>$type,
|
||||
'prVerID'=>$ver['verID'],
|
||||
'prLan'=>0,
|
||||
'prPass'=>trim($pass),
|
||||
'prSellDate'=>date('Y-m-d',$time),
|
||||
'prActDate'=>date('Y-m-d',$time+$interval*86400), // 90 nap
|
||||
'prFizetve'=>date('Y-m-d',$time+$interval*86400),
|
||||
'prActCode'=>trim($aktKod),
|
||||
'prTime'=>date('Y-m-d H:i:s',$time),
|
||||
'prLastMod'=>date('Y-m-d H:i:s',$time),
|
||||
'prContact'=>8, // Non-profit
|
||||
'prHlNum'=>$hlNum, // 99xxxx
|
||||
'prManID'=>36, // web
|
||||
'prStat'=>0,
|
||||
'prHiType'=>1, // 1 Rendelés | 2 Típus Váltás | 3 Frissítés | 4 Auto Friss.
|
||||
);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`h_programs`",$program);
|
||||
|
||||
$pwd = $pass; //ba 2018.07.02. mostantol az uj jelszava a usernek a most generalt, 94-es lesz, nem pedig a 93-as!
|
||||
}
|
||||
else
|
||||
{
|
||||
//ba ehhez a gephez mar volt non-profit regisztracio, keressuk ki a sorozatszamot neki
|
||||
$hardlockID = $res[0]['hlID'];
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`h_programs` WHERE prHlNum='{$hardlockID}' limit 1");
|
||||
$programQuery=MySqlHelper::getInstance()->fetchAssoc();
|
||||
$pwd = $programQuery[0]['prPass'];
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
*BIMLadder-es automata kulcskiadás és program létrehozás
|
||||
******************************************************************************/
|
||||
else if (isset($npID) && $npID>'' && isset($partnerID) && $partnerID=='kbl' && isset($idokod) && $idokod>'' && isset($pwd) && $pwd>'')
|
||||
{
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`nonprofit` WHERE computer_id='".$compid."' AND partnerID = 'kbl' LIMIT 1;");
|
||||
$res=MySqlHelper::getInstance()->fetchAssoc();
|
||||
//ba nincs ehhez a gephez meg non-profit program regisztralva
|
||||
if (empty($res))
|
||||
{
|
||||
$hlNum=tryToAlloc($BIMLadderRangeMin,$BIMLadderRangeMax);
|
||||
$arrIdokod=explode("-", $idokod);
|
||||
$isid=$arrIdokod[1];
|
||||
$type=substr($pwd, 6, 1);
|
||||
$verid=substr($pwd, 7, 2);
|
||||
$ver=$version->getVersion(array('verPassword8and9'=>$verid));
|
||||
$interval=30; //ba !!! nem 90!!!
|
||||
$pass=generatePassword($hlNum,0,$type,$ver['verCode']);
|
||||
$aktKod=generateTimeCode($pass,$isid,$interval);
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`u_emails` WHERE `email`='{$email}' LIMIT 1;");
|
||||
$exist=MySqlHelper::getInstance()->fetchAssoc();
|
||||
if (!$exist) //ba elsodleges szempont, hogy a megadott email cimmel van-e crm bejegyzes
|
||||
{
|
||||
//ba felvesszuk a user-t
|
||||
$userdata=array(
|
||||
'strName'=>$name,
|
||||
'strEMail'=>$email,
|
||||
'strCompany'=>$company,
|
||||
'strTel'=>$phone,
|
||||
'old_db'=>'clusers_eng',
|
||||
'nCtrID'=>82,
|
||||
'dateInsert'=>$time);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`users`",$userdata);
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT nUserID as nUserID FROM `".CRMADATBAZIS."`.`users` WHERE strEMail='{$email}' AND strName='{$name}' limit 1");
|
||||
$userQuery=MySqlHelper::getInstance()->fetchAssoc();
|
||||
$userID = $userQuery[0]['nUserID'];
|
||||
|
||||
//ba felvesszuk az email cimet a userhez
|
||||
$emaildata=array(
|
||||
'email'=>$email,
|
||||
'nUserID'=>$userID,
|
||||
'newsletter'=>$newsletter
|
||||
);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`u_emails`",$emaildata);
|
||||
}
|
||||
else
|
||||
{
|
||||
//ba a meglevo userhez fogjuk kotni a programot
|
||||
$userID=$exist[0]['nUserID'];
|
||||
}
|
||||
|
||||
//ba regisztraljuk hozza a non-profit programot
|
||||
$nonprofit=array(
|
||||
'isid'=>$isid,
|
||||
'verid'=>$verid,
|
||||
'hlID'=>$hlNum,
|
||||
'nUserID'=>$userID,
|
||||
'add_datetime'=>date('Y-m-d H:i:s',$time),
|
||||
'expire_datetime'=>date('Y-m-d H:i:s', strtotime('+30 day', $time)), //ba 30 nap!!!!
|
||||
'activation_datetime'=>date('Y-m-d H:i:s',$time),
|
||||
'old_db'=>'clusers_eng',
|
||||
'partnerID'=>$partnerID,
|
||||
'enabled'=>'Y',
|
||||
'computer_id'=>$compid);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`nonprofit`",$nonprofit);
|
||||
|
||||
//BIMLadder non-profit kód aktiválás beszúrása crm -> u_history táblába
|
||||
$esemeny=array(
|
||||
'nUserID'=>$userID,
|
||||
'nTopicID'=>368,
|
||||
'dateEvent'=>date('Y-m-d H:i:s',$time),
|
||||
'strPlace'=>'',
|
||||
'strInfo'=>'BIMLadder nonprofit kulcs aktiválás',
|
||||
'nManagerID'=>36,
|
||||
'insertDate'=>date('Y-m-d H:i:s',$time));
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`u_history`",$esemeny);
|
||||
|
||||
$hardlock=array(
|
||||
'hlNum'=>$hlNum,
|
||||
'hlCtrID'=>82,
|
||||
'hlLan'=>0,
|
||||
'hlStat'=>1,
|
||||
'hlDateIssue'=>date('Y-m-d',$time),
|
||||
'hlManID'=>36,
|
||||
'hlTime'=>date('Y-m-d H:i:s',$time),
|
||||
'hlUser'=>$userID,
|
||||
'hlDealer'=>62103,
|
||||
'bUjithato'=>1,
|
||||
'old_db'=>'clusers_eng');
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`hardlock`",$hardlock);
|
||||
|
||||
$program=array(
|
||||
'prTypeID'=>$type,
|
||||
'prVerID'=>$ver['verID'],
|
||||
'prLan'=>0,
|
||||
'prPass'=>trim($pass),
|
||||
'prSellDate'=>date('Y-m-d',$time),
|
||||
'prActDate'=>date('Y-m-d',$time+$interval*86400), // 90 nap helyett 30 nap!!!!
|
||||
'prFizetve'=>date('Y-m-d',$time+$interval*86400),
|
||||
'prActCode'=>trim($aktKod),
|
||||
'prTime'=>date('Y-m-d H:i:s',$time),
|
||||
'prLastMod'=>date('Y-m-d H:i:s',$time),
|
||||
'prContact'=>9,
|
||||
'prHlNum'=>$hlNum, // 99xxxx
|
||||
'prManID'=>36, // web
|
||||
'prStat'=>0,
|
||||
'prHiType'=>1, // 1 Rendelés | 2 Típus Váltás | 3 Frissítés | 4 Auto Friss.
|
||||
);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`h_programs`",$program);
|
||||
|
||||
$pwd = $pass; //ba 2018.11.26. mostantol az uj jelszava a usernek a most generalt, 92-es lesz, nem pedig a 91-es!
|
||||
}
|
||||
else
|
||||
{
|
||||
//ba ehhez a gephez mar volt non-profit regisztracio, keressuk ki a sorozatszamot neki
|
||||
$hardlockID = $res[0]['hlID'];
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`h_programs` WHERE prHlNum='{$hardlockID}' limit 1");
|
||||
$programQuery=MySqlHelper::getInstance()->fetchAssoc();
|
||||
$pwd = $programQuery[0]['prPass'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//insert stats to the userstats table
|
||||
|
||||
$stats = array(
|
||||
'usLang' => $user_lang_db,
|
||||
'usDate' => time(),
|
||||
'usPwd' => $pwd,
|
||||
'usVer'=>substr($pwd,7,2),
|
||||
'usCompID' => $compID,
|
||||
'usCtrID' => $ctrID,
|
||||
'usBuild' => $build,
|
||||
'usCtrName' => $ctrname,
|
||||
'usIP' => $user_IP,
|
||||
'usOSData' => $osdata,
|
||||
// 'usISID' => $isid,
|
||||
);
|
||||
|
||||
$liveKey = $version->isLiveKey($pwd) == 'true'; // Live kulcs 2019
|
||||
$softwareKey = $version->isSoftwareKey($pwd) == 'true'; // Software kulcs 2019
|
||||
|
||||
if($softwareKey)
|
||||
$stats['usISID'] = substr($idokod, 5, 4);
|
||||
|
||||
if (trim($usGCMan)>'' && trim($usGCType)>'' && trim($usGCDriverVer)>'')
|
||||
{
|
||||
$arrGCData=array(
|
||||
'usGCMan'=>trim($usGCMan), // graphic card manufacture
|
||||
'usGCType'=>trim($usGCType), // graphic card type
|
||||
'usGCDriverVer'=>trim($usGCDriverVer), // graphic card driver version
|
||||
);
|
||||
|
||||
$stats['usGCMan']=$arrGCData['usGCMan'];
|
||||
$stats['usGCType']=$arrGCData['usGCType'];
|
||||
$stats['usGCDriverVer']=$arrGCData['usGCDriverVer'];
|
||||
}
|
||||
|
||||
if($softwareKey)
|
||||
{
|
||||
if($liveKey || in_array(substr($pwd,0,2), array('99','98','95')) ) // Azok a programok, amik regisztrálódnak a CRM-ben 2019
|
||||
{
|
||||
$msh->query("SELECT hlCtrID FROM ".CRMADATBAZIS.".hardlock WHERE hlNum='".substr($pwd,0,6)."'");
|
||||
$res=$msh->fetchAssoc();
|
||||
$hlnum=$res[0];
|
||||
if(isset($hlnum['hlCtrID'])) $stats['usHlCtrID'] = $hlnum['hlCtrID'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stats['usHlCtrID'] = substr($pwd,0,2);
|
||||
}
|
||||
|
||||
$msh2->insert('userstats2013',$stats);
|
||||
$usstatid=$msh2->getInsertedId();
|
||||
}
|
||||
else
|
||||
{
|
||||
//if ($_SERVER['REMOTE_ADDR']=='188.6.239.155') {print "haha"; die();}
|
||||
$rec=array(
|
||||
'hiba'=>"Valami hianyzik: {$pwd}\nlang: {$user_lang_db}\nverzio: {$user_version}\nssID: {$user_ssID}",
|
||||
'datum'=>date('Y-m-d H:i:s',time())
|
||||
);
|
||||
$msh2->insert('a_hibak',$rec);
|
||||
}
|
||||
|
||||
//if ($_SERVER['REMOTE_ADDR']=='188.6.239.155') {var_dump($pwd); die();}
|
||||
|
||||
//loading the xml tips if necessary
|
||||
if(!$settings)
|
||||
{
|
||||
print('Unable to load the corresponding settings.xml file!');
|
||||
$rec=array(
|
||||
'hiba'=>"beallitas hianyzik: {$pwd}\nlang: {$user_lang_db}\nverzio: {$user_version}\nssID: {$user_ssID}",
|
||||
'datum'=>date('Y-m-d H:i:s',time())
|
||||
);
|
||||
// if($_SERVER['REMOTE_ADDR'] == "188.36.217.1") var_dump($rec);
|
||||
$msh2->insert('a_hibak',$rec);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(substr($pwd,7,2)>29 && substr($pwd,0,2)!='96')
|
||||
{
|
||||
$isid=($softwareKey ? substr($idokod,5,4) : substr($pwd,0,2).substr($pwd,7,2));
|
||||
$kulcsszam = substr($pwd,0,6);
|
||||
|
||||
$msh->query("SELECT hlStat,hlUser FROM `".CRMADATBAZIS."`.`hardlock` WHERE hlNum='{$kulcsszam}'");
|
||||
$res=$msh->fetchAssoc();
|
||||
$kulcs=$res[0];
|
||||
|
||||
$aktivalokod = $version->ujaktivalasikod2($pwd,$isid,$idokod);
|
||||
//if ($_SERVER['REMOTE_ADDR']=='188.6.239.155') {var_dump($aktivalokod); die();}
|
||||
if (in_array((int)substr($pwd,0,3),array(995,996,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989)) && (int)$kulcs['hlUser']>0) // nonprofitos program első indítása
|
||||
{
|
||||
$msh->query("SELECT COUNT(*) AS `darab` FROM `".CRMADATBAZIS."`.`h_aktivalas_infok` WHERE kulcs='".$kulcsszam."';");
|
||||
$tmp=$msh->fetchAssoc();
|
||||
$darab=(int)$tmp[0]['darab'];
|
||||
|
||||
$msh->query("SELECT COUNT(*) AS `darab` FROM `".CRMADATBAZIS."`.`u_history` WHERE `nUserID`=".(int)$kulcs['hlUser']." AND nTopicID IN (314,315);");
|
||||
$tmp=$msh->fetchAssoc();
|
||||
$esem=(int)$tmp[0]['darab'];
|
||||
|
||||
$msh->query("SELECT * FROM `".CRMADATBAZIS."`.`users` WHERE nUserID='".(int)$kulcs['hlUser']."';");
|
||||
$usr=$msh->fetchAssoc();
|
||||
$usr=$usr[0];
|
||||
|
||||
if (!empty($usr) && ($darab==0 || $esem==0))
|
||||
{
|
||||
$msh->insert("`".CRMADATBAZIS."`.`u_history`",array(
|
||||
'nUserID'=>(int)$kulcs['hlUser'],
|
||||
'nTopicID'=>($usr['old_db']=='clusers' ? 314 : 315),
|
||||
'dateEvent'=>date('Y-m-d'),
|
||||
'strPlace'=>'web',
|
||||
'strInfo'=>($usr['old_db']=='clusers' ? 'Non-profit kód regisztráció' : 'Non-profit code registration').': '.$kulcsszam,
|
||||
'nManagerID'=>36,
|
||||
'insertDate'=>date('Y-m-d H:i:s'),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
$virtualization = ($kulcs['hlStat']=='2' ? "false" : "true"); // letiltott kulcs visszajelzése a programnak
|
||||
|
||||
$valasz = ($aktivalokod!="") ? $aktivalokod : "(( nem kapott valaszt ))";
|
||||
$version->_hibajelento("tips",substr($pwd,0,6),"programinditas - pw: {$pwd}, build: {$build}, isid: {$isid}, időkód: {$idokod}, valasz: ".$valasz,(isset($arrGCData)?$arrGCData:array()),(isset($usstatid)?$usstatid:NULL));
|
||||
|
||||
if(is_numeric($usstatid)) $msh2->update("userstats2013",array('valasz'=>$valasz),array('usID'=>$usstatid));
|
||||
}
|
||||
|
||||
//logFilter
|
||||
$logfilter=0;
|
||||
if ($pwd>0)
|
||||
{
|
||||
$msh->query("SELECT * FROM `".CRMADATBAZIS."`.`h_programs` WHERE `prPass`='".$pwd."' LIMIT 1;");
|
||||
$res=$msh->fetchAssoc();
|
||||
$logfilter=$res[0]['prLogFilter'];
|
||||
}
|
||||
|
||||
$verid=substr($pwd, 7, 2);
|
||||
if($verid >= 36){
|
||||
$hlnum = substr($pwd,0,6);
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`hardlock_computers` WHERE hlNum='".$hlnum."' AND computer_id='".$compid."' LIMIT 1;");
|
||||
$res=MySqlHelper::getInstance()->fetchAssoc();
|
||||
|
||||
if(empty($res)){
|
||||
$comp=array(
|
||||
'hlNum'=>$hlnum,
|
||||
'computer_id'=>$compid);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`hardlock_computers`",$comp);
|
||||
}
|
||||
}
|
||||
|
||||
// if ($_SERVER['REMOTE_ADDR']!='46.139.109.235') return; //ba hibás válaszok ideiglenes kikötése
|
||||
|
||||
header('Content-Type: text/xml; charset=utf-8');
|
||||
header('Content-Disposition: inline; filename=response.xml');
|
||||
|
||||
print '<'.'?'.'xml version="1.0" encoding="UTF-8" standalone="yes"'.'?'.'>
|
||||
<Tips>
|
||||
<Tip lang="'.$settings->lang.'" version="'.$settings->version.'">
|
||||
<path>'.str_replace('..','',$mtips->tips_src).$settings->lang.'/'.'</path>
|
||||
</Tip>
|
||||
'.((isset($aktivalokod) && $aktivalokod) ? '<actcode>'.$aktivalokod.'</actcode>' : '').'
|
||||
'.((isset($virtualization) && $virtualization) ? '<Virtualization>'.$virtualization.'</Virtualization>' : '').'
|
||||
'.((isset($usstatid) && (int)$usstatid>0) ? '<actid>'.(int)$usstatid.'</actid>' : '').'
|
||||
<logfilter>'.$logfilter.'</logfilter>
|
||||
<loginEnabled>'.($kulcsszam=='360006' ? 'true' : 'false').'</loginEnabled>
|
||||
</Tips>';
|
||||
}
|
||||
?>
|
||||
@ -1,544 +0,0 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* eredeti url: http://www.archlinexp.com/index.php?menu=tips2012&lang=hun&version=1&session=OTA0NkEzMTlBMDcwQTE3NkE4NzRBMzc1QTc3NkEwNzJBNTc0Q0Y3NUE3NzdBMjdGQTc3RUE4NzJBNDcwQTgxOUNGNzVDRjc3QTA3NkEyNzdBMzZCQTM3MEJENzVBNTA3QkQ3MkEwN0ZBMDAzQTYxOUEyNjhBOTY4QTA3NEJFNzZCRTc3RTIyMUY1MjNCRTI4QTE3N0E4NzE=
|
||||
* eredeti url: http://old.archlinexp.com/tips/tips2009/hun/1/OTA0NkEzMTlBMDcwQTE3NkE4NzRBMzc1QTc3NkEwNzJBNTc0Q0Y3NUE3NzdBMjdGQTc3RUE4NzJBNDcwQTgxOUNGNzVDRjc3QTA3NkEyNzdBMzZCQTM3MEJENzVBNTA3QkQ3MkEwN0ZBMDAzQTYxOUEyNjhBOTY4QTA3NEJFNzZCRTc3RTIyMUY1MjNCRTI4QTE3N0E4NzE=/46.139.109.235
|
||||
* új url: http://www.archlinexp.com/maintenance/tips.php?lang=hun&version=2&session=OTA0NkEzMTlBMDcwQTE3NkE4NzRBMzc1QTc3NkEwNzJBNTc0Q0Y3NUE3NzdBMjdGQTc3RUE4NzJBNDcwQTgxOUNGNzVDRjc3QTA3NkEyNzdBMzZCQTM3MEJENzVBNTA3QkQ3MkEwN0ZBMDAzQTYxOUEyNjhBOTY4QTA3NEJFNzZCRTc3RTIyMUY1MjNCRTI4QTE3N0E4NzE=
|
||||
* logfilter=0 - csak a legfontosabb logok;
|
||||
* logfilter=10 - minden logot küld;
|
||||
******************************************************************************/
|
||||
include ("config.php");
|
||||
include ("version.php");
|
||||
include ("functions.php");
|
||||
include ("mtips.php");
|
||||
if (!class_exists('crmHelper')) require_once("class/crmHelper.class.php");
|
||||
|
||||
error_log(print_r($_GET,TRUE),3,"../tmp/error_tips.log");
|
||||
|
||||
$version = New Version();
|
||||
$mtips = New Mtips();
|
||||
|
||||
$user_lang_db = $user_lang = $origlang = (isset($_GET['lang']) ? trim($_GET['lang']) : NULL);
|
||||
$user_version = (isset($_GET['version']) ? trim($_GET['version']) : NULL);
|
||||
$user_ssID = (isset($_GET['session']) ? trim($_GET['session']) : NULL);
|
||||
$user_IP = $_SERVER['REMOTE_ADDR'];
|
||||
$osdata = '';
|
||||
$time=time();
|
||||
$namirialRangeMin=940001;
|
||||
$namirialRangeMax=949999;
|
||||
$BIMLadderRangeMin=920001;
|
||||
$BIMLadderRangeMax=929999;
|
||||
|
||||
if( strstr($_SERVER['REQUEST_URI'],"ize") ) print $mtips->tips_src.$data['current_lang'].'/';
|
||||
|
||||
if(!$user_lang) { print('No language id given, try to add /en to the uri'); }
|
||||
|
||||
if(!is_numeric($user_version)) { print('Invalid version id sent: '.$user_version); }
|
||||
|
||||
if(!in_array($user_lang,$mtips->existing_lang)) { $user_lang = 'eng'; }
|
||||
|
||||
$user_lang = $mtips->lang_check($user_lang);
|
||||
|
||||
$settings = $mtips->read_settings($user_lang);
|
||||
|
||||
//get country name from ip
|
||||
$locale=@file_get_contents("http://freegeoip.net/xml/".$user_IP,FALSE, stream_context_create(array('http'=>array('timeout'=>2)) ) );
|
||||
$tomb = json_decode(json_encode(simplexml_load_string($locale)),TRUE);
|
||||
$ctrname=$tomb["CountryName"];
|
||||
$temp=explode(".", gethostbyaddr($user_IP));
|
||||
|
||||
if(!isset($ctrname) || $ctrname=='') $ctrname = 'unknown';
|
||||
|
||||
//if ($_SERVER['REMOTE_ADDR']=='188.6.239.155') {print "user_lang_db: ".$user_lang_db." user_version: ".$user_version." user_ssID: ".$user_ssID; die(); }
|
||||
|
||||
if($user_lang_db && /*$user_version && */ $user_ssID!='')
|
||||
{
|
||||
$str_decoded = base64_decode($user_ssID); //decode the session string
|
||||
|
||||
sscanf(substr($str_decoded,0,4),'%04x',$keyDec);
|
||||
$encoded = str_split(substr($str_decoded,4),4);
|
||||
$decoded = '';
|
||||
|
||||
foreach($encoded as $e)
|
||||
{
|
||||
sscanf($e,'%04x',$temp);
|
||||
if(strlen(substr(sprintf('%x',$temp^$keyDec),2))>0)
|
||||
{
|
||||
$decoded .= chr(hexdec(substr(sprintf('%04x',$temp^$keyDec),2)));
|
||||
$decoded .= chr(hexdec(substr(sprintf('%04x',$temp^$keyDec),0,2)));
|
||||
}
|
||||
else
|
||||
{
|
||||
$decoded .= chr(hexdec(substr(sprintf('%04x',$temp^$keyDec),2)));
|
||||
}
|
||||
}
|
||||
|
||||
$pos = strpos($decoded, '#'); //ba 2018.07.04. atterunk a # separatorra. Ezidaig nem fordulhatott elo benne ilyen jel
|
||||
if($pos === false)
|
||||
{
|
||||
$separator = '_';
|
||||
}
|
||||
else
|
||||
{
|
||||
$separator = '#';
|
||||
}
|
||||
$numdata = substr_count($decoded, $separator); //ba most már kapunk adatot az oprendszerrol is
|
||||
|
||||
//error_log("decoded = ".print_r($decoded,FALSE)." pwd: ".$pwd." build: ".$build." user_version: ".$user_version." idokod: ".$idokod."\n",3,"../tmp/error.log");
|
||||
if( $numdata >= 11 )
|
||||
{
|
||||
list($empty, $pwd, $compID, $build, $ctrID, $idokod, $osdata, $usGCMan, $usGCType, $usGCDriverVer, $npID, $partnerID, $name, $email, $company, $phone, $newsletter) = split($separator, $decoded);
|
||||
}
|
||||
elseif( $numdata >= 6 )
|
||||
{
|
||||
list($empty, $pwd, $compID, $build, $ctrID, $idokod, $osdata, $usGCMan, $usGCType, $usGCDriverVer, $npID, $partnerID) = split($separator, $decoded);
|
||||
}
|
||||
else
|
||||
{
|
||||
list($empty, $pwd, $compID, $build, $ctrID, $idokod) = split($separator, $decoded);
|
||||
}
|
||||
|
||||
//if ($_SERVER['REMOTE_ADDR']=='46.139.14.111') { print "decoded = ".print_r( explode("_",$decoded),FALSE)."\n\n<br>user_version: ".$user_version." , idokod: ".$idokod." npID: ".$npID." partnerID: ".$partnerID." pwd: ".$pwd; /*die();*/ }
|
||||
|
||||
<<<<<<< HEAD
|
||||
if(isset($npID)){
|
||||
$compid = crmHelper::AddOrUpdateComputer($npID);
|
||||
}
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> f2ebce6b191a229c054099f929f7145b78d46007
|
||||
/*******************************************************************************
|
||||
*NAMIRIAL-os automata kulcskiadás és program létrehozás
|
||||
******************************************************************************/
|
||||
if (isset($npID) && $npID>'' && isset($partnerID) && $partnerID=='2nt' && isset($idokod) && $idokod>'' && isset($pwd) && $pwd>'')
|
||||
<<<<<<< HEAD
|
||||
{
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`nonprofit` WHERE computer_id='".$compid."' AND partnerID = '2nt' LIMIT 1;");
|
||||
=======
|
||||
{
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`computers` WHERE `computer_id`='".$npID."' LIMIT 1;");
|
||||
$res4=MySqlHelper::getInstance()->fetchAssoc();
|
||||
|
||||
if(empty($res4)){
|
||||
$comp=array(
|
||||
'computer_id'=>$npID,
|
||||
'last_mod'=>date('Y-m-d',time()));
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`computers`",$comp);
|
||||
}
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`computers` WHERE `computer_id`='".$npID."' LIMIT 1;");
|
||||
$compid=MySqlHelper::getInstance()->fetchAssoc();
|
||||
|
||||
$programVersion=substr($pwd, 7, 2);
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`nonprofit` WHERE computer_id='".$compid[0]['id']."' AND partnerID = '2nt' AND verID =".$programVersion." LIMIT 1;");
|
||||
>>>>>>> f2ebce6b191a229c054099f929f7145b78d46007
|
||||
$res=MySqlHelper::getInstance()->fetchAssoc();
|
||||
//ba nincs ehhez a gephez meg non-profit program regisztralva
|
||||
if (empty($res))
|
||||
{
|
||||
$hlNum=tryToAlloc($namirialRangeMin,$namirialRangeMax);
|
||||
$arrIdokod=explode("-", $idokod);
|
||||
$isid=$arrIdokod[1];
|
||||
$type=substr($pwd, 6, 1);
|
||||
$verid=substr($pwd, 7, 2);
|
||||
$ver=$version->getVersion(array('verPassword8and9'=>$verid));
|
||||
$interval=90;
|
||||
$pass=generatePassword($hlNum,0,$type,$ver['verCode']);
|
||||
$aktKod=generateTimeCode($pass,$isid,$interval);
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`u_emails` WHERE `email`='{$email}' LIMIT 1;");
|
||||
$exist=MySqlHelper::getInstance()->fetchAssoc();
|
||||
if (!$exist) //ba elsodleges szempont, hogy a megadott email cimmel van-e crm bejegyzes
|
||||
{
|
||||
//ba felvesszuk a user-t
|
||||
$userdata=array(
|
||||
'strName'=>$name,
|
||||
'strEMail'=>$email,
|
||||
'strCompany'=>$company,
|
||||
'strTel'=>$phone,
|
||||
'old_db'=>'clusers_eng',
|
||||
'nCtrID'=>39,
|
||||
'dateInsert'=>$time);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`users`",$userdata);
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT nUserID as nUserID FROM `".CRMADATBAZIS."`.`users` WHERE strEMail='{$email}' AND strName='{$name}' limit 1");
|
||||
$userQuery=MySqlHelper::getInstance()->fetchAssoc();
|
||||
$userID = $userQuery[0]['nUserID'];
|
||||
|
||||
//ba felvesszuk az email cimet a userhez
|
||||
$emaildata=array(
|
||||
'email'=>$email,
|
||||
'nUserID'=>$userID,
|
||||
'newsletter'=>$newsletter
|
||||
);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`u_emails`",$emaildata);
|
||||
}
|
||||
else
|
||||
{
|
||||
//ba a meglevo userhez fogjuk kotni a programot
|
||||
$userID=$exist[0]['nUserID'];
|
||||
}
|
||||
|
||||
//ba regisztraljuk hozza a non-profit programot
|
||||
$nonprofit=array(
|
||||
'isid'=>$isid,
|
||||
'verid'=>$verid,
|
||||
'hlID'=>$hlNum,
|
||||
'nUserID'=>$userID,
|
||||
'add_datetime'=>date('Y-m-d H:i:s',$time),
|
||||
'expire_datetime'=>date('Y-m-d H:i:s', strtotime('+90 day', $time)),
|
||||
'activation_datetime'=>date('Y-m-d H:i:s',$time),
|
||||
'old_db'=>'clusers_eng',
|
||||
'partnerID'=>$partnerID,
|
||||
'enabled'=>'Y',
|
||||
'computer_id'=>$compid);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`nonprofit`",$nonprofit);
|
||||
|
||||
//Namirial non-profit kód aktiválás beszúrása crm -> u_history táblába
|
||||
$esemeny=array(
|
||||
'nUserID'=>$userID,
|
||||
'nTopicID'=>366,
|
||||
'dateEvent'=>date('Y-m-d H:i:s',$time),
|
||||
'strPlace'=>'',
|
||||
'strInfo'=>'Namirial nonprofit kulcs aktiválás',
|
||||
'nManagerID'=>36,
|
||||
'insertDate'=>date('Y-m-d H:i:s',$time));
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`u_history`",$esemeny);
|
||||
|
||||
$hardlock=array(
|
||||
'hlNum'=>$hlNum,
|
||||
'hlCtrID'=>39,
|
||||
'hlLan'=>0,
|
||||
'hlStat'=>1,
|
||||
'hlDateIssue'=>date('Y-m-d',$time),
|
||||
'hlManID'=>36,
|
||||
'hlTime'=>date('Y-m-d H:i:s',$time),
|
||||
'hlUser'=>$userID,
|
||||
'hlDealer'=>62103,
|
||||
'bUjithato'=>1,
|
||||
'old_db'=>'clusers_eng');
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`hardlock`",$hardlock);
|
||||
|
||||
$program=array(
|
||||
'prTypeID'=>$type,
|
||||
'prVerID'=>$ver['verID'],
|
||||
'prLan'=>0,
|
||||
'prPass'=>trim($pass),
|
||||
'prSellDate'=>date('Y-m-d',$time),
|
||||
'prActDate'=>date('Y-m-d',$time+$interval*86400), // 90 nap
|
||||
'prFizetve'=>date('Y-m-d',$time+$interval*86400),
|
||||
'prActCode'=>trim($aktKod),
|
||||
'prTime'=>date('Y-m-d H:i:s',$time),
|
||||
'prLastMod'=>date('Y-m-d H:i:s',$time),
|
||||
'prContact'=>8, // Non-profit
|
||||
'prHlNum'=>$hlNum, // 99xxxx
|
||||
'prManID'=>36, // web
|
||||
'prStat'=>0,
|
||||
'prHiType'=>1, // 1 Rendelés | 2 Típus Váltás | 3 Frissítés | 4 Auto Friss.
|
||||
);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`h_programs`",$program);
|
||||
|
||||
$pwd = $pass; //ba 2018.07.02. mostantol az uj jelszava a usernek a most generalt, 94-es lesz, nem pedig a 93-as!
|
||||
}
|
||||
else
|
||||
{
|
||||
//ba ehhez a gephez mar volt non-profit regisztracio, keressuk ki a sorozatszamot neki
|
||||
$hardlockID = $res[0]['hlID'];
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`h_programs` WHERE prHlNum='{$hardlockID}' limit 1");
|
||||
$programQuery=MySqlHelper::getInstance()->fetchAssoc();
|
||||
$pwd = $programQuery[0]['prPass'];
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
*BIMLadder-es automata kulcskiadás és program létrehozás
|
||||
******************************************************************************/
|
||||
else if (isset($npID) && $npID>'' && isset($partnerID) && $partnerID=='kbl' && isset($idokod) && $idokod>'' && isset($pwd) && $pwd>'')
|
||||
{
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`nonprofit` WHERE computer_id='".$compid."' AND partnerID = 'kbl' LIMIT 1;");
|
||||
$res=MySqlHelper::getInstance()->fetchAssoc();
|
||||
//ba nincs ehhez a gephez meg non-profit program regisztralva
|
||||
if (empty($res))
|
||||
{
|
||||
$hlNum=tryToAlloc($BIMLadderRangeMin,$BIMLadderRangeMax);
|
||||
$arrIdokod=explode("-", $idokod);
|
||||
$isid=$arrIdokod[1];
|
||||
$type=substr($pwd, 6, 1);
|
||||
$verid=substr($pwd, 7, 2);
|
||||
$ver=$version->getVersion(array('verPassword8and9'=>$verid));
|
||||
$interval=30; //ba !!! nem 90!!!
|
||||
$pass=generatePassword($hlNum,0,$type,$ver['verCode']);
|
||||
$aktKod=generateTimeCode($pass,$isid,$interval);
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`u_emails` WHERE `email`='{$email}' LIMIT 1;");
|
||||
$exist=MySqlHelper::getInstance()->fetchAssoc();
|
||||
if (!$exist) //ba elsodleges szempont, hogy a megadott email cimmel van-e crm bejegyzes
|
||||
{
|
||||
//ba felvesszuk a user-t
|
||||
$userdata=array(
|
||||
'strName'=>$name,
|
||||
'strEMail'=>$email,
|
||||
'strCompany'=>$company,
|
||||
'strTel'=>$phone,
|
||||
'old_db'=>'clusers_eng',
|
||||
'nCtrID'=>82,
|
||||
'dateInsert'=>$time);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`users`",$userdata);
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT nUserID as nUserID FROM `".CRMADATBAZIS."`.`users` WHERE strEMail='{$email}' AND strName='{$name}' limit 1");
|
||||
$userQuery=MySqlHelper::getInstance()->fetchAssoc();
|
||||
$userID = $userQuery[0]['nUserID'];
|
||||
|
||||
//ba felvesszuk az email cimet a userhez
|
||||
$emaildata=array(
|
||||
'email'=>$email,
|
||||
'nUserID'=>$userID,
|
||||
'newsletter'=>$newsletter
|
||||
);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`u_emails`",$emaildata);
|
||||
}
|
||||
else
|
||||
{
|
||||
//ba a meglevo userhez fogjuk kotni a programot
|
||||
$userID=$exist[0]['nUserID'];
|
||||
}
|
||||
|
||||
//ba regisztraljuk hozza a non-profit programot
|
||||
$nonprofit=array(
|
||||
'isid'=>$isid,
|
||||
'verid'=>$verid,
|
||||
'hlID'=>$hlNum,
|
||||
'nUserID'=>$userID,
|
||||
'add_datetime'=>date('Y-m-d H:i:s',$time),
|
||||
'expire_datetime'=>date('Y-m-d H:i:s', strtotime('+30 day', $time)), //ba 30 nap!!!!
|
||||
'activation_datetime'=>date('Y-m-d H:i:s',$time),
|
||||
'old_db'=>'clusers_eng',
|
||||
'partnerID'=>$partnerID,
|
||||
'enabled'=>'Y',
|
||||
'computer_id'=>$compid);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`nonprofit`",$nonprofit);
|
||||
|
||||
//BIMLadder non-profit kód aktiválás beszúrása crm -> u_history táblába
|
||||
$esemeny=array(
|
||||
'nUserID'=>$userID,
|
||||
'nTopicID'=>368,
|
||||
'dateEvent'=>date('Y-m-d H:i:s',$time),
|
||||
'strPlace'=>'',
|
||||
'strInfo'=>'BIMLadder nonprofit kulcs aktiválás',
|
||||
'nManagerID'=>36,
|
||||
'insertDate'=>date('Y-m-d H:i:s',$time));
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`u_history`",$esemeny);
|
||||
|
||||
$hardlock=array(
|
||||
'hlNum'=>$hlNum,
|
||||
'hlCtrID'=>82,
|
||||
'hlLan'=>0,
|
||||
'hlStat'=>1,
|
||||
'hlDateIssue'=>date('Y-m-d',$time),
|
||||
'hlManID'=>36,
|
||||
'hlTime'=>date('Y-m-d H:i:s',$time),
|
||||
'hlUser'=>$userID,
|
||||
'hlDealer'=>62103,
|
||||
'bUjithato'=>1,
|
||||
'old_db'=>'clusers_eng');
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`hardlock`",$hardlock);
|
||||
|
||||
$program=array(
|
||||
'prTypeID'=>$type,
|
||||
'prVerID'=>$ver['verID'],
|
||||
'prLan'=>0,
|
||||
'prPass'=>trim($pass),
|
||||
'prSellDate'=>date('Y-m-d',$time),
|
||||
'prActDate'=>date('Y-m-d',$time+$interval*86400), // 90 nap helyett 30 nap!!!!
|
||||
'prFizetve'=>date('Y-m-d',$time+$interval*86400),
|
||||
'prActCode'=>trim($aktKod),
|
||||
'prTime'=>date('Y-m-d H:i:s',$time),
|
||||
'prLastMod'=>date('Y-m-d H:i:s',$time),
|
||||
'prContact'=>9,
|
||||
'prHlNum'=>$hlNum, // 99xxxx
|
||||
'prManID'=>36, // web
|
||||
'prStat'=>0,
|
||||
'prHiType'=>1, // 1 Rendelés | 2 Típus Váltás | 3 Frissítés | 4 Auto Friss.
|
||||
);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`h_programs`",$program);
|
||||
|
||||
$pwd = $pass; //ba 2018.11.26. mostantol az uj jelszava a usernek a most generalt, 92-es lesz, nem pedig a 91-es!
|
||||
}
|
||||
else
|
||||
{
|
||||
//ba ehhez a gephez mar volt non-profit regisztracio, keressuk ki a sorozatszamot neki
|
||||
$hardlockID = $res[0]['hlID'];
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`h_programs` WHERE prHlNum='{$hardlockID}' limit 1");
|
||||
$programQuery=MySqlHelper::getInstance()->fetchAssoc();
|
||||
$pwd = $programQuery[0]['prPass'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//insert stats to the userstats table
|
||||
|
||||
$stats = array(
|
||||
'usLang' => $user_lang_db,
|
||||
'usDate' => time(),
|
||||
'usPwd' => $pwd,
|
||||
'usVer'=>substr($pwd,7,2),
|
||||
'usCompID' => $compID,
|
||||
'usCtrID' => $ctrID,
|
||||
'usBuild' => $build,
|
||||
'usCtrName' => $ctrname,
|
||||
'usIP' => $user_IP,
|
||||
'usOSData' => $osdata,
|
||||
// 'usISID' => $isid,
|
||||
);
|
||||
|
||||
$liveKey = $version->isLiveKey($pwd) == 'true'; // Live kulcs 2019
|
||||
$softwareKey = $version->isSoftwareKey($pwd) == 'true'; // Software kulcs 2019
|
||||
|
||||
if($softwareKey)
|
||||
$stats['usISID'] = substr($idokod, 5, 4);
|
||||
|
||||
if (trim($usGCMan)>'' && trim($usGCType)>'' && trim($usGCDriverVer)>'')
|
||||
{
|
||||
$arrGCData=array(
|
||||
'usGCMan'=>trim($usGCMan), // graphic card manufacture
|
||||
'usGCType'=>trim($usGCType), // graphic card type
|
||||
'usGCDriverVer'=>trim($usGCDriverVer), // graphic card driver version
|
||||
);
|
||||
|
||||
$stats['usGCMan']=$arrGCData['usGCMan'];
|
||||
$stats['usGCType']=$arrGCData['usGCType'];
|
||||
$stats['usGCDriverVer']=$arrGCData['usGCDriverVer'];
|
||||
}
|
||||
|
||||
if($softwareKey)
|
||||
{
|
||||
if($liveKey || in_array(substr($pwd,0,2), array('99','98','95')) ) // Azok a programok, amik regisztrálódnak a CRM-ben 2019
|
||||
{
|
||||
$msh->query("SELECT hlCtrID FROM ".CRMADATBAZIS.".hardlock WHERE hlNum='".substr($pwd,0,6)."'");
|
||||
$res=$msh->fetchAssoc();
|
||||
$hlnum=$res[0];
|
||||
if(isset($hlnum['hlCtrID'])) $stats['usHlCtrID'] = $hlnum['hlCtrID'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stats['usHlCtrID'] = substr($pwd,0,2);
|
||||
}
|
||||
|
||||
$msh2->insert('userstats2013',$stats);
|
||||
$usstatid=$msh2->getInsertedId();
|
||||
}
|
||||
else
|
||||
{
|
||||
//if ($_SERVER['REMOTE_ADDR']=='188.6.239.155') {print "haha"; die();}
|
||||
$rec=array(
|
||||
'hiba'=>"Valami hianyzik: {$pwd}\nlang: {$user_lang_db}\nverzio: {$user_version}\nssID: {$user_ssID}",
|
||||
'datum'=>date('Y-m-d H:i:s',time())
|
||||
);
|
||||
$msh2->insert('a_hibak',$rec);
|
||||
}
|
||||
|
||||
//if ($_SERVER['REMOTE_ADDR']=='188.6.239.155') {var_dump($pwd); die();}
|
||||
|
||||
//loading the xml tips if necessary
|
||||
if(!$settings)
|
||||
{
|
||||
print('Unable to load the corresponding settings.xml file!');
|
||||
$rec=array(
|
||||
'hiba'=>"beallitas hianyzik: {$pwd}\nlang: {$user_lang_db}\nverzio: {$user_version}\nssID: {$user_ssID}",
|
||||
'datum'=>date('Y-m-d H:i:s',time())
|
||||
);
|
||||
// if($_SERVER['REMOTE_ADDR'] == "188.36.217.1") var_dump($rec);
|
||||
$msh2->insert('a_hibak',$rec);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(substr($pwd,7,2)>29 && substr($pwd,0,2)!='96')
|
||||
{
|
||||
$isid=($softwareKey ? substr($idokod,5,4) : substr($pwd,0,2).substr($pwd,7,2));
|
||||
$kulcsszam = substr($pwd,0,6);
|
||||
|
||||
$msh->query("SELECT hlStat,hlUser FROM `".CRMADATBAZIS."`.`hardlock` WHERE hlNum='{$kulcsszam}'");
|
||||
$res=$msh->fetchAssoc();
|
||||
$kulcs=$res[0];
|
||||
|
||||
$aktivalokod = $version->ujaktivalasikod2($pwd,$isid,$idokod);
|
||||
//if ($_SERVER['REMOTE_ADDR']=='188.6.239.155') {var_dump($aktivalokod); die();}
|
||||
if (in_array((int)substr($pwd,0,3),array(995,996,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989)) && (int)$kulcs['hlUser']>0) // nonprofitos program első indítása
|
||||
{
|
||||
$msh->query("SELECT COUNT(*) AS `darab` FROM `".CRMADATBAZIS."`.`h_aktivalas_infok` WHERE kulcs='".$kulcsszam."';");
|
||||
$tmp=$msh->fetchAssoc();
|
||||
$darab=(int)$tmp[0]['darab'];
|
||||
|
||||
$msh->query("SELECT COUNT(*) AS `darab` FROM `".CRMADATBAZIS."`.`u_history` WHERE `nUserID`=".(int)$kulcs['hlUser']." AND nTopicID IN (314,315);");
|
||||
$tmp=$msh->fetchAssoc();
|
||||
$esem=(int)$tmp[0]['darab'];
|
||||
|
||||
$msh->query("SELECT * FROM `".CRMADATBAZIS."`.`users` WHERE nUserID='".(int)$kulcs['hlUser']."';");
|
||||
$usr=$msh->fetchAssoc();
|
||||
$usr=$usr[0];
|
||||
|
||||
if (!empty($usr) && ($darab==0 || $esem==0))
|
||||
{
|
||||
$msh->insert("`".CRMADATBAZIS."`.`u_history`",array(
|
||||
'nUserID'=>(int)$kulcs['hlUser'],
|
||||
'nTopicID'=>($usr['old_db']=='clusers' ? 314 : 315),
|
||||
'dateEvent'=>date('Y-m-d'),
|
||||
'strPlace'=>'web',
|
||||
'strInfo'=>($usr['old_db']=='clusers' ? 'Non-profit kód regisztráció' : 'Non-profit code registration').': '.$kulcsszam,
|
||||
'nManagerID'=>36,
|
||||
'insertDate'=>date('Y-m-d H:i:s'),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
$virtualization = ($kulcs['hlStat']=='2' ? "false" : "true"); // letiltott kulcs visszajelzése a programnak
|
||||
|
||||
$valasz = ($aktivalokod!="") ? $aktivalokod : "(( nem kapott valaszt ))";
|
||||
$version->_hibajelento("tips",substr($pwd,0,6),"programinditas - pw: {$pwd}, build: {$build}, isid: {$isid}, időkód: {$idokod}, valasz: ".$valasz,(isset($arrGCData)?$arrGCData:array()),(isset($usstatid)?$usstatid:NULL));
|
||||
|
||||
if(is_numeric($usstatid)) $msh2->update("userstats2013",array('valasz'=>$valasz),array('usID'=>$usstatid));
|
||||
}
|
||||
|
||||
//logFilter
|
||||
$logfilter=0;
|
||||
if ($pwd>0)
|
||||
{
|
||||
$msh->query("SELECT * FROM `".CRMADATBAZIS."`.`h_programs` WHERE `prPass`='".$pwd."' LIMIT 1;");
|
||||
$res=$msh->fetchAssoc();
|
||||
$logfilter=$res[0]['prLogFilter'];
|
||||
}
|
||||
|
||||
$verid=substr($pwd, 7, 2);
|
||||
if($verid >= 36){
|
||||
$hlnum = substr($pwd,0,6);
|
||||
|
||||
MySqlHelper::getInstance()->query("SELECT * FROM `".CRMADATBAZIS."`.`hardlock_computers` WHERE hlNum='".$hlnum."' AND computer_id='".$compid."' LIMIT 1;");
|
||||
$res=MySqlHelper::getInstance()->fetchAssoc();
|
||||
|
||||
if(empty($res)){
|
||||
$comp=array(
|
||||
'hlNum'=>$hlnum,
|
||||
'computer_id'=>$compid);
|
||||
MySqlHelper::getInstance()->insert("`".CRMADATBAZIS."`.`hardlock_computers`",$comp);
|
||||
}
|
||||
}
|
||||
|
||||
// if ($_SERVER['REMOTE_ADDR']!='46.139.109.235') return; //ba hibás válaszok ideiglenes kikötése
|
||||
|
||||
header('Content-Type: text/xml; charset=utf-8');
|
||||
header('Content-Disposition: inline; filename=response.xml');
|
||||
|
||||
print '<'.'?'.'xml version="1.0" encoding="UTF-8" standalone="yes"'.'?'.'>
|
||||
<Tips>
|
||||
<Tip lang="'.$settings->lang.'" version="'.$settings->version.'">
|
||||
<path>'.str_replace('..','',$mtips->tips_src).$settings->lang.'/'.'</path>
|
||||
</Tip>
|
||||
'.((isset($aktivalokod) && $aktivalokod) ? '<actcode>'.$aktivalokod.'</actcode>' : '').'
|
||||
'.((isset($virtualization) && $virtualization) ? '<Virtualization>'.$virtualization.'</Virtualization>' : '').'
|
||||
'.((isset($usstatid) && (int)$usstatid>0) ? '<actid>'.(int)$usstatid.'</actid>' : '').'
|
||||
<logfilter>'.$logfilter.'</logfilter>
|
||||
<loginEnabled>'.($kulcsszam=='360006' ? 'true' : 'false').'</loginEnabled>
|
||||
</Tips>';
|
||||
}
|
||||
?>
|
||||
@ -1,252 +0,0 @@
|
||||
<?php
|
||||
defined('_JEXEC') or die('Restricted access'); // No direct access to this file
|
||||
|
||||
jimport('joomla.application.component.modelitem'); // import Joomla modelitem library
|
||||
|
||||
class ShowroomModelUploadGroup extends JModelItem
|
||||
{
|
||||
protected $types;
|
||||
protected $manufacture;
|
||||
protected $manufactures;
|
||||
protected $family;
|
||||
protected $families;
|
||||
protected $querystring;
|
||||
protected $parents;
|
||||
protected $parent;
|
||||
protected $subcat;
|
||||
protected $lang;
|
||||
|
||||
public function getTypes()
|
||||
{
|
||||
$session=&JFactory::getSession();
|
||||
$lang=$session->get( 'sr_lang');//'hun';
|
||||
if (!isset($this->types))
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$db->setQuery("
|
||||
SELECT `type`,`type_download`,`name_".$lang."` AS `name`,IF(LENGTH(name_".$lang.")>15,CONCAT(SUBSTRING(name_".$lang.",1,13),'...'),name_".$lang.") AS name_short, `desc_".$lang."` AS `desc`,REPLACE('".$this->typePath."','REPLACE',`type`) AS `img`,c.darab
|
||||
FROM coll2_types t
|
||||
LEFT OUTER JOIN (
|
||||
SELECT COUNT(*) AS darab,x.tipus FROM (
|
||||
SELECT x.o_id,x.tipus,x.deleted,x.m_id,m.`name` AS m_name,m.deleted AS m_deleted,x.c_id,c.nev_hun AS c_name,c.deleted AS c_deleted
|
||||
FROM collection2 x
|
||||
LEFT OUTER JOIN coll2_man m ON x.m_id=m.id
|
||||
LEFT OUTER JOIN coll2_cat c ON x.c_id=c.c_id
|
||||
WHERE x.deleted=0 AND m.deleted=0 AND c.deleted=0
|
||||
) x GROUP BY x.tipus
|
||||
) c ON c.tipus=t.`type`
|
||||
WHERE c.darab>0
|
||||
ORDER BY `name_".$lang."`;");
|
||||
$this->types = $db->loadObjectList();
|
||||
}
|
||||
return $this->types;
|
||||
}
|
||||
|
||||
|
||||
public function getManufactures($type="")
|
||||
{
|
||||
$session=&JFactory::getSession();
|
||||
$lang=$session->get( 'sr_lang');//'hun';
|
||||
if (!isset($this->manufactures))
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$db->setQuery("
|
||||
SELECT id,group_id,name,IF( LENGTH(name)>16,CONCAT(SUBSTRING(name,1,14),'...'),name) AS name_short,dir,deleted,REPLACE('".$this->logoPath."','REPLACE',`dir`) AS logo,cnt.darab
|
||||
FROM coll2_man m
|
||||
LEFT OUTER JOIN (
|
||||
SELECT COUNT(*) AS darab,m_id,m_name FROM (
|
||||
SELECT x.o_id,x.tipus,x.deleted,x.m_id,m.`name` AS m_name,m.deleted AS m_deleted,x.c_id,c.nev_hun AS c_name,c.deleted AS c_deleted
|
||||
FROM collection2 x
|
||||
LEFT OUTER JOIN coll2_man m ON x.m_id=m.id
|
||||
LEFT OUTER JOIN coll2_cat c ON x.c_id=c.c_id
|
||||
WHERE x.deleted=0 AND m.deleted=0 AND c.deleted=0 ".($type>'' ? "AND tipus='".$type."'" : "")."
|
||||
) x GROUP BY m_id
|
||||
) cnt ON cnt.m_id=m.id
|
||||
WHERE cnt.darab>0
|
||||
ORDER BY name;");
|
||||
$this->manufactures = $db->loadObjectList();
|
||||
}
|
||||
return $this->manufactures;
|
||||
}
|
||||
|
||||
|
||||
public function getManufacture($id=0)
|
||||
{
|
||||
$db=JFactory::getDBO();
|
||||
$db->setQuery("SELECT * FROM coll2_man m WHERE id=".$id." LIMIT 1;");
|
||||
$tmp=$db->loadObjectList();;
|
||||
$this->manufacture=$tmp[0];
|
||||
return $this->manufacture;
|
||||
}
|
||||
|
||||
|
||||
public function getManufactureByName($name="")
|
||||
{
|
||||
$db=JFactory::getDBO();
|
||||
$db->setQuery("SELECT * FROM coll2_man m WHERE name='".$name."' LIMIT 1;");
|
||||
$tmp=$db->loadObjectList();;
|
||||
$this->manufacture=$tmp[0];
|
||||
return $this->manufacture;
|
||||
}
|
||||
|
||||
|
||||
public function getFamilies($type="",$manufacture="")
|
||||
{
|
||||
$session=&JFactory::getSession();
|
||||
$lang=$session->get( 'sr_lang');//'hun';
|
||||
if (!isset($this->families))
|
||||
{
|
||||
$db=JFactory::getDBO();
|
||||
$db->setQuery("
|
||||
SELECT f.c_id,f.m_id,m.`name` AS manufacure,IF( LENGTH(f.nev_".$lang.")>15,CONCAT(SUBSTRING(f.nev_".$lang.",1,13),'...'),f.nev_".$lang.") AS family_short,f.nev_".$lang." AS family,cnt.darab
|
||||
FROM coll2_cat f
|
||||
LEFT OUTER JOIN (
|
||||
SELECT COUNT(*) AS darab,c_id,c_name FROM (
|
||||
SELECT x.o_id,x.tipus,x.deleted,x.m_id,m.`name` AS m_name,m.deleted AS m_deleted,x.c_id,c.nev_hun AS c_name,c.deleted AS c_deleted
|
||||
FROM collection2 x
|
||||
LEFT OUTER JOIN coll2_man m ON x.m_id=m.id
|
||||
LEFT OUTER JOIN coll2_cat c ON x.c_id=c.c_id
|
||||
WHERE x.deleted=0 AND m.deleted=0 AND c.deleted=0 ".($type>'' ? "AND tipus='".$type."'" : "")." ".((int)$manufacture>0 ? "AND x.m_id='".(int)$manufacture."'" : "")."
|
||||
) x GROUP BY c_id
|
||||
) cnt ON cnt.c_id=f.c_id
|
||||
LEFT OUTER JOIN coll2_man m ON m.id=f.m_id
|
||||
WHERE cnt.darab>0
|
||||
ORDER BY f.nev_".$lang.";");
|
||||
$this->families = $db->loadObjectList();
|
||||
}
|
||||
return $this->families;
|
||||
}
|
||||
|
||||
public function getFamily($id=0)
|
||||
{
|
||||
$session=&JFactory::getSession();
|
||||
$lang=$session->get('sr_lang');//'hun';
|
||||
$db=JFactory::getDBO();
|
||||
$db->setQuery("SELECT c_id,m_id,nev_".$lang." AS name,deleted FROM coll2_cat WHERE c_id=".$id." LIMIT 1;");
|
||||
$tmp=$db->loadObjectList();
|
||||
$this->family=$tmp[0];
|
||||
return $this->family;
|
||||
}
|
||||
|
||||
public function getFamilyByName($name="",$m_id=0)
|
||||
{
|
||||
$session=&JFactory::getSession();
|
||||
$lang=$session->get('sr_lang');//'hun';
|
||||
$db=JFactory::getDBO();
|
||||
$db->setQuery("SELECT c_id,m_id,nev_".$lang." AS name,deleted FROM coll2_cat WHERE ".((int)$m_id>0 ? 'm_id='.$m_id.' AND ' : '')." (nev_hun='".$name."' OR nev_eng='".$name."') LIMIT 1;");
|
||||
$tmp=$db->loadObjectList();
|
||||
$this->family=$tmp[0];
|
||||
return $this->family;
|
||||
}
|
||||
|
||||
public function saveRecord($tomb=array())
|
||||
{
|
||||
$newID=0;
|
||||
$collection2=new stdClass();
|
||||
$collection2->m_id=$tomb['m_id'];
|
||||
$collection2->desc_hun=$tomb['desc_hun'];
|
||||
$collection2->desc_eng=$tomb['desc_eng'];
|
||||
$collection2->c_id=$tomb['c_id'];
|
||||
$collection2->struct_id=$tomb['struct_id'];
|
||||
$collection2->datum=date("Y-m-d H:i:s",time());
|
||||
$collection2->title_hun=$tomb['title_hun'];
|
||||
$collection2->title_eng=$tomb['title_eng'];
|
||||
$collection2->tipus=$tomb['tipus'];
|
||||
$collection2->rendelheto=1;
|
||||
$collection2->show=0;
|
||||
$collection2->down=0;
|
||||
$collection2->deleted=$tomb['deleted'];
|
||||
|
||||
$db=JFactory::getDBO();
|
||||
$db->setQuery("SELECT * FROM collection2 WHERE tipus='".$collection2->tipus."' AND m_id=".$collection2->m_id." AND c_id=".$collection2->c_id." AND title_hun='".$collection2->title_hun."' LIMIT 1;");
|
||||
$exist=$db->loadObjectList();
|
||||
|
||||
if (count($exist))
|
||||
{
|
||||
$newID=$exist[0]->o_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (JFactory::getDbo()->insertObject('collection2', $collection2)==TRUE)
|
||||
$newID=JFactory::getDbo()->insertid();
|
||||
}
|
||||
|
||||
if ($newID)
|
||||
{
|
||||
$coll2_desc_eng=New stdClass();
|
||||
$coll2_desc_eng->o_id=$newID;
|
||||
$coll2_desc_eng->lang='eng';
|
||||
$coll2_desc_eng->title=$tomb['title_eng'];
|
||||
$coll2_desc_eng->desc=$tomb['desc_eng'];
|
||||
JFactory::getDbo()->insertObject('coll2_desc', $coll2_desc_eng);
|
||||
|
||||
$coll2_desc_hun=New stdClass();
|
||||
$coll2_desc_hun->o_id=$newID;
|
||||
$coll2_desc_hun->lang='hun';
|
||||
$coll2_desc_hun->title=$tomb['title_hun'];
|
||||
$coll2_desc_hun->desc=$tomb['desc_hun'];
|
||||
JFactory::getDbo()->insertObject('coll2_desc', $coll2_desc_hun);
|
||||
|
||||
$coll2_ver=New stdClass();
|
||||
$coll2_ver->o_id=$newID;
|
||||
$coll2_ver->fajl=$tomb['fajl'];
|
||||
$coll2_ver->version=$tomb['version'];
|
||||
$coll2_ver->down=0;
|
||||
$coll2_ver->deleted=0;
|
||||
JFactory::getDbo()->insertObject('coll2_ver', $coll2_ver);
|
||||
}
|
||||
return($newID);
|
||||
}
|
||||
|
||||
public function getParents()
|
||||
{
|
||||
$db=JFactory::getDBO();
|
||||
$db->setQuery("
|
||||
SELECT id,t.`name_".$this->getLang()."` AS `type`,struct_".$this->getLang()." AS `name`
|
||||
FROM coll2_struct s
|
||||
LEFT OUTER JOIN `coll2_types` t ON t.`type` COLLATE utf8_unicode_ci=s.`type`
|
||||
WHERE parent=id
|
||||
ORDER BY t.`name_".$this->getLang()."`,s.ord,s.`struct_".$this->getLang()."`;");
|
||||
$this->parents=$db->loadObjectList();
|
||||
return $this->parents;
|
||||
}
|
||||
|
||||
public function getParentByName($tipus,$parent)
|
||||
{
|
||||
$db=JFactory::getDBO();
|
||||
$db->setQuery("SELECT * FROM coll2_struct WHERE LOWER(type)='".strtolower($tipus)."' AND parent=id AND LOWER(struct_eng)='".strtolower($parent)."' LIMIT 1;");
|
||||
$tmp=$db->loadObjectList();
|
||||
$this->parent=$tmp[0];
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
public function getSubcat($parent=-1)
|
||||
{
|
||||
$db=JFactory::getDBO();
|
||||
$db->setQuery("
|
||||
SELECT s.`id`,t.`name_".$this->getLang()."` AS `type`,p.`parent`,s.`struct_".$this->getLang()."` AS `name`
|
||||
FROM `coll2_struct` s
|
||||
LEFT OUTER JOIN `coll2_types` t ON t.`type` COLLATE utf8_unicode_ci=s.`type`
|
||||
LEFT OUTER JOIN (SELECT id,struct_".$this->getLang()." AS `parent` FROM coll2_struct WHERE parent=id) p ON p.`id`=s.`parent`
|
||||
WHERE s.`parent`!=s.`id` ".($parent==-1 ? "" : "AND s.`parent`=".(int)$parent)."
|
||||
ORDER BY p.`parent`,s.ord,s.`struct_".$this->getLang()."`;");
|
||||
$this->subcat=$db->loadObjectList();
|
||||
return $this->subcat;
|
||||
}
|
||||
|
||||
public function getSubcatByName($tipus,$parent_id,$subcat)
|
||||
{
|
||||
$db=JFactory::getDBO();
|
||||
$db->setQuery("SELECT * FROM coll2_struct WHERE LOWER(type)='".strtolower($tipus)."' AND parent=".$parent_id." AND LOWER(struct_eng)='".strtolower($subcat)."';");
|
||||
$tmp=$db->loadObjectList();
|
||||
$this->subcat=$tmp[0];
|
||||
return $this->subcat;
|
||||
}
|
||||
|
||||
public function getLang()
|
||||
{
|
||||
if (!isset($this->lang)) { $this->lang=(strpos($_SERVER['HTTP_HOST'],".com") ? "eng" : "hun"); }
|
||||
return $this->lang;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -1,154 +0,0 @@
|
||||
<?php defined('_JEXEC') or die; ?>
|
||||
|
||||
<?php if (!isset($this->sess['sr_template'])):?>
|
||||
<h3 style="margin-bottom:10px;"><?=JText::_(COM_SHOWROOM_SHOWROOM);?></h3>
|
||||
<?php endif;?>
|
||||
|
||||
<?php
|
||||
$user=JFactory::getUser();
|
||||
$groups=$user->get('groups');
|
||||
|
||||
if ((int)$user->id>0 && is_array($groups)) : ?>
|
||||
<?php
|
||||
$admin=FALSE;
|
||||
foreach ($groups as $k=>$v) { if (in_array($v,$this->arrAllowedGroups)) $admin=TRUE; }
|
||||
if ($admin==FALSE) { JFactory::getApplication()->redirect("/index.php?option=com_showroom&view=showroom"); die(); }
|
||||
?>
|
||||
<div id="j-main-container">
|
||||
<form name="showroom_upload" id="showroom_upload" method="post" enctype="multipart/form-data" action="index.php?option=com_showroom&view=uploadgroup<?=$this->querystring?>">
|
||||
<div class="hasab">
|
||||
<div class="inputholder" style="height:200px;">
|
||||
<label for="desc_hun"><?=JText::_('COM_SHOWROOM_DESC_HUN')?>:</label><br />
|
||||
<textarea name="desc_hun" id="desc_hun"><?=(isset($_POST['desc_hun']) ? $_POST['desc_hun'] : '')?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hasab">
|
||||
<div class="inputholder" style="height:200px;">
|
||||
<label for="desc_eng"><?=JText::_('COM_SHOWROOM_DESC_ENG')?>:</label><br />
|
||||
<textarea name="desc_eng" id="desc_eng"><?=(isset($_POST['desc_eng']) ? $_POST['desc_eng'] : '')?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hasab">
|
||||
<div class="inputholder">
|
||||
<label for="tipus"><?=JText::_('COM_SHOWROOM_TYPE')?>:</label>
|
||||
<select name="tipus" id="tipus" onchange="javascript:changeTipus();">
|
||||
<option value=""><?=JText::_('COM_SHOWROOM_ALL')?></option>
|
||||
<option disabled="disabled">-----</option>
|
||||
<?php foreach ($this->types as $type):?>
|
||||
<option value="<?=$type->type?>"<?=($type->type==$this->selected_type ? ' selected="selected"' : '')?>><?=$type->name?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="inputholder">
|
||||
<label for="m_id"><?=JText::_('COM_SHOWROOM_MANUFACTURE')?>:</label>
|
||||
<div id="m_id_container" style="display:inline-block;">
|
||||
<select name="m_id" id="m_id" onchange="javascript:changeGyarto();">
|
||||
<option value=""><?=JText::_('COM_SHOWROOM_ALL')?></option>
|
||||
<option disabled="disabled">-----</option>
|
||||
<?php foreach ($this->manufactures as $manufacture):?>
|
||||
<option value="<?=$manufacture->id?>"<?=($manufacture->id==$this->selected_manufacture ? ' selected="selected"' : '')?> ><?=$manufacture->name?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inputholder">
|
||||
<label for="c_id"><?=JText::_('COM_SHOWROOM_FAMILY')?>:</label>
|
||||
<div id="c_id_container" style="display:inline-block;">
|
||||
<select name="c_id" id="c_id" onchange="">
|
||||
<option value=""><?=JText::_('COM_SHOWROOM_ALL')?></option>
|
||||
<option disabled="disabled">-----</option>
|
||||
<?php foreach ($this->families as $family):?>
|
||||
<option value="<?=$family->c_id?>"<?=((int)$family->c_id==(int)$this->selected_family ? ' selected="selected"' : '')?>><?=$family->name?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inputholder">
|
||||
<label for="parent" class="szeleslabel"><?=JText::_('COM_SHOWROOM_CAT')?>:</label>
|
||||
<select name="parent" id="parent" onchange="javascript:changeParent();">
|
||||
<option value=""><?=JText::_('COM_SHOWROOM_ALL')?></option>
|
||||
<option disabled="disabled">-----</option>
|
||||
<?php $lastParentType="";?>
|
||||
<?php foreach ($this->parents as $parent):?>
|
||||
<?php if ($lastParentType!=$parent->type) { echo '<option disabled="disabled">'.$parent->type.'</option>'; $lastParentType=$parent->type; } ?>
|
||||
<option value="<?=$parent->id?>"<?=($parent->id==$this->selected_category ? ' selected="selected"' : '')?>> <?=$parent->name?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="inputholder">
|
||||
<label for="subcat" class="szeleslabel"><?=JText::_('COM_SHOWROOM_SUBCAT')?>:</label>
|
||||
<div id="subcat_container" style="display:inline-block;">
|
||||
<select name="subcat" id="subcat">
|
||||
<option value=""><?=JText::_('COM_SHOWROOM_ALL')?></option>
|
||||
<option disabled="disabled">-----</option>
|
||||
<?php $lastCategoryType="";?>
|
||||
<?php foreach ($this->subcat as $subcat):?>
|
||||
<?php if ($lastCategoryType!=$subcat->parent) { echo '<option disabled="disabled">'.$subcat->parent.'</option>'; $lastCategoryType=$subcat->parent; } ?>
|
||||
<option value="<?=$subcat->id?>"<?=($subcat->id==$this->selected_subcategory ? ' selected="selected"' : '')?>> <?=$subcat->name?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inputholder">
|
||||
<label for="deleted_y"><?=JText::_('COM_SHOWROOM_ACTIVE')?>:</label>
|
||||
<fieldset>
|
||||
<input type="radio" name="deleted" id="deleted_y" value="0" disabled="disabled" /><label for="deleted_y"><?=JText::_('COM_SHOWROOM_YES')?></label>
|
||||
<input type="radio" name="deleted" id="deleted_n" value="1" checked="checked" /><label for="deleted_n"><?=JText::_('COM_SHOWROOM_NO')?></label>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="inputholder">
|
||||
<input type="submit" name="save" id="save" value="<?=JText::_('COM_SHOWROOM_SAVE')?>" <?=(count($_POST) ? 'disabled="disabled"' : '')?> onclick="javascript:return ellenoriz();" /><br />
|
||||
<strong><?=(count($_POST) ? JText::_('COM_SHOWROOM_SAVE_SUCCESSFUL') : '')?></strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hasab" style="display:inline-block;width:600px;">
|
||||
<?php foreach ($this->arrKiskep as $kiskep) : ?>
|
||||
<?php if (is_file($_SERVER['DOCUMENT_ROOT'].$kiskep)) : ?>
|
||||
<img src="<?=$kiskep?>" style="max-width:60px;max-height:60px;" border="0" />
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() { changeTipus(); });
|
||||
|
||||
function changeTipus() {
|
||||
jQuery.get('/administrator/components/com_showroom/assets/ajax/AjaxSelectController.class.php?lang=<?=$this->sess['sr_lang']?>&type=manufacture&tipus='+jQuery('#tipus').val()+'&selected=<?=$this->selected_manufacture?>', function( data ) { jQuery("#m_id_container").html( data ); });
|
||||
changeGyarto();
|
||||
}
|
||||
|
||||
function changeGyarto() {
|
||||
jQuery.get('/administrator/components/com_showroom/assets/ajax/AjaxSelectController.class.php?lang=<?=$this->sess['sr_lang']?>&type=family&tipus='+jQuery('#tipus').val()+'&gyarto='+jQuery('#m_id').val()+'&selected=<?=$this->selected_family?>', function( data ) { jQuery("#c_id_container").html( data ); });
|
||||
}
|
||||
|
||||
function changeParent() {
|
||||
jQuery.get('/administrator/components/com_showroom/assets/ajax/AjaxSelectController.class.php?lang=<?=$this->sess['sr_lang']?>&type=parent&id='+jQuery('#parent').val(), function( data ) { jQuery("#subcat_container").html( data ); });
|
||||
}
|
||||
|
||||
function ellenoriz() {
|
||||
if (jQuery('#tipus').val()=="") {alert('<?=JText::_('COM_SHOWROOM_MISSING_TYPE')?>!'); return false;}
|
||||
if (jQuery('#m_id').val()=="") {alert('<?=JText::_('COM_SHOWROOM_MISSING_MANUFACTURE')?>!'); return false;}
|
||||
if (jQuery('#c_id').val()=="") {alert('<?=JText::_('COM_SHOWROOM_MISSING_FAMILY')?>!'); return false;}
|
||||
if (jQuery('#parent').val()=="") {alert('<?=JText::_('COM_SHOWROOM_MISSING_PARENT')?>!'); return false;}
|
||||
if (jQuery('#subcat').val()=="") {alert('<?=JText::_('COM_SHOWROOM_MISSING_SUBCAT')?>!'); return false;}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php else : ?>
|
||||
<?=JModuleHelper::renderModule(JModuleHelper::getModule('login'),array());?>
|
||||
<? endif; ?>
|
||||
@ -1,243 +0,0 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
Az eredti descriptor file felépítése:
|
||||
=====================================
|
||||
$data["fajl"] = $adatok[0];
|
||||
$data["eredeti"] = $adatok[1];
|
||||
$data["vendegkep"] = $adatok[2];
|
||||
$data["kepalap"] = $adatok[3];
|
||||
$data["cim"] = $adatok[4];
|
||||
$data["cimhun"] = $adatok[5] ? $adatok[5] : $adatok[4];
|
||||
$data["prver"] = ($adatok[6]=="-1") ? "2012" : $adatok[6];
|
||||
$data["man"] = $adatok[7];
|
||||
$data["fam"] = $adatok[8];
|
||||
|
||||
|
||||
Az új descriptor file felépítése:
|
||||
=====================================
|
||||
$data["file"]=$adatok[0],
|
||||
$data["vendegkep"]=$adatok[1],
|
||||
$data["nev_eng"]=$adatok[2],
|
||||
$data["nev_hun"]=$adatok[3],
|
||||
$data["tipus"]=$adatok[4],
|
||||
$data["kategoria"]=$adatok[5],
|
||||
$data["alkategoria"]=$adatok[6],
|
||||
$data["gyarto"]=$adatok[7],
|
||||
$data["prver"]=($adatok[8]=="-1" ? "2012" : $adatok[8]),
|
||||
|
||||
Pl. (valójában sortörés nélkül van):
|
||||
------------------------------------
|
||||
85151612-3251-2A4C-838D-BDAE5C2ED382.oli#
|
||||
3000585D-7B7A-BF4D-A501-3ACDE09CCA31.bmp#
|
||||
brown chair#
|
||||
barna szék#
|
||||
material#
|
||||
Wood#
|
||||
Oak#
|
||||
Marrakesh#
|
||||
-1
|
||||
*******************************************************************************/
|
||||
defined('_JEXEC') or die; // No direct access to this file
|
||||
|
||||
jimport('joomla.application.component.view'); // import Joomla view library
|
||||
jimport('joomla.application.module.helper');
|
||||
jimport('joomla.session.session');
|
||||
|
||||
class ShowroomViewUploadGroup extends JViewLegacy
|
||||
{
|
||||
protected $arrAllowedGroups=array(7,8);
|
||||
protected $acceptLang=array('eng'=>'en-GB','hun'=>'hu-HU');
|
||||
protected $defLang='eng';
|
||||
protected $desc=array();
|
||||
protected $data=array();
|
||||
protected $selected_type;
|
||||
protected $selected_manufacture;
|
||||
protected $selected_family;
|
||||
protected $selected_category;
|
||||
protected $selected_subcategory;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$app=&JFactory::getApplication();
|
||||
$session=&JFactory::getSession();
|
||||
$document=&JFactory::getDocument();
|
||||
$model=$this->getModel();
|
||||
|
||||
$this->arrKiskep=array();
|
||||
|
||||
$document->addStyleSheet('/components/com_showroom/assets/css/showroom.css');
|
||||
|
||||
if (isset($_GET['lang']))
|
||||
{
|
||||
if (array_key_exists(trim($_GET['lang']), $this->acceptLang)) { $session->set('sr_lang',trim($_GET['lang'])); }
|
||||
else { $session->set('sr_lang',$this->defLang); }
|
||||
}
|
||||
|
||||
if (isset($_GET['file'])) $session->set('sr_file',(trim(addslashes($_GET['file']))=='none' ? '' : trim(addslashes($_GET['file']))));
|
||||
if (isset($_GET['type'])) $session->set('sr_type',(trim(addslashes($_GET['type']))=='none' ? '' : trim(addslashes($_GET['type']))));
|
||||
if (isset($_GET['template']) && trim($_GET['template'])=='blankframe') $session->set('sr_template','blankframe');
|
||||
if (!isset($_SESSION['__default']['sr_lang'])) $session->set('sr_lang',$this->defLang);
|
||||
|
||||
JFactory::getLanguage()->load('com_showroom', JPATH_SITE, $this->acceptLang[$session->get('sr_lang')], true);
|
||||
|
||||
$this->sess=$_SESSION['__default'];
|
||||
$this->types=$this->get('Types');
|
||||
$this->manufactures=$model->getManufactures($this->sess['sr_type']);
|
||||
$this->families=$model->getFamilies($this->sess['sr_type'],$this->sess['sr_manufacture']);
|
||||
$this->family=$model->getFamily(((int)$this->sess["sr_family"]>0 ? $this->sess['sr_family'] : 0));
|
||||
$this->querystring='&lang='.$session->get('sr_lang')
|
||||
.($session->get('sr_template')>'' ? '&template='.$session->get('sr_template') : '')
|
||||
.($session->get('sr_file')>'' ? '&file='.$session->get('sr_file') : '')
|
||||
.($session->get('sr_type')>'' ? '&type='.$session->get('sr_type') : '');
|
||||
|
||||
if (trim($session->get('sr_file'))>"")
|
||||
{
|
||||
$grouplist=trim('/home/vendeg/'.$session->get('sr_file'));
|
||||
|
||||
if (is_file($grouplist))
|
||||
{
|
||||
$lines=file($grouplist);
|
||||
|
||||
if (is_array($lines) && count($lines))
|
||||
{
|
||||
foreach ($lines as $idx=>$line)
|
||||
{
|
||||
$descriptor=trim('/home/vendeg/'.$line);
|
||||
|
||||
if (is_file($descriptor))
|
||||
{
|
||||
$this->desc=explode("#",file_get_contents($descriptor));
|
||||
|
||||
if (is_array($this->desc) && count($this->desc)) { foreach ($this->desc as $k=>$v) $this->desc[$k]=trim($v); }
|
||||
|
||||
if ($this->desc[0]==$this->desc[1]) // regi struktura
|
||||
{
|
||||
$this->data=array(
|
||||
"file"=>$this->desc[0],
|
||||
"vendegkep"=>$this->desc[2],
|
||||
"nev_eng"=>($this->desc[5] ? $this->desc[5] : $this->desc[4]),
|
||||
"nev_hun"=>($this->desc[5] ? $this->desc[5] : $this->desc[4]),
|
||||
"tipus"=>$this->sess['sr_type'],
|
||||
"kategoria"=>"",
|
||||
"alkategoria"=>"",
|
||||
"gyarto"=>$this->desc[7],
|
||||
"termekcsalad"=>$this->desc[8],
|
||||
"prver"=>($this->desc[6]=="-1" ? "2012" : $this->desc[6]),
|
||||
);
|
||||
}
|
||||
else // uj struktura
|
||||
{
|
||||
$this->data=array(
|
||||
"file"=>$this->desc[0],
|
||||
"vendegkep"=>$this->desc[1],
|
||||
"nev_eng"=>$this->desc[2],
|
||||
"nev_hun"=>$this->desc[3],
|
||||
"tipus"=>$this->desc[4],
|
||||
"kategoria"=>$this->desc[5],
|
||||
"alkategoria"=>$this->desc[6],
|
||||
"gyarto"=>$this->desc[7],
|
||||
"termekcsalad"=>((isset($this->desc[9]) && $this->desc[9]>'') ? $this->desc[9] : ''),
|
||||
"prver"=>($this->desc[8]=="-1" ? "2012" : $this->desc[8]),
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->data['gyarto']>"") { $manufacture=$model->getManufactureByName($this->data['gyarto']); }
|
||||
if ($this->data['termekcsalad']>"" && (int)$manufacture->id>0) { $termekcsalad=$model->getFamilyByName($this->data['termekcsalad'],$manufacture->id); }
|
||||
if ($this->data['kategoria']>"") { $kategoria=$model->getParentByName($this->data['tipus'],$this->data['kategoria']); }
|
||||
if ($this->data['alkategoria']>"" && (int)$kategoria->id>0) { $alkategoria=$model->getSubcatByName($this->data['tipus'],$kategoria->id,$this->data['alkategoria']); }
|
||||
|
||||
$this->selected_type=$this->data['tipus'];
|
||||
$this->selected_manufacture=((int)$manufacture->id>0 ? (int)$manufacture->id : 0);
|
||||
$this->selected_family=((int)$termekcsalad->c_id>0 ? (int)$termekcsalad->c_id : 0);
|
||||
$this->selected_category=((int)$kategoria->id>0 ? (int)$kategoria->id : 0);
|
||||
$this->selected_subcategory=((int)$alkategoria->id>0 ? (int)$alkategoria->id : 0);
|
||||
|
||||
// kis kép elhelyezése a végleges helyére
|
||||
$honnan='/home/vendeg/'.$this->data['vendegkep'];
|
||||
$hova=$_SERVER['DOCUMENT_ROOT'].'/public/img/collection/'.$this->data['tipus'];
|
||||
if (!is_dir($hova)) mkdir($hova);
|
||||
$hova.='/'.$this->data['vendegkep'];
|
||||
if (is_file($honnan) && !is_file($hova)) { copy($honnan,$hova); }
|
||||
|
||||
$this->arrKiskep[]=substr($hova, strpos($hova, '/public'));
|
||||
|
||||
if (isset($_POST['save']))
|
||||
{
|
||||
$tomb=array(
|
||||
'm_id'=>(int)$_POST['m_id'],
|
||||
'c_id'=>(int)$_POST['c_id'],
|
||||
'struct_id'=>(int)$_POST['subcat'],
|
||||
'title_hun'=>trim(addslashes($this->data['nev_hun'])),
|
||||
'title_eng'=>trim(addslashes($this->data['nev_eng'])),
|
||||
'desc_hun'=>trim(addslashes($_POST['desc_hun'])),
|
||||
'desc_eng'=>trim(addslashes($_POST['desc_eng'])),
|
||||
'tipus'=>$_POST['tipus'],
|
||||
'fajl'=>$this->data['file'],
|
||||
'version'=>$this->data['prver'],
|
||||
'deleted'=>(isset($_POST['deleted']) ? (int)$_POST['deleted'] : 1),
|
||||
);
|
||||
$newID=$model->saveRecord($tomb);
|
||||
|
||||
if ((int)$newID>0)
|
||||
{
|
||||
$man=$model->getManufacture($tomb['m_id']);
|
||||
|
||||
// objektum file elhelyezése a végleges helyére
|
||||
$honnan='/home/vendeg/'.$this->data['file'];
|
||||
$hova=$_SERVER['DOCUMENT_ROOT'].'/public/collection/'.$man->dir;
|
||||
if (!is_dir($hova)) mkdir($hova);
|
||||
$hova.='/'.$newID;
|
||||
if (!is_dir($hova)) mkdir($hova);
|
||||
$hova.='/'.$this->data['file'];
|
||||
if (is_file($honnan) && !is_file($hova)) { copy($honnan,$hova); }
|
||||
|
||||
// képek legyártása
|
||||
$honnan='/home/vendeg/'.$this->data['vendegkep'];
|
||||
if (is_file($honnan))
|
||||
{
|
||||
$origSize=getimagesize($honnan);
|
||||
if ($origSize[0]>=400 || $origSize[1]>=400)
|
||||
{
|
||||
$hova=$_SERVER['DOCUMENT_ROOT']."/public/img/collection/".$man->dir;
|
||||
if (!is_dir($hova)) mkdir($hova);
|
||||
$hova.="/".$newID;
|
||||
if (!is_dir($hova)) mkdir($hova);
|
||||
if (!is_dir($hova."/orig")) mkdir($hova."/orig");
|
||||
|
||||
$this->make_thumb($honnan, $hova.'/zz_big.jpg', (int)round(($origSize[0]/$origSize[1])*400),400);
|
||||
$this->make_thumb($honnan, $hova.'/zz_thumb.jpg', (int)round(($origSize[0]/$origSize[1])*120),120);
|
||||
$this->make_thumb($honnan, $hova.'/zz_small.jpg', (int)round(($origSize[0]/$origSize[1])*66),66);
|
||||
|
||||
copy($honnan,$hova."/orig/".$this->data['vendegkep']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else { print ("descriptor file '".$descriptor."' nem elérhető<br />"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
else { print ("grouplist file '".$grouplist."' nem elérhető<br />"); }
|
||||
}
|
||||
|
||||
$this->parents=$model->getParents();
|
||||
$this->subcat=$model->getSubcat($this->selected_category);
|
||||
$app->getPathway()->addItem(JText::_(COM_SHOWROOM_SHOWROOM), '/index.php?option=com_showroom&view=showroom');
|
||||
$app->getPathway()->addItem(JText::_(COM_SHOWROOM_MULTIUPLOAD));
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function make_thumb($src, $dest, $desired_width,$desired_h)
|
||||
{
|
||||
$source_image=imagecreatefromjpeg($src);
|
||||
$width=imagesx($source_image);
|
||||
$height=imagesy($source_image);
|
||||
$desired_height=$desired_h;
|
||||
$virtual_image=imagecreatetruecolor($desired_width, $desired_height);
|
||||
imagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $width, $height);
|
||||
imagejpeg($virtual_image, $dest);
|
||||
}
|
||||
} // end of class
|
||||
?>
|
||||
@ -1,4 +0,0 @@
|
||||
Options +ExecCGI
|
||||
AddType application/x-httpd-php .json
|
||||
AddHandler application/x-httpd-php .json
|
||||
AddHandler application/x-httpd-php5 .json
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Helix3 Framework
|
||||
* Template Name - Shaper Helix3
|
||||
@ -108,23 +109,241 @@ $this->helix3->addGoogleFont($webfonts);
|
||||
|
||||
//Custom CSS
|
||||
if ($custom_css = $this->helix3->getParam('custom_css')) {
|
||||
$doc->addStyledeclaration($custom_css);
|
||||
// TODO:
|
||||
// $doc->addStyledeclaration($custom_css);
|
||||
}
|
||||
|
||||
//Custom JS
|
||||
if ($custom_js = $this->helix3->getParam('custom_js')) {
|
||||
$doc->addScriptdeclaration($custom_js);
|
||||
// TODO:
|
||||
// $doc->addScriptdeclaration($custom_js);
|
||||
}
|
||||
|
||||
$menuArray = array(124, 693);
|
||||
|
||||
//preloader & goto top
|
||||
$doc->addScriptdeclaration("\nvar sp_preloader = '" . $this->params->get('preloader') . "';\n");
|
||||
$doc->addScriptdeclaration("\nvar sp_gotop = '" . $this->params->get('goto_top') . "';\n");
|
||||
$doc->addScriptdeclaration("\nvar sp_offanimation = '" . $this->params->get('offcanvas_animation') . "';\n");
|
||||
|
||||
$warehouseId = array('730', '729', '745', '744');
|
||||
$isWarehouseLink = strpos($url, '/warehouse') !== false || in_array($_GET['Itemid'], $warehouseId);
|
||||
?>
|
||||
<!-- <?= var_dump(in_array("hu", JFactory::getLanguage()->getLocale())); ?>-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<?php if (!$isWarehouseLink) : ?>
|
||||
<style>
|
||||
.speasyimagegallery-image-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 900px) {
|
||||
.sigFreeContainer {
|
||||
width: 400px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.spaceUnder>td {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.resp-img {
|
||||
width: 300px !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.cke-resize {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.tooltiptext {
|
||||
width: 280px !important;
|
||||
margin-left: 0px !important;
|
||||
}
|
||||
|
||||
.modal {
|
||||
height: 80% !important;
|
||||
margin-top: 10% !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tooltips {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#termsModal {
|
||||
z-index: 10000 !important;
|
||||
}
|
||||
|
||||
.info-tooltip>.tooltiptext {
|
||||
background-color: #D1ECF1;
|
||||
color: #0C5460;
|
||||
}
|
||||
|
||||
.tooltips .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 700px;
|
||||
border-radius: 6px;
|
||||
padding: 20px 1000px 10px 0px;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 150%;
|
||||
left: 0%;
|
||||
right: 50%;
|
||||
margin-left: -60px;
|
||||
}
|
||||
|
||||
|
||||
.tooltips:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
margin-top: 10% !important;
|
||||
}
|
||||
|
||||
#unibox-suggest-box {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: stretch;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-group>.form-control,
|
||||
.input-group>.custom-select,
|
||||
.input-group>.custom-file {
|
||||
position: relative;
|
||||
flex: 1 1 auto;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.btn-file {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.fileinput.input-group {
|
||||
display: flex;
|
||||
margin-bottom: 9px;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.fileinput.input-group>* {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.fileinput .form-control {
|
||||
padding: .375rem .75rem;
|
||||
display: inline-block;
|
||||
margin-bottom: 0px;
|
||||
vertical-align: middle;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.fileinput-filename {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.form-control .fileinput-filename {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.input-group>.form-control:not(:last-child),
|
||||
.input-group>.custom-select:not(:last-child) {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.fileinput.input-group>.btn-file {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.fileinput-new {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.fileinput-new.input-group .btn-file,
|
||||
.fileinput-new .input-group .btn-file {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.fileinput-new.input-group .btn-file,
|
||||
.fileinput-new .input-group .btn-file {
|
||||
border-radius: 0 .25rem .25rem 0;
|
||||
}
|
||||
|
||||
.input-group-addon:not(:first-child) {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.fileinput .input-group-addon {
|
||||
padding: .375rem .75rem;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.fileinput-exists .fileinput-new,
|
||||
.fileinput-new .fileinput-exists {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.fileinput .btn {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.fileinput .input-group-addon {
|
||||
padding: .375rem .75rem;
|
||||
}
|
||||
|
||||
.btn:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fileinput.input-group>.btn-file {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.fileinput-new.input-group .btn-file,
|
||||
.fileinput-new .input-group .btn-file {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.fileinput-new.input-group .btn-file,
|
||||
.fileinput-new .input-group .btn-file {
|
||||
border-radius: 0 .25rem .25rem 0;
|
||||
}
|
||||
|
||||
.btn-file>input {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
font-size: 23px;
|
||||
cursor: pointer;
|
||||
filter: alpha(opacity=0);
|
||||
opacity: 0;
|
||||
direction: ltr;
|
||||
}
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
|
||||
<script src="https://cdn.sitesearch360.com/v13/sitesearch360-v13.min.js" async></script>
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<?php
|
||||
@ -169,19 +388,52 @@ $doc->addScriptdeclaration("\nvar sp_offanimation = '" . $this->params->get('off
|
||||
|
||||
//Before Head
|
||||
if ($before_head = $this->helix3->getParam('before_head')) {
|
||||
echo $before_head . "\n";
|
||||
// TODO:
|
||||
// echo $before_head . "\n";
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body class="<?php echo $this->helix3->bodyClass($body_classes); ?> off-canvas-menu-init">
|
||||
<?php if ($_SERVER['HTTP_HOST'] == 'www.archline.hu'): ?>
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-51323892-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-51323892-2');
|
||||
</script>
|
||||
<?php else: ?>
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-51323892-1"></script>
|
||||
<script type="text/javascript">
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag(){
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-51323892-1');
|
||||
|
||||
jQuery( document ).ready(function() {
|
||||
jQuery('.offcanvas-inner div:nth-child(2)').addClass('hidden-canvas');
|
||||
});
|
||||
</script>
|
||||
|
||||
<meta name="google-site-verification" content="pF-77P0oiVBTwM_e9a6UZWeqXj7rIlPgwT-_74iOdWs" />
|
||||
<?php endif;?>
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="/templates/shaper_helix3/css/custom_template.css?ver=3">
|
||||
</head>
|
||||
|
||||
<body class="<?php echo $this->helix3->bodyClass($body_classes); ?> off-canvas-menu-init">
|
||||
<div class="body-wrapper">
|
||||
<div class="body-innerwrapper">
|
||||
<?php $this->helix3->generatelayout(); ?>
|
||||
</div> <!-- /.body-innerwrapper -->
|
||||
</div> <!-- /.body-innerwrapper -->
|
||||
|
||||
<?php if (!$isWarehouseLink) : ?>
|
||||
<!-- Off Canvas Menu -->
|
||||
<div class="offcanvas-menu">
|
||||
<a href="#" class="close-offcanvas" aria-label="Close"><i class="fa fa-remove" aria-hidden="true" title="<?php echo JText::_('HELIX_CLOSE_MENU'); ?>"></i></a>
|
||||
@ -196,6 +448,28 @@ $doc->addScriptdeclaration("\nvar sp_offanimation = '" . $this->params->get('off
|
||||
</div> <!-- /.offcanvas-inner -->
|
||||
</div> <!-- /.offcanvas-menu -->
|
||||
|
||||
<div aria-hidden="true" aria-labelledby="exampleModalLabel" class="modal fade" id="exampleModal" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<section data-ss360="true" role="search"><input class="searchBox" type="search" /><button id="searchButton"></button></section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div aria-hidden="true" aria-labelledby="exampleModalLabel" class="modal fade" id="exampleModal" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<section data-ss360="true" role="search"><input class="searchBox" type="search" /><button id="searchButton"></button></section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if ($this->params->get('compress_css')) {
|
||||
$this->helix3->compressCSS();
|
||||
@ -204,13 +478,14 @@ $doc->addScriptdeclaration("\nvar sp_offanimation = '" . $this->params->get('off
|
||||
$tempOption = $app->input->get('option');
|
||||
// $tempView = $app->input->get('view');
|
||||
|
||||
if ( $this->params->get('compress_js') && $tempOption != 'com_config' ) {
|
||||
if ($this->params->get('compress_js') && $tempOption != 'com_config') {
|
||||
$this->helix3->compressJS($this->params->get('exclude_js'));
|
||||
}
|
||||
|
||||
//before body
|
||||
if ($before_body = $this->helix3->getParam('before_body')) {
|
||||
echo $before_body . "\n";
|
||||
// TODO:
|
||||
// echo $before_body . "\n";
|
||||
}
|
||||
?>
|
||||
|
||||
@ -224,5 +499,295 @@ $doc->addScriptdeclaration("\nvar sp_offanimation = '" . $this->params->get('off
|
||||
<a href="javascript:void(0)" class="scrollup" aria-label="<?php echo JText::_('HELIX_GOTO_TOP'); ?>"> </a>
|
||||
<?php } ?>
|
||||
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
_linkedin_partner_id = "1454324";
|
||||
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
|
||||
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
var b = document.createElement("script");
|
||||
b.type = "text/javascript";
|
||||
b.async = true;
|
||||
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
|
||||
s.parentNode.insertBefore(b, s);
|
||||
})();
|
||||
</script> <!--<noscript> <img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=1454324&fmt=gif" /> </noscript>-->
|
||||
<?php include(JPATH_SITE . "/templates/system/template.php"); ?>
|
||||
|
||||
<?php if (!$isWarehouseLink) : ?>
|
||||
<!-- Modal -->
|
||||
<div id="signinModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Sign in</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="needLogin">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div id="contactModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog modal-lg">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Request for student lab subscription</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="sppb-addon sppb-addon-ajax-contact ">
|
||||
<div class="sppb-ajax-contact-content">
|
||||
<form method="post" action="">
|
||||
<div class="sppb-row">
|
||||
<div class="sppb-form-group sppb-col-sm-12"><input type="text" name="name" class="sppb-form-control" placeholder="Name" required="required"></div>
|
||||
<div class="sppb-form-group sppb-col-sm-12"><input type="email" name="email" class="sppb-form-control" placeholder="Email" required="required"></div>
|
||||
<div class="sppb-form-group sppb-col-sm-12"><input type="text" name="subject" value="ARCHLine.XP LAB license application" class="sppb-form-control" placeholder="Subject" required="required"></div>
|
||||
<div class="sppb-form-group sppb-col-sm-12"><input type="text" id="biztonsagi" name="captcha_question" class="sppb-form-control" placeholder="" required="required"></div>
|
||||
<div class="sppb-form-group sppb-col-sm-12"><textarea name="message" rows="5" class="sppb-form-control" placeholder="Message" required="required"></textarea></div>
|
||||
</div><input type="hidden" name="recipient" value="aW5mb0BhcmNobGluZXhwLmNvbQ=="><input type="hidden" name="from_email" value=""><input type="hidden" name="from_name" value=""><input type="hidden" name="addon_id" value="1477918584126"><input type="hidden" name="captcha_answer" value="8f14e45fceea167a5a36dedd4bea2543">
|
||||
<div class="sppb-form-group">
|
||||
<div class="sppb-form-check"><input class="sppb-form-check-input" type="checkbox" name="agreement" id="agreement" required="required"><label class="sppb-form-check-label" for="agreement">By submitting your information, you acknowledge you have read and you hereby acccept the <a href="http://www.archlinexp.com/legal/privacy-policy">Privacy Policy</a> under which your personal data will be processed by CADLine and third parties for its business purposes.</label></div>
|
||||
</div><input type="hidden" name="captcha_type" value="default">
|
||||
<div class="sppb-text-left"><button type="submit" id="btn-1477918584126" aria-label="SEND MESSAGE" class="sppb-btn sppb-btn-custom sppb-btn-lg sppb-btn-square" name="contact-btn"><i class="fa" aria-hidden="true"></i>SEND MESSAGE <span class="fa fa-mail-forward" aria-hidden="true"></span></button></div>
|
||||
</form>
|
||||
<div style="display:none;margin-top:10px;" class="sppb-ajax-contact-status"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$product = &JTable::getInstance("content");
|
||||
$product->load(903);
|
||||
?>
|
||||
|
||||
<div id="termsModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog modal-lg">
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title"><?php echo $product->get("title"); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $product->introtext; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div aria-hidden="true" aria-labelledby="downloadModalLabel" class="modal fade" id="downloadModal" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div id="download-info-content">
|
||||
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="phocadownloadfile32">
|
||||
<a href="#" id="download-link-external">Letöltés</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Newsletter Modal Begin -->
|
||||
<?php
|
||||
if ($_SERVER['HTTP_HOST'] == 'www.archlinexp.com')
|
||||
echo JModuleHelper::renderModule(JModuleHelper::getModule('mod_al_newsletter', 'mod_al_newsletter'));
|
||||
?>
|
||||
<?php /*echo JModuleHelper::renderModule(JModuleHelper::getModule('mod_al_newsletter', 'mod_al_newsletter'));*/ ?>
|
||||
<!-- Newsletter Modal End -->
|
||||
|
||||
<!-- Modal -->
|
||||
<div id="studModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog modal-lg">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<form action="" method="post" enctype='multipart/form-data'>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">ARCHLine.XP Student Annual Subscription</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="email">Email address:</label> <input required class="form-control" id="email" name="email" type="email" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="fname">First name:</label>
|
||||
<input type="text" class="form-control" name="fname" id="fname">
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="lname">Last name:</label>
|
||||
<input type="text" class="form-control" id="lname" name="lname">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="country">Country:</label>
|
||||
<select id="country" name="country" style="width:100%" required>
|
||||
<option value="">Please Select a Country*</option>
|
||||
<option value="-" disabled="disabled">-----</option>
|
||||
<?php
|
||||
$tomb = parse_ini_file($_SERVER['DOCUMENT_ROOT'] . '/language/' . JFactory::getLanguage()->getTag() . '/' . JFactory::getLanguage()->getTag() . '.countries.ini');
|
||||
foreach ($tomb as $k => $v) echo '<option value="' . $k . '">' . $v . '</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="education">Name of educational institution:</label>
|
||||
<input type="text" id="education" name="education" required class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label>Academic Proof</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<input class=" form-control" id="file-txt" type="text" readonly style="width: 100%" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
|
||||
|
||||
<label for="files" class="btn btn-default" style="width: 100%">Browse file</label>
|
||||
<input id="files" type="file" name="files[]" required multiple class="btn btn-default" style="visibility:hidden;" />
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<a class="type-tooltip">
|
||||
<div class="tooltips info-tooltip">
|
||||
What kind of academic proof we need?
|
||||
<div class="tooltiptext" style="width: 600px; padding: 20px 0px 20px 20px">
|
||||
Examples of preferred documents:<br /><br />
|
||||
|
||||
Valid school ID - an ID with the full name of student or faculty member, school name, validity<br /><br />
|
||||
|
||||
A school-issued confirmation letter - document with school letterhead, student's or faculty member's full name, school name and date
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="jform_captcha"><strong>Captcha</strong></label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<div id="jform_captcha" class="g-recaptcha required" data-sitekey="6LeqnB8TAAAAAJXgoIg0gtTxwsjM4d22jZIs74hS" data-theme="light" data-size="normal" required></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="sppb-form-group">
|
||||
<div class="sppb-form-check"><input class="sppb-form-check-input" type="checkbox" name="agreement" id="agreement" required="required"><label class="sppb-form-check-label" for="agreement">By submitting your information, you acknowledge you have read and you hereby acccept the <a href="http://www.archlinexp.com/legal/privacy-policy">Privacy Policy</a> under which your personal data will be processed by CADLine and third parties for its business purposes.</label></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="sppb-form-group">
|
||||
<div class="sppb-form-check"><input class="sppb-form-check-input" type="checkbox" name="terms" id="terms" required="required"><label class="sppb-form-check-label" for="terms">By completing this application, you acknowledge that you have read and understood the <a href="#" data-target="#termsModal" data-toggle="modal">terms and conditions</a>.</label></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<input type="submit" class="btn btn-success" name="apply-btn" value="Apply" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
jQuery('#files').on("change", function() {
|
||||
var extension = jQuery(this).val().substr((jQuery(this).val().lastIndexOf('.') + 1));
|
||||
|
||||
if (extension === 'jpg' || extension === 'png' || extension === 'gif' || extension === 'pdf') {
|
||||
jQuery('#student-btn').removeAttr('disabled');
|
||||
} else {
|
||||
jQuery('#student-btn').attr('disabled', true);
|
||||
}
|
||||
|
||||
var filenames = '';
|
||||
var filenames2 = '';
|
||||
for (var i = 0; i < jQuery(this).get(0).files.length; ++i) {
|
||||
filenames += '- ' + jQuery(this).get(0).files[i].name + ' \n';
|
||||
filenames2 += jQuery(this).get(0).files[i].name;
|
||||
}
|
||||
|
||||
jQuery('#file-txt').val(filenames2);
|
||||
jQuery('#file-txt').attr('title', filenames);
|
||||
});
|
||||
|
||||
window.onload = function() {
|
||||
var a;
|
||||
var b;
|
||||
|
||||
a = Math.floor(Math.random() * 10) + 1;
|
||||
b = Math.floor(Math.random() * 10) + 1;
|
||||
|
||||
if (document.getElementById("biztonsagi"))
|
||||
document.getElementById("biztonsagi").placeholder = a + "*" + b + "=?";
|
||||
};
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -1,184 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Modified for use as the J plugin installer
|
||||
* AW
|
||||
*/
|
||||
|
||||
|
||||
// Check to ensure this file is within the rest of the framework
|
||||
defined('JPATH_BASE') or die();
|
||||
|
||||
define('JCKPATH_COMPONENT', JPATH_ADMINISTRATOR.'/components/com_jckman');
|
||||
|
||||
|
||||
/**
|
||||
* Backup restorer
|
||||
*
|
||||
* @package Joomla.Framework
|
||||
* @subpackage Installer
|
||||
* @since 1.5
|
||||
* Renamed JInstallerPlugin to JCKRestorerPlugin
|
||||
*/
|
||||
|
||||
|
||||
|
||||
class JCKRestorerBackup extends JObject
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access protected
|
||||
* @param object $parent Parent object [JInstaller instance]
|
||||
* @return void
|
||||
* @since 1.5
|
||||
*/
|
||||
|
||||
|
||||
function __construct(&$parent)
|
||||
{
|
||||
$this->parent =& $parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom install method
|
||||
*
|
||||
* @access public
|
||||
* @return boolean True on success
|
||||
* @since 1.5
|
||||
* Minor alteration - see below
|
||||
*/
|
||||
function install()
|
||||
{
|
||||
|
||||
// Get a database connector object
|
||||
$db =& $this->parent->getDBO();
|
||||
|
||||
// Get the extension manifest object
|
||||
|
||||
$manifest =& $this->parent->getManifest();
|
||||
$this->manifest =& $manifest;//$manifest->document;
|
||||
|
||||
/**
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
* Manifest Document Setup Section
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
// Set the component name
|
||||
|
||||
$this->set('name','');
|
||||
|
||||
// Get the component description
|
||||
$description = & $this->manifest->description;
|
||||
$this->parent->set('message', '' );
|
||||
|
||||
$element =& $this->manifest->files;
|
||||
|
||||
$this->parent->setPath('extension_root', JCKPATH_COMPONENT.'/editor');
|
||||
|
||||
|
||||
/**
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
* Filesystem Processing Section
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// If the extension directory does not exist, lets create it
|
||||
$created = false;
|
||||
if (!file_exists($this->parent->getPath('extension_root'))) {
|
||||
if (!$created = JFolder::create($this->parent->getPath('extension_root'))) {
|
||||
$this->parent->abort('Plugin Install: '.JText::_('Failed to create directory').': "'.$this->parent->getPath('extension_root').'"');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we created the extension directory and will want to remove it if we
|
||||
* have to roll back the installation, lets add it to the installation
|
||||
* step stack
|
||||
*/
|
||||
|
||||
if ($created) {
|
||||
$this->parent->pushStep(array ('type' => 'folder', 'path' => $this->parent->getPath('extension_root')));
|
||||
}
|
||||
|
||||
// Copy all necessary files
|
||||
if ($this->parent->parseFiles($element, -1) === false) {
|
||||
// Install failed, roll back changes
|
||||
$this->parent->abort();
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
* Database Processing Section
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* Let's run the install queries for the component
|
||||
* If Joomla 1.5 compatible, with discreet sql files - execute appropriate
|
||||
* file for utf-8 support or non-utf-8 support
|
||||
*/
|
||||
// Try for Joomla 1.5 type queries
|
||||
// Second argument is the utf compatible version attribute
|
||||
if (isset($this->manifest->install->sql))
|
||||
{
|
||||
$utfresult = $this->parent->parseSQLFiles($this->manifest->install->sql);
|
||||
|
||||
if ($utfresult === false)
|
||||
{
|
||||
// Install failed, rollback changes
|
||||
$this->parent->abort(JText::sprintf('JLIB_INSTALLER_ABORT_COMP_INSTALL_SQL_ERROR', $db->stderr(true)));
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Parse optional tags -- language files for plugins
|
||||
$this->parent->parseLanguages($this->manifest->languages, 0);
|
||||
|
||||
/**
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
* Finalization and Cleanup Section
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
//Copy JCK Editor's Manifest backup file to the Editor
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
$src = JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jckman'.DS.'editor'.DS.'plugins'.DS.'jckeditor.xml';
|
||||
$dest = JPATH_PLUGINS.DS.'editors'.DS.'jckeditor'.DS.'jckeditor.xml';
|
||||
|
||||
|
||||
if( !JFile::copy( $src, $dest) ){
|
||||
$this->parent->abort( JText::_('Unable to copy JCK Editor\'s Manifest file') );
|
||||
}
|
||||
|
||||
// Lastly, we will copy the manifest file to its appropriate place.
|
||||
if (!$this->parent->copyManifest(-1)) {
|
||||
// Install failed, rollback changes
|
||||
$this->parent->abort('Import: '.JText::_('Could not copy setup file'));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom rollback method
|
||||
* - Roll back the plugin item
|
||||
*
|
||||
* @access public
|
||||
* @param array $arg Installation step to rollback
|
||||
* @return boolean True on success
|
||||
* @since 1.5
|
||||
* Minor changes to the db query
|
||||
*/
|
||||
function _rollback_plugin($arg)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -1,382 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version $Id: view.html.php 9764 2007-12-30 07:48:11Z ircmaxell $
|
||||
* @package Joomla
|
||||
* @subpackage Config
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* HTML View class for the Plugins component
|
||||
*
|
||||
* @static
|
||||
* @package Joomla
|
||||
* @subpackage Plugins
|
||||
* @since 1.0
|
||||
*/
|
||||
|
||||
class ToolbarsViewToolbar extends JViewLegacy
|
||||
{
|
||||
function display( $tpl = null )
|
||||
{
|
||||
global $option, $mainframe;
|
||||
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Layout Manager' ) .': <small><small>[' .JText::_('Edit'). ']</small></small>', 'layout.png' );
|
||||
JToolBarHelper::save();
|
||||
JToolBarHelper::apply();
|
||||
JToolBarHelper::cancel( 'cancelEdit', 'Close' );
|
||||
|
||||
$cid = JRequest::getVar( 'cid', array(0), '', 'array' );
|
||||
JArrayHelper::toInteger($cid, array(0));
|
||||
|
||||
$lists = array();
|
||||
$user =& JFactory::getUser();
|
||||
$row =& JCKHelper::getTable('toolbar');
|
||||
|
||||
// load the row from the db table
|
||||
$row->load( $cid[0] );
|
||||
|
||||
// fail if checked out not by 'me'
|
||||
|
||||
if ($row->isCheckedOut( $user->get('id') ))
|
||||
{
|
||||
$msg = JText::sprintf( 'DESCBEINGEDITTED', JText::_( 'The toolbar' ), $row->title );
|
||||
$this->setRedirect( 'index.php?option='. $option .'&view=Toolbars', $msg, 'error' );
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($cid[0])
|
||||
{
|
||||
$row->checkout( $user->get('id') );
|
||||
}
|
||||
else {
|
||||
$row->params = '';
|
||||
}
|
||||
|
||||
$db =& JFactory::getDBO();
|
||||
|
||||
//set the default total number of plugin records
|
||||
$total = 0;
|
||||
$totalRows = 0;
|
||||
|
||||
if ( $cid[0] ) {
|
||||
|
||||
|
||||
$total = 1;
|
||||
|
||||
$query = 'SELECT p.id,p.name,p.title,p.icon,tp.row'
|
||||
. ' FROM #__jckplugins p'
|
||||
. ' JOIN #__jcktoolbarplugins tp ON tp.pluginid = p.id'
|
||||
. ' WHERE tp.state = 1'
|
||||
. ' AND tp.toolbarid = '.(int) $row->id
|
||||
. ' AND p.published = 1'
|
||||
. ' ORDER BY tp.toolbarid ASC,tp.row ASC,tp.ordering ASC';
|
||||
$db->setQuery( $query );
|
||||
$toolbarplugins = $db->loadObjectList();
|
||||
|
||||
|
||||
// get the total number of plugin records
|
||||
$query = 'SELECT COUNT(*)'
|
||||
. ' FROM #__jcktoolbarplugins'
|
||||
. ' WHERE toolbarid ='.(int) $row->id;
|
||||
$db->setQuery( $query );
|
||||
$totalRows = $db->loadResult();
|
||||
|
||||
|
||||
if(!$totalRows) //lets get plugins from class file
|
||||
{
|
||||
require_once(CKEDITOR_LIBRARY.DS . 'toolbar.php');
|
||||
$CKfolder = CKEDITOR_LIBRARY.DS . 'toolbar';
|
||||
$filename = $CKfolder.DS.$row->name.'.php';
|
||||
require($filename);
|
||||
$classname = 'JCK'. ucfirst($row->name);
|
||||
$toolbar = new $classname();
|
||||
|
||||
$query = 'SELECT id,title'
|
||||
. ' FROM #__jckplugins'
|
||||
. ' WHERE title != ""'
|
||||
. ' AND published = 1'
|
||||
;
|
||||
$db->setQuery( $query );
|
||||
$allplugins = $db->loadObjectList();
|
||||
|
||||
|
||||
$values = array();
|
||||
//fix toolbar values or they will get wiped out
|
||||
$l = 1;
|
||||
$n = 1;
|
||||
$j = 1;
|
||||
|
||||
foreach (get_object_vars( $toolbar ) as $k => $v)
|
||||
{
|
||||
|
||||
if($v) $n = ($n > $v ? $n : $v);
|
||||
|
||||
if($l < $n)
|
||||
{
|
||||
$l = $n;
|
||||
$j = 1;
|
||||
}
|
||||
|
||||
for($m = 0; $m< count($allplugins); $m++)
|
||||
{
|
||||
|
||||
if($k == $allplugins[$m]->title)
|
||||
{
|
||||
$values[] = '('.(int)$row->id.','.(int)$allplugins[$m]->id.','.$n.','.$j.',1)';
|
||||
break;
|
||||
}
|
||||
|
||||
if(strpos($k,'brk_') !== false)
|
||||
{
|
||||
$id = preg_match('/[0-9]+$/',$k);
|
||||
$id = $id * -1;
|
||||
$values[] = '('.(int)$row->id.','.$id.','.$n.','.$j.',1)';
|
||||
$n++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
|
||||
|
||||
if(!empty($values))
|
||||
{
|
||||
$query = 'INSERT INTO #__jcktoolbarplugins(toolbarid,pluginid,row,ordering,state) VALUES ' . implode(',',$values);
|
||||
$db->setQuery( $query );
|
||||
if(!$db->query())
|
||||
{
|
||||
JCKHelper::error( $db->ErrorMsg() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$query = 'SELECT p.id,p.name,p.title,p.icon,p.row,p.iscore'
|
||||
. ' FROM #__jckplugins p'
|
||||
. ' LEFT JOIN #__jcktoolbarplugins tp ON tp.pluginid = p.id'
|
||||
. ' AND tp.toolbarid = '.(int) $row->id
|
||||
. ' WHERE tp.pluginid is null'
|
||||
. ' AND p.published = 1'
|
||||
. ' AND p.title != ""'
|
||||
.' ORDER by p.row ASC, p.id ASC';
|
||||
$db->setQuery( $query );
|
||||
$plugins = $db->loadObjectList();
|
||||
|
||||
if(!empty($plugins))
|
||||
{
|
||||
|
||||
/*
|
||||
require_once(CKEDITOR_LIBRARY.DS . 'toolbar.php');
|
||||
$CKfolder = CKEDITOR_LIBRARY.DS . 'toolbar';
|
||||
$filename = $CKfolder.DS.$row->name.'.php';
|
||||
require($filename);
|
||||
$classname = 'JCK'. ucfirst($row->name);
|
||||
$toolbar = new $classname();
|
||||
|
||||
$values = array();
|
||||
|
||||
foreach($plugins as $plugin)
|
||||
{
|
||||
if($plugin->iscore)
|
||||
continue;
|
||||
|
||||
$values[] = '('.(int)$row->id.','.(int)$plugin->id.','.$n.','.$j.',1)';
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
$query = 'SELECT tp.pluginid AS id,p.name,p.title,p.icon,tp.row'
|
||||
. ' FROM #__jcktoolbarplugins tp'
|
||||
. ' LEFT JOIN #__jckplugins p ON tp.pluginid = p.id'
|
||||
. ' AND p.published = 1'
|
||||
. ' WHERE tp.state = 1'
|
||||
. ' AND tp.toolbarid = '.(int) $row->id
|
||||
|
||||
. ' ORDER BY tp.toolbarid ASC,tp.row ASC,tp.ordering ASC';
|
||||
$db->setQuery( $query );
|
||||
$toolbarplugins = $db->loadObjectList();
|
||||
|
||||
|
||||
$toolbarplugins = $this->_getSortRowToolbars($toolbarplugins);
|
||||
|
||||
$this->assignRef('toolbarplugins', $toolbarplugins);
|
||||
$this->assignRef('plugins', $plugins );
|
||||
|
||||
}
|
||||
|
||||
|
||||
$this->assignRef('toolbar', $row);
|
||||
$this->assignRef('total', $total);
|
||||
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
function _getSortRowToolbars($toolbars)
|
||||
{
|
||||
$chunkSize1 = 24;
|
||||
$chunkSize2 = 10;
|
||||
$out = array();
|
||||
$count = 0;
|
||||
$outToolbars = array();
|
||||
$results = array();
|
||||
|
||||
|
||||
/*
|
||||
$spacer = new stdclass;
|
||||
$spacer->title = 'spacer';
|
||||
$spacer->name = 'spacer';
|
||||
$spacer->id = 0;
|
||||
|
||||
$rowNumber = 1;
|
||||
foreach($toolbars as $icon)
|
||||
{
|
||||
|
||||
if($icon->row > $rowNumber)
|
||||
$out[] = $spacer;
|
||||
$out[] = $icon;
|
||||
$rowNumber = $icon->row;
|
||||
}
|
||||
$toolbars = $out;
|
||||
|
||||
|
||||
$out = array();
|
||||
*/
|
||||
$j = 0;
|
||||
|
||||
$richTextCombos = array ('stylescombo','font','format','fontsize');
|
||||
|
||||
$chunkSize = $chunkSize1;
|
||||
|
||||
$autoformat = true;
|
||||
|
||||
$breaks = 0;
|
||||
for($i = 0; $i < count($toolbars);$i++)
|
||||
{
|
||||
|
||||
if($toolbars[$i]->id >= 0 )
|
||||
{
|
||||
$out[] = $toolbars[$i];
|
||||
}
|
||||
|
||||
if($toolbars[$i]->id < 0)
|
||||
{
|
||||
$outToolbars[] = $out;
|
||||
$breaks++;
|
||||
$out = array();
|
||||
$autoformat = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($breaks == 1)
|
||||
$autoformat = true;
|
||||
|
||||
if($autoformat)
|
||||
{
|
||||
$out = array();
|
||||
$outToolbars = array();
|
||||
|
||||
for($i = 0; $i < count($toolbars);$i++)
|
||||
{
|
||||
|
||||
if(in_array($toolbars[$i]->name,$richTextCombos))
|
||||
$chunkSize = $chunkSize2;
|
||||
|
||||
|
||||
if($j < $chunkSize)
|
||||
{
|
||||
$out[] = $toolbars[$i];
|
||||
$j++;
|
||||
}
|
||||
|
||||
if($j == $chunkSize)
|
||||
{
|
||||
$outToolbars[] = $out;
|
||||
$out = array();
|
||||
$j = 0;
|
||||
$chunkSize = $chunkSize1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(!empty($out))
|
||||
$outToolbars[] = $out;
|
||||
|
||||
|
||||
$results = $outToolbars;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
$richTextCombos = array ('stylescombo','font','format','fontsize');
|
||||
|
||||
for($k= 0; $k < count($outToolbars);$k++)
|
||||
{
|
||||
$chunkSize = $chunkSize1;
|
||||
$icons = $outToolbars[$k];
|
||||
for($j = 0;$j < count($icons);$j++)
|
||||
{
|
||||
if(in_array($icons[$j]->name,$richTextCombos))
|
||||
{
|
||||
$chunkSize = $chunkSize2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$chunks = array_chunk($outToolbars[$k],$chunkSize);
|
||||
foreach($chunks as $chunk)
|
||||
{
|
||||
$results[] = $chunk;
|
||||
}
|
||||
}
|
||||
*/
|
||||
//lets add spacer to each row
|
||||
|
||||
|
||||
$spacer = new stdclass;
|
||||
$spacer->title = 'spacer';
|
||||
$spacer->name = 'spacer';
|
||||
$spacer->id = 0;
|
||||
|
||||
|
||||
for($n= 0; $n < count($results);$n++)
|
||||
{
|
||||
$result = $results[$n];
|
||||
$out = array();
|
||||
$rowNumber = $results[$n][0]->row;
|
||||
foreach($result as $icon)
|
||||
{
|
||||
|
||||
if($icon->row > $rowNumber)
|
||||
$out[] = $spacer;
|
||||
$out[] = $icon;
|
||||
$rowNumber = $icon->row;
|
||||
}
|
||||
$results[$n] = $out;
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -47,3 +47,4 @@ templates/shaper_helix3/layout/_hxprobeoa31x6.json
|
||||
templates/shaper_helix3/layout/_hxprobet7sh3r.json
|
||||
templates/shaper_helix3/layout/jftest.json
|
||||
templates/shaper_helix3/layout/nxtest.json
|
||||
templates/shaper_helix3/.htaccess.json
|
||||
|
||||
Loading…
Reference in New Issue
Block a user